<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>A-Qute blog (code)</title><link>http://blog.aquinzi.com/</link><description></description><atom:link href="http://blog.aquinzi.com/es/tags/code.xml" type="application/rss+xml" rel="self"></atom:link><language>es</language><lastBuildDate>Tue, 09 Feb 2016 11:17:30 GMT</lastBuildDate><generator>nikola</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>pandy</title><link>http://blog.aquinzi.com/./es/pandy/</link><description>&lt;p&gt;&lt;a href="http://aquinzi.com/es/projects/pandy.php"&gt;pandy&lt;/a&gt; es un wrapper para &lt;a href="http://johnmacfarlane.net/pandoc/"&gt;pandoc&lt;/a&gt; + cositas copadas (si usas markdown -&amp;gt; html)&lt;/p&gt;
&lt;p&gt;Basicamente toma un archivo/carpeta, de qué convertir y a qué convertir, y lo corre por pandoc.&lt;/p&gt;
&lt;h2 id="uso"&gt;Uso&lt;/h2&gt;
&lt;p&gt;Para usar el script, solo llamalo con algo asi:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;pandy source format_from format/s_to [other options]
&lt;/pre&gt;&lt;/div&gt;


&lt;h2 id="caracteristicas"&gt;Caracteristicas&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Sintaxis un porquito mas facil para los comandos de pandoc&lt;/li&gt;
&lt;li&gt;Carpeta de output manteniendo o no la estructura&lt;/li&gt;
&lt;li&gt;La fuente puede ser un archivo, una carpeta o un .list que contenga las rutas a los archivos&lt;/li&gt;
&lt;li&gt;Formatos: algunos se puede abreviar (mirar abajo)&lt;/li&gt;
&lt;li&gt;Formato de salida: se pueden poner más de uno! solo separalo con espacios.&lt;/li&gt;
&lt;li&gt;Podes crear un librito re lindo (html, solo añade navegación entre archivos). Si no te gusta/queres el "Next-Prev", podes usar los titulos de archivo. Crea un lindo y simple index o incluí el tuyo.&lt;/li&gt;
&lt;li&gt;Usa un archivo de configuración: así no tenes que acordarte de todos los argumentos o escribir un "wrapper" para un script "wrapper" :)&lt;/li&gt;
&lt;li&gt;Soporte para &lt;code&gt;[TOCME]&lt;/code&gt;. Significa que el archivo que lo tenga, va a tener TOC. No mas eso de separar archivos con TOC, los que no tienen y finalmente ponerlos en una carpeta.&lt;/li&gt;
&lt;li&gt;Si usas markdown y convertis a HTML hay cositas lindas para vos: abbreviations (de las verdaderas, no como esas que son ignoradas por pandoc) y admonitions.&lt;/li&gt;
&lt;li&gt;"WikiLinks" para tu index!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Para más información y explicación, ir a la &lt;a href="http://aquinzi.com/es/projects/pandy.php"&gt;página de proyecto de pandy&lt;/a&gt;.&lt;/p&gt;</description><category>python</category><category>code</category><category>pandoc</category><category>markdown</category><guid>http://blog.aquinzi.com/./es/pandy/</guid><pubDate>Wed, 11 Dec 2013 00:00:00 GMT</pubDate></item><item><title>svnlog: make changelog from SVN</title><link>http://blog.aquinzi.com/./es/svnlog/</link><description>&lt;p&gt;&lt;a href="http://aquinzi.com/projects/svnlog.php"&gt;svnlog&lt;/a&gt; is a python script to create a changelog from a repository log.&lt;/p&gt;
&lt;p&gt;Examples of output (default):&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;2013-11-25:
    changed arguments (better handling)
    fix: output path with one file
    fix: finding &amp;lt;h1&amp;gt;

2013-11-19:
    fixed: now files are saved according to source dir tree
    + option to save files in one depth dir

2013-11-19:
    + relative links for book
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;You can group that too:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;2013-11-25:
    changed arguments (better handling)
    fix: output path with one file
    fix: finding &amp;lt;h1&amp;gt;

2013-11-19:
    fixed: now files are saved according to source dir tree
    + option to save files in one depth dir
    + relative links for book
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;It has some basic options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Show author with &lt;code&gt;--show-author&lt;/code&gt; or &lt;code&gt;-a&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Show revision number with &lt;code&gt;--show-rev&lt;/code&gt; or &lt;code&gt;-r&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Show time with &lt;code&gt;--show-time&lt;/code&gt; or &lt;code&gt;-t&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Prefix with a char using &lt;code&gt;--prefix&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Reverse the order (default: new to old) with &lt;code&gt;--reverse&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Specify date or a range (&lt;a href="https://en.wikipedia.org/wiki/ISO_8601"&gt;ISO 8601&lt;/a&gt;) with &lt;code&gt;--date&lt;/code&gt;. You can leave the second date empy (&lt;code&gt;date1:&lt;/code&gt;) to include today&lt;/li&gt;
&lt;li&gt;If you are better with revision numbers, you can specify one or a range with &lt;code&gt;--revision&lt;/code&gt;. You can leave the second revision empty (&lt;code&gt;rev1:&lt;/code&gt;) to include HEAD revision&lt;/li&gt;
&lt;li&gt;Group the dates with &lt;code&gt;--group&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Also group revisions with &lt;code&gt;--subgroup&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Or group dates but show it inline: &lt;code&gt;--inline&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Just make sure you have a SVN CLI in your path and then run &lt;a href="http://aquinzi.com/projects/svnlog.php"&gt;svnlog&lt;/a&gt; with the options you desire&lt;/p&gt;</description><guid>http://blog.aquinzi.com/./es/svnlog/</guid><pubDate>Mon, 02 Dec 2013 00:00:00 GMT</pubDate></item><item><title>pymd: wrapper para Python Markdown</title><link>http://blog.aquinzi.com/./es/pymd/</link><description>&lt;div class="admonition info"&gt;
&lt;p class="admonition-title"&gt;Hey!&lt;/p&gt;
&lt;p&gt;pymd ahora esta en &lt;a href="https://pypi.python.org/pypi/pymd"&gt;PyPI&lt;/a&gt;. Eso significa que lo podes instalar como &lt;code&gt;pip install pymd&lt;/code&gt; :)&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="http://aquinzi.com/es/projects/pymd.php"&gt;pymd&lt;/a&gt; es un wrapper para la librería &lt;a href="http://pythonhosted.org/Markdown/"&gt;Python Markdown&lt;/a&gt;, basicamente te permite tener un HTML completo a comparación de lo que te tira la librería.&lt;/p&gt;
&lt;h2 id="caracteristicas"&gt;Características&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Proceso en batch (en una carpeta o usando .list) con extensiones .md, .txt o .markdown&lt;/li&gt;
&lt;li&gt;Especificar una carpeta de resultados/output (con creación automática)&lt;/li&gt;
&lt;li&gt;Incluye todas las extensiones de Python Markdown y hasta podes especificar las tuyas!&lt;/li&gt;
&lt;li&gt;Combinar los archivos en un HTML grande o crear un librito con links de navegación; hasta podes crear tu propio index!&lt;/li&gt;
&lt;li&gt;CSSed: trae un no-tan-feo CSS embebido (hasta podes cambiar entre tipografía sans y serif) o linkear a una que prefieras.&lt;/li&gt;
&lt;li&gt;Encabezados para los archivos! Así podes compartir el mismo metadata (como tu hermoso nombre y tu creativo título) en todos los archivos o cuando combinas y te olvidaste poner un título principal.&lt;/li&gt;
&lt;li&gt;Wiki links: &lt;code&gt;[](file|path) -&amp;gt; [title linked file](output_path)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Hecho con amor &amp;lt;3&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Más información y ejemplos en la &lt;a href="http://aquinzi.com/es/projects/pymd.php"&gt;página de proyecto de pymd&lt;/a&gt;&lt;/p&gt;</description><category>python</category><category>code</category><category>markdown</category><guid>http://blog.aquinzi.com/./es/pymd/</guid><pubDate>Sun, 17 Nov 2013 00:00:00 GMT</pubDate></item><item><title>proDO: super simple bug/issue tracker</title><link>http://blog.aquinzi.com/./es/prodo/</link><description>&lt;div class="toc"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://blog.aquinzi.com/./es/prodo/#background"&gt;Background&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.aquinzi.com/./es/prodo/#script"&gt;Say hi to proDO&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="admonition attention"&gt;
&lt;p class="admonition-title"&gt;Atención&lt;/p&gt;
&lt;p&gt;Si no te interesa la historia del por qué se escribió el script y/o no queres saber sobre programitas, adelantate hasta &lt;a href="http://blog.aquinzi.com/./es/prodo/#script"&gt;acá&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id="background"&gt;Background&lt;/h2&gt;
&lt;p&gt;Cuando desarrollas o escribis código (o palabras, por qué no) necesitas algún tipo de bug/issue tracker. Eso es normal para proyectos grandes o con varias personas, pero al ser un solo individuo o el proyecto es chico, todas las opciones son como mucho.&lt;/p&gt;
&lt;p&gt;A algunos no les importa e instalan grandes bug trackers, otros usan algo mas simple. Otros vamos por la old school y escribimos en papel. Otras escribimos en un .txt, que puede ser un simple archivo o con esos ToDo.txt/&lt;a href="http://taskwarrior.org/"&gt;taskwarrior&lt;/a&gt;&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="http://blog.aquinzi.com/./es/prodo/#fn:1" rel="footnote"&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;p&gt;Si el proyecto es medianamente grande (más grande que un mero script), escribo en papel. Si es algo simple/un script, anoto las cosas dentro del archivo, como varias personas.&lt;/p&gt;
&lt;p&gt;El problema que tengo es que me gusta listar todas las cositas esas con el numero de linea y/o click que me lleve a tal. No todos los editores lo hacen por default (creo que las grandes IDEs), seguro hay un plugin que ni ganas de configurar. Se puede hacer una búsqueda, que es lo mas cercano a lo que quiero.&lt;/p&gt;
&lt;p&gt;Uso dos editores de texto dependiendo del trabajo que tengo que hacer: &lt;a href="http://www.sublimetext.com/"&gt;Sublime Text&lt;/a&gt; para trabajos "grandes" (por alguna razón) y &lt;a href="http://www.notepad-plus-plus.org/"&gt;Notepad++&lt;/a&gt;. En ambos se puede hacer búsquedas por proyecto/archivos abiertos, la diferencia es que en Sublime Text te abre una pestañita de miercoles con los resultados (not fun), y Notepad++ te los muestra en una ventanita dockeable (good):&lt;/p&gt;
&lt;p&gt;&lt;img alt="Resultados de búsqueda en Notepad++" src="http://blog.aquinzi.com/images/2013/search_notepadpp.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Qué no me gusta de esto? La forma en que te lo muestra&lt;sup id="fnref:2"&gt;&lt;a class="footnote-ref" href="http://blog.aquinzi.com/./es/prodo/#fn:2" rel="footnote"&gt;2&lt;/a&gt;&lt;/sup&gt; y el hecho que Notepad++ tiene otro tipo de regex que, según expertos, es mas pobre.&lt;/p&gt;
&lt;p&gt;Lo más lógico es usar grep. Si usas Linux, ya viene por defecto, sino con algo como &lt;a href="http://cygwin.com/"&gt;Cygwin&lt;/a&gt; en Windows (u otras variantes). Hasta le podes poner colorcitos pero solo a una cosa (el string encontrado). No está mal tampoco pero no es muy limpio&lt;sup id="fnref:6"&gt;&lt;a class="footnote-ref" href="http://blog.aquinzi.com/./es/prodo/#fn:6" rel="footnote"&gt;3&lt;/a&gt;&lt;/sup&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Resultados de búsqueda con grep" src="http://blog.aquinzi.com/images/2013/search_grep.png"&gt;&lt;/p&gt;
&lt;p&gt;Si no te gustan las terminales/lineas de comandos pero queres usar grep, hay varios programitas que te dejan (hacer una especie de) grep&lt;sup id="fnref:3"&gt;&lt;a class="footnote-ref" href="http://blog.aquinzi.com/./es/prodo/#fn:3" rel="footnote"&gt;4&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;p&gt;Tenes &lt;a href="http://www.mythicsoft.com/agentransack/"&gt;Agent Ransack&lt;/a&gt;, donde quedaría asi:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Resultados de busqueda con Agent Ransack" src="http://blog.aquinzi.com/images/2013/search_agent.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Para este tipo de trabajos no me gusta por que tengo que clickear archivo por archivo (not fun).&lt;/p&gt;
&lt;p&gt;Y &lt;a href="http://stefanstools.sourceforge.net/grepWin.html"&gt;grepWin&lt;/a&gt;, donde hay que tener cuidado de clickear solo en "Search" y seleccionar la opción de "Content"&lt;/p&gt;
&lt;p&gt;&lt;img alt="Resultados de búsqueda de grepWin" src="http://blog.aquinzi.com/images/2013/search_grepWin.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Este no estaba tan mal, pero eso de abrir programa &amp;gt; rellenar datos no me convencia mucho. Por lineas de comando solo podes poner el path y qué buscar (que no esta mal) pero quiero que, por lo menos, esté seleccionado el "Content".&lt;/p&gt;
&lt;h2 id="script"&gt;Say hi to proDO&lt;/h2&gt;
&lt;p&gt;Como estoy aprendiendo Python y mas que nada lo estoy usando para hacer varios scripts&lt;sup id="fnref:4"&gt;&lt;a class="footnote-ref" href="http://blog.aquinzi.com/./es/prodo/#fn:4" rel="footnote"&gt;5&lt;/a&gt;&lt;/sup&gt; y reemplazar/dejar de dar vueltas con los batch, me decidí a hacer el mío.&lt;/p&gt;
&lt;p&gt;Con los ejemplos anteriores, queda asi:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Resultados de búsqueda con proDO" src="http://blog.aquinzi.com/images/2013/search_nocolor.png"&gt;&lt;/p&gt;
&lt;p&gt;Pero si tenes &lt;a href="https://pypi.python.org/pypi/colorama"&gt;colorama&lt;/a&gt; instalado queda asi (con mas onda):&lt;/p&gt;
&lt;p&gt;&lt;img alt="Resultados de búsqueda con proDO con color" src="http://blog.aquinzi.com/images/2013/search_color.png"&gt;&lt;/p&gt;
&lt;p&gt;Datos:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Solo busca las palabras TODO y FIXME (es case insensitive: también podes poner ToDo, todo, tODO, etc)&lt;/li&gt;
&lt;li&gt;Por default, al correr el programa te lista los archivos desde donde corre el script &lt;sup id="fnref:5"&gt;&lt;a class="footnote-ref" href="http://blog.aquinzi.com/./es/prodo/#fn:5" rel="footnote"&gt;6&lt;/a&gt;&lt;/sup&gt;, ignorando los &lt;code&gt;.bak&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Se puede especificar la ruta a buscar, corriendo &lt;code&gt;proDO.py -s/-source [rutita linda]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Se puede eliminar las lineas con: &lt;code&gt;proDO.py del/d [archivo] [linea]&lt;/code&gt; (automaticamente hace un backup (&lt;code&gt;.bak&lt;/code&gt;) del archivo por si se pone loca)&lt;/li&gt;
&lt;li&gt;Si necesitas ejemplos de lo de arriba o queres mirar qué linda hice la ayuda: &lt;code&gt;proDO.py -h&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Si no queres escribir &lt;code&gt;proDO.py&lt;/code&gt; (la extensión es importante en Windows), podes crear un "wrapper batch": en (ejemplo) proDO.bat poner: &lt;code&gt;proDO.py %*&lt;/code&gt;. Guardás y listo, ya lo podes llamar como &lt;code&gt;proDO&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Decarga y más información en la &lt;a href="http://aquinzi.com/es/projects/prodo.php"&gt;página de proDO&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Que esta lindo, es para linux o con Windows + &lt;a href="http://cygwin.com/"&gt;Cygwin&lt;/a&gt;, pero es mucho trabajo para configurarlo para esto. &lt;a class="footnote-backref" href="http://blog.aquinzi.com/./es/prodo/#fnref:1" rev="footnote" title="Jump back to footnote 1 in the text"&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;Mentira, me acordé después de hacer el script. Lo testeé y no anda mal. Sólo que no se puede buscar por proyectos, asi que hay que escribir el path en la búsqueda o abrir todos los archivos. &lt;a class="footnote-backref" href="http://blog.aquinzi.com/./es/prodo/#fnref:2" rev="footnote" title="Jump back to footnote 2 in the text"&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:6"&gt;
&lt;p&gt;Se puede limpiar/formatear con awk, pero tuve problemas con Cygwin que no traía el ejecutable para la herramienta (!) &lt;a class="footnote-backref" href="http://blog.aquinzi.com/./es/prodo/#fnref:6" rev="footnote" title="Jump back to footnote 3 in the text"&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;No sé exactamente la diferencia entre grep y buscar dentro de los archivos (con regex), yo lo uso intercambiablemente. &lt;a class="footnote-backref" href="http://blog.aquinzi.com/./es/prodo/#fnref:3" rev="footnote" title="Jump back to footnote 4 in the text"&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:4"&gt;
&lt;p&gt;por que se me complicó con eso de buscar una IDE para la parte gráfica. &lt;a class="footnote-backref" href="http://blog.aquinzi.com/./es/prodo/#fnref:4" rev="footnote" title="Jump back to footnote 5 in the text"&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:5"&gt;
&lt;p&gt;en Linux es más fácil (por lo menos en xfce): &lt;kbd&gt;botón derecho &amp;gt; terminal&lt;/kbd&gt;. En Windows tenes que apretar &lt;kbd&gt;shift + botón derecho&lt;/kbd&gt;. &lt;a class="footnote-backref" href="http://blog.aquinzi.com/./es/prodo/#fnref:5" rev="footnote" title="Jump back to footnote 6 in the text"&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description><category>code</category><category>python</category><category>grep</category><guid>http://blog.aquinzi.com/./es/prodo/</guid><pubDate>Fri, 26 Jul 2013 00:00:00 GMT</pubDate></item><item><title>Pasar de sintaxis DokuWiki a html</title><link>http://blog.aquinzi.com/./es/dokuwiki-a-html/</link><description>&lt;p&gt;Para pasar de sintaxis DokuWiki a HTML necesitas poner el siguiente php:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'cli'&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="nb"&gt;php_sapi_name&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="k"&gt;die&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nb"&gt;ini_set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'memory_limit'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'128M'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nb"&gt;defined&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'DOKU_INC'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="nb"&gt;define&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'DOKU_INC'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nb"&gt;realpath&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;dirname&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;__FILE__&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="s1"&gt;'/../'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="s1"&gt;'/'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nb"&gt;define&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'NOSESSION'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;require_once&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;DOKU_INC&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="s1"&gt;'inc/init.php'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;require_once&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;DOKU_INC&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="s1"&gt;'inc/common.php'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;require_once&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;DOKU_INC&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="s1"&gt;'inc/parserutils.php'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nv"&gt;$source&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;stream_get_contents&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;STDIN&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nv"&gt;$info&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;array&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nx"&gt;p_render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'xhtml'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;p_get_instructions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$source&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="nv"&gt;$info&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="x"&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;en &lt;code&gt;dokuwiki\bin&lt;/code&gt; y tener &lt;code&gt;php&lt;/code&gt; en el &lt;code&gt;PATH&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Para ejecutarlo, solo tenes que llamarlo, con el &lt;code&gt;input.txt&lt;/code&gt; y &lt;code&gt;output.html&lt;/code&gt; que quieras. Ejemplo:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;php path/a/dokuwiki/bin/dokucli.php &amp;lt; input.txt &amp;gt; output.html
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Fuente: &lt;a href="http://www.dokuwiki.org/tips:dokuwiki_parser_cli"&gt;Dokuwiki Tips&lt;/a&gt;&lt;/p&gt;</description><category>dokuwiki</category><category>php</category><category>code</category><guid>http://blog.aquinzi.com/./es/dokuwiki-a-html/</guid><pubDate>Sat, 11 Jun 2011 00:00:00 GMT</pubDate></item></channel></rss>