archives/2008/08 StyXman's glob http://grulicueva.homelinux.net/~mdione/glob//archives/2008/08/ StyXman's glob ikiwiki 2009-11-13T20:06:57Z directive http://grulicueva.homelinux.net/~mdione/glob//ikiwiki/directive/ 2009-11-13T20:06:57Z 2008-08-28T17:06:55Z <p>Directives are similar to a <a href="http://grulicueva.homelinux.net/~mdione/glob//archives/2008/08/../../../ikiwiki/wikilink/">WikiLink</a> in form, except they begin with <code>!</code> and may contain parameters. The general form is:</p> <pre> <code>[[!directive param="value" param="value"]] </code> </pre> <p>This gets expanded before the rest of the page is processed, and can be used to transform the page in various ways.</p> <p>The quotes around values can be omitted if the value is a simple word. Also, some directives may use parameters without values, for example:</p> <pre> <code>[[!tag foo]] </code> </pre> <p>A directive does not need to all be on one line, it can be wrapped to multiple lines if you like:</p> <pre> <code>[[!directive foo="baldersnatch" bar="supercalifragilisticexpialidocious" baz=11]] </code> </pre> <p>Also, multiple lines of <em>quoted</em> text can be used for a value. To allow quote marks inside the quoted text, delimit the block of text with triple-quotes:</p> <pre> <code>[[!directive text=""" 1. "foo" 2. "bar" 3. "baz" """]] </code> </pre> <p>ikiwiki also has an older syntax for directives, which requires a space in directives to distinguish them from <a href="http://grulicueva.homelinux.net/~mdione/glob//archives/2008/08/../../../ikiwiki/wikilink/">wikilinks</a>. This syntax has several disadvantages: it requires a space after directives with no parameters (such as <code>[[pagecount ]]</code>), and it prohibits spaces in <a href="http://grulicueva.homelinux.net/~mdione/glob//archives/2008/08/../../../ikiwiki/wikilink/">wikilinks</a>. ikiwiki now provides the <code>!</code>-prefixed syntax shown above as default. However, ikiwiki still supports wikis using the older syntax, if the <code>prefix_directives</code> option is disabled.</p> jornadas-en-pagina12 http://grulicueva.homelinux.net/~mdione/glob//posts/jornadas-en-pagina12/ 2009-01-22T04:24:04Z 2008-08-24T15:33:13Z <p><a href= "http://www.juanjoconti.com.ar/2008/08/24/jornadas-regionales-de-software-libre-en-pagian-12/"> Juanjo</a> nos cuenta que hay un resumen de las Jornadas Regionales (a las que no fui, lo siento Facu) en Página/12. Yo me tomé un minutito más y los busqué (y encontré) <a href= "http://www.pagina12.com.ar/diario/suplementos/espectaculos/2-11028-2008-08-24.html"> online</a>.</p> packaging-python-in-debian http://grulicueva.homelinux.net/~mdione/glob//posts/packaging-python-in-debian/ 2009-01-22T04:24:04Z 2008-08-23T20:31:01Z <p>Just a note: from now on some posts will be in English. I just want to make sure some of them are worlwide readable.</p> <p>During <a href="http://grulicueva.homelinux.net/~mdione/glob//archives/2008/08/../../../posts/debconf8/">DebConf8</a> I met John Wright, who works in HP. He packages a couple of python things, like <code>trac-mercurial</code> (currently in sid only), and he offered to teach me how to package python things.</p> <p>I've been trying to do that for a couple of years, but <a href= "http://www.debian.org/doc/packaging-manuals/python-policy/">Debian's Python Policy</a> is just too much for me. Call me lazy, $DEITY knows I know I am, but I just can't cope with so much and dense info.</p> <p>So, I tried to look for automatical tools to do it. Two years ago the only thing I could find was (WARNING: ugly colors ahead) <a href="http://packer.sourceforge.net/"><code>packer</code></a>, but its vitality is rather low: according to FreshMeat, it was added on Dec 2005 and last updated on Feb 2006. I started using it, but its interface is not very good, so realeasing further versions was not an easy task. Also, I think now it's very out-of-date to Debian Policy.</p> <p>This week I tried again, now trying to find something that could use either <code>python-support</code> or <code>python-central</code> to manage the python package, and also that it used the info from <code>setuptool</code>'s <code>setup.py</code>, but I only could find some incomplete tutorials.</p> <p>So John explained it to me. It really comes down to using <code>dh_make</code>, the starting point of <code>debhelper</code>. Before you run it you have to make sure everything's in place for it. That means to put the code in a directory which name is the name of the program, followed by a dash, followed by the version, like <code>psync-0.4.1</code>.</p> <p>Now you just run <code>dh_make --createorig</code>, who asks what kind of package you're about to build. Normaly a 'single binary' is enough. It will show you some info it has gathered from your environment, about who you are and what package you're building. This will also create a <code>.orig</code> directory in the parent directory (making if a sibling of the current one) from the current directory, so make sure no cruft goes in. Here is the point were if there is no <code>setup.py</code> file, you just add it with <a href= "http://peak.telecommunity.com/DevCenter/setuptools">the proper info</a>.</p> <p>This creates the <code>debian</code> directory with a lot of files on it. Those who already read about Debian packaging will find familiar files. If you're not, the best way to figuring out what goes where is the proper Debian Policy.</p> <p>The first file you have to edit is <a href= "http://www.debian.org/doc/manuals/maint-guide/ch-dreq.en.html#s-control"> <code>control</code></a>; just make sure that you add <code>python</code> and <code>python-support</code> as BuildDeps and <code>${python:Depends}</code> as Deps.</p> <p>The <a href= "http://www.debian.org/doc/manuals/maint-guide/ch-dreq.en.html#s-rules"> <code>rules</code></a> file is a little more complicated. It's a <code>Makefile</code> with several targets. <code>configure</code> must have the commands needed to configure the project prior to building it. Most python programs don't need this or the next one, which is the <code>build</code> target. This one obviously should have the commands needed to build the program. The third one is <code>clean</code>, where you usualy just neet to replace the boilerplate <code>$(MAKE) clean</code> with <code>python setup.py clean</code>. The <code>install</code> target will need a <code>python setup.py install --prefix=$(CURDIR)/debian/psync/usr</code>. Just check out the <code>$(MAKE)</code> invocation and you'll figure it out.</p> <p>The last one is the <code>binary-arch</code> target. This one has lots of calls to <code>debhelper</code> functions. If you read it carefully, you'll see a <code>dh_python</code> call, commented out. Don't use it, use <code>dh_pysupport</code>. This is the hook for <code>python-support</code> support. This is the part that does all the magic to make sure that you don't break the Debian Python Policy. And that's mostly it. You can comment out a couple of <code>dh_</code> functions, like <code>dh_strip</code> or <code>dh_shlibdeps</code> (shared libs deps).</p> <p>Another file to edit, and this might be the last one, is <a href="http://www.debian.org/doc/manuals/maint-guide/ch-dreq.en.html#s-changelog"> <code>changelog</code></a>. This one has a particular format, so I suggest to use <code>dch</code> from the <code>devscripts</code> package. The one you'll find is a template the <code>dh_make</code> left for you to fill. You just need to put the bug number of the <a href="http://www.debian.org/devel/wnpp/being_packaged">ITP</a> bug. What, you haven't send an ITP but yet? Well, <a href= "http://www.debian.org/devel/wnpp/#l1">do it</a>! Then you can use <code>dch -a</code> to add new entries to the current version's entries, <code>dch -i</code> to increment the Debian version and maybe <code>dch -r</code> to update the date at the bottom of the current version. See its manpage for further options.</p> <p>Last, there is some junk in the <code>debian</code> directory, most of them the <code>*.ex</code> files, which are just examples. You can safely get rid of them, or read them to see if they suit you.</p> <p>The next step is to build it. This is as easy-peasy as running <code>dpkg-buildpackage</code>. This will build a <code>.deb</code> file, a <code>.dsc</code> file, a <code>.orig.tar.gz</code> file, a <code>.diff.gz</code> and a <code>.changes</code> file in the parent directory. This is the outcome of all the work you've done so far, but is not finished yet. You better run <code>lintian</code> on the <code>.dsc</code> file and the <code>.deb</code> file. If you add the <code>-i</code> option you'll get some explanation on why you failed to give a proper, no-lint package.</p> <p>So, that's it. It's a longish post, but should get you up packaging python apps in a few minutes. The are still a few problems: you end up dup'ing info: in the <code>setup.py</code> file and in various files in the <code>debian</code> directory. Maybe I'll hack something to workaround this.</p> <p><a href="http://grulicueva.homelinux.net/~mdione/glob//archives/2008/08/../../../tags/debian/">debian</a> <a href="http://grulicueva.homelinux.net/~mdione/glob//archives/2008/08/../../../tags/python/">python</a></p> search-bg.gif http://grulicueva.homelinux.net/~mdione/glob//wikiicons/search-bg.gif 2009-11-13T20:06:57Z 2008-08-14T22:15:07Z openstreetmap-update http://grulicueva.homelinux.net/~mdione/glob//posts/openstreetmap-update/ 2009-01-22T04:24:04Z 2008-08-02T16:40:17Z <p>De acuerdo a <a href= "http://wiki.openstreetmap.org/index.php/FAQ#I_have_just_made_some_changes_to_the_map._How_do_I_get_to_see_my_changes.3F"> la FAQ</a>, los mapas se actualizan los miércoles. Habrá que esperar...</p> <p><a href="http://grulicueva.homelinux.net/~mdione/glob//archives/2008/08/../../../tags/openstreetmap/">openstreetmap</a></p> openstreetmap http://grulicueva.homelinux.net/~mdione/glob//tags/openstreetmap/ 2009-01-22T04:24:04Z 2008-08-02T06:33:52Z <div class="inlinepage"> <div class="inlineheader"> <p><span class="header"><a href="http://grulicueva.homelinux.net/~mdione/glob//archives/2008/08/../../../posts/openstreetmap-update/">openstreetmap-update</a></span></p> </div> <div class="inlinecontent"> <p>De acuerdo a <a href= "http://wiki.openstreetmap.org/index.php/FAQ#I_have_just_made_some_changes_to_the_map._How_do_I_get_to_see_my_changes.3F"> la FAQ</a>, los mapas se actualizan los miércoles. Habrá que esperar...</p> <p><a href="http://grulicueva.homelinux.net/~mdione/glob//archives/2008/08/../../../tags/openstreetmap/">openstreetmap</a></p> </div> <div class="inlinefooter"> <p><span class="pagedate">Posted <span class="date">Sat 02 Aug 2008 06:40:17 PM CEST</span></span></p> <p><span class="tags">Tags:</span></p> <p><span class="tags"><a href="http://grulicueva.homelinux.net/~mdione/glob//archives/2008/08/../../../tags/openstreetmap/" rel= "tag">openstreetmap</a></span></p> </div> </div> <div class="inlinepage"> <div class="inlineheader"> <p><span class="header"><a href="http://grulicueva.homelinux.net/~mdione/glob//archives/2008/08/../../../posts/openstreetmap/">openstreetmap</a></span></p> </div> <div class="inlinecontent"> <p>Map Junkie. Ése es el título que me corresponde por haber estado más de 5 horas culo en silla agregando calles, avenidas y otras sarazas al <a href= "http://www.openstreetmap.org/?lat=-31.3826&amp;lon=-64.2082&amp;zoom=12&amp;layers=B00FTF"> </a><a href="http://grulicueva.homelinux.net/~mdione/glob//archives/2008/08/../../../tags/openstreetmap/">OpenStreetMap</a> de mi querida ciudad natal. Completé un poco Nueva Córdoba, hice casi toda Ciudad Universitaria y estiré las avenidas que luego se transforman en rutas: Vélez Sarsfield, Colón, Juan B. Justo, Núñez, la ruta 20, Pajas Blancas, y muchas las supercalles/subavenidas de esta ciudad. Hasta hice algunos pedazos de barrios donde me gusta el trazado de calles (nada de esos aburridos cuadriculados, sino más cercano a las callecitas de Europa).</p> <p>¿Cómo hice todo eso sin un GPS y sin mover el culo de la silla? Simple, el sitio tiene un flash applet que te muestra de fondo las fotos satelitales de Yahoo! Y la verdad es que anda muy muy bien, hasta me anduvo en konq4 y todo.</p> <p>Es notable todo lo que conozco de mi ciudad, los pocos nombres de calles que recuerdo (¡Quiero un auto! ¿Nadie tiene uno que le sobre?) y lo muuucho que falta por hacer. El resultado no parece estar disponible ya ya, aunque cuando estás por empezar a usar el applet te advierten que estás editando los datos en vivo. Mañana veremos qué pasa...</p> <p><a href="http://grulicueva.homelinux.net/~mdione/glob//archives/2008/08/../../../tags/openstreetmap/">openstreetmap</a></p> </div> <div class="inlinefooter"> <p><span class="pagedate">Posted <span class="date">Sat 02 Aug 2008 08:33:41 AM CEST</span></span></p> <p><span class="tags">Tags:</span></p> <p><span class="tags"><a href="http://grulicueva.homelinux.net/~mdione/glob//archives/2008/08/../../../tags/openstreetmap/" rel= "tag">openstreetmap</a></span></p> </div> </div> openstreetmap http://grulicueva.homelinux.net/~mdione/glob//posts/openstreetmap/ 2009-01-22T04:24:04Z 2008-08-02T06:33:41Z <p>Map Junkie. Ése es el título que me corresponde por haber estado más de 5 horas culo en silla agregando calles, avenidas y otras sarazas al <a href= "http://www.openstreetmap.org/?lat=-31.3826&amp;lon=-64.2082&amp;zoom=12&amp;layers=B00FTF"> OpenStreetMap</a> de mi querida ciudad natal. Completé un poco Nueva Córdoba, hice casi toda Ciudad Universitaria y estiré las avenidas que luego se transforman en rutas: Vélez Sarsfield, Colón, Juan B. Justo, Núñez, la ruta 20, Pajas Blancas, y muchas las supercalles/subavenidas de esta ciudad. Hasta hice algunos pedazos de barrios donde me gusta el trazado de calles (nada de esos aburridos cuadriculados, sino más cercano a las callecitas de Europa).</p> <p>¿Cómo hice todo eso sin un GPS y sin mover el culo de la silla? Simple, el sitio tiene un flash applet que te muestra de fondo las fotos satelitales de Yahoo! Y la verdad es que anda muy muy bien, hasta me anduvo en konq4 y todo.</p> <p>Es notable todo lo que conozco de mi ciudad, los pocos nombres de calles que recuerdo (¡Quiero un auto! ¿Nadie tiene uno que le sobre?) y lo muuucho que falta por hacer. El resultado no parece estar disponible ya ya, aunque cuando estás por empezar a usar el applet te advierten que estás editando los datos en vivo. Mañana veremos qué pasa...</p> <p><a href="http://grulicueva.homelinux.net/~mdione/glob//archives/2008/08/../../../tags/openstreetmap/">openstreetmap</a></p>