<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Base-Art / Utils</title>
<link>http://base-art.net</link>
<description>Phil's blog</description>
<language>en</language>
<copyright>The contents of this blog are available for non-commercial use only.</copyright>
<generator>Alinea http://pythonfr.org/alinea/</generator>





<item>
<title>SubveRSSed 1.0</title>
<link>http://base-art.net/Articles/46/</link>
<guid isPermaLink="true">http://base-art.net/Articles/46/</guid>
<description><![CDATA[
&lt;p&gt;I previously introduced a Subversion &lt;a class="reference" href="http://base-art.net/wk/Article/18.html"&gt;post-commit hook&lt;/a&gt; to generate RSS feeds based on commits. But the generated feeds were not that smart. &lt;a class="reference" href="http://svn.pythonfr.org/public/pythonfr/utils/subversion/subverssed.py"&gt;SubveRSSed&lt;/a&gt; 1.0 now handle RSS 1.0 feeds ! The next step will probably be Atom.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;update (05/08/10)&lt;/strong&gt; : SubveRSSed 1.1 has a great speed improvement since i dropped the &amp;quot;full RSS feed&amp;quot; support.&lt;/p&gt;

]]></description>
<dc:creator>Philippe Normand</dc:creator>
<dc:date>2005-04-26T10:52:22Z</dc:date>
</item>


<item>
<title>Cheetah templates overriding</title>
<link>http://base-art.net/Articles/44/</link>
<guid isPermaLink="true">http://base-art.net/Articles/44/</guid>
<description><![CDATA[
&lt;p&gt;&lt;a class="reference" href="http://cheetahtemplate.org/"&gt;Cheetah&lt;/a&gt; is a very good templating language, especially because it's
the one (correct me if i'm wrong) to apply the Object-Oriented model
to Documents. It can seem a bit weird at the beginning but when you get
used to it, you can't live without it :-)&lt;/p&gt;
&lt;p&gt;So, i was looking for a good way to overload template parts without
pain, here is how (couldn't find the trick on Cheetah doc):&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;Assume you have a template &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Package/Page.tmpl&lt;/span&gt;&lt;/tt&gt; like that:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
#def footer
  This is my foot !
#end def
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Create a &lt;tt class="literal"&gt;&lt;span class="pre"&gt;Page_custom.tmpl&lt;/span&gt;&lt;/tt&gt; template:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
#extends Package.Page

#def footer
  $Page.footer($self) Where's my mind ? (dixit the Pixies)
#end def
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;You need to put a &lt;tt class="literal"&gt;&lt;span class="pre"&gt;self&lt;/span&gt;&lt;/tt&gt; variable in the template's searchList
which is the Cheetah template instance itself :-)&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I don't think that trick will work if you don't compile your templates
to Python code.&lt;/p&gt;

]]></description>
<dc:creator>Philippe Normand</dc:creator>
<dc:date>2005-03-22T08:01:25Z</dc:date>
</item>


<item>
<title>EFL tools in Python ?</title>
<link>http://base-art.net/Articles/42/</link>
<guid isPermaLink="true">http://base-art.net/Articles/42/</guid>
<description><![CDATA[
&lt;p&gt;Just noticed an &lt;a class="reference" href="http://code-monkey.de/code/anEdjeCompilerInRuby.html"&gt;edje compiler in Ruby&lt;/a&gt;. That'd be fun to design graphical E17 stuff in Python too :-)&lt;/p&gt;

]]></description>
<dc:creator>Philippe Normand</dc:creator>
<dc:date>2005-03-10T10:17:16Z</dc:date>
</item>


<item>
<title>Inserting legend in images using PIL</title>
<link>http://base-art.net/Articles/30/</link>
<guid isPermaLink="true">http://base-art.net/Articles/30/</guid>
<description><![CDATA[
&lt;p&gt;I wanted to insert legends directly in images instead of displaying them below respective images. ImageMagick can do that (Text directive) but it's not smart enough to make the legend &lt;em&gt;always&lt;/em&gt; visible, even in dark images (if the legend color is black). So i used this &lt;a class="reference" href="http://svn.pythonfr.org/public/pythonfr/utils/misc/annotateImage.py"&gt;script&lt;/a&gt; to accomplish that task. Legend is inserted at the bottom of the image, in a little black bordered box. Advice: use &lt;a class="reference" href="http://effbot.org/pil/pilfonts.zip"&gt;pilfonts&lt;/a&gt; because default font is a bit small :-)&lt;/p&gt;
&lt;p&gt;Here is a sample output:&lt;/p&gt;
&lt;p&gt;&lt;img align="center" alt="http://base-art.net/static/sample.png" src="http://base-art.net/static/sample.png" /&gt;&lt;/p&gt;

]]></description>
<dc:creator>Philippe Normand</dc:creator>
<dc:date>2005-02-09T09:37:00Z</dc:date>
</item>


<item>
<title>progressCopy</title>
<link>http://base-art.net/Articles/26/</link>
<guid isPermaLink="true">http://base-art.net/Articles/26/</guid>
<description><![CDATA[
&lt;p&gt;I use to deal with large files under the console (copying iso images, videos) but cp doesn't display much informations. Few days ago i read &lt;a class="reference" href="http://www.mechanicalcat.net/richard/log/Python/Progress_display"&gt;a post from Richard Jones&lt;/a&gt; who wrote a very nice iterator aimed to display ETA informations about tasks on the console. So, here comes &lt;a class="reference" href="http://svn.pythonfr.org/public/pythonfr/utils/misc/progressCopy.py"&gt;progressCopy.py&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Though it's not as powerfull as GNU CP, it performs everyday tasks like copying, moving files or directories around with ETA informations :) Enjoy the console !&lt;/p&gt;

]]></description>
<dc:creator>Philippe Normand</dc:creator>
<dc:date>2004-12-19T17:07:54Z</dc:date>
</item>


<item>
<title>Database replicata</title>
<link>http://base-art.net/Articles/20/</link>
<guid isPermaLink="true">http://base-art.net/Articles/20/</guid>
<description><![CDATA[
&lt;p&gt;I'm having few issues with the db (sqlite powered) behind this blog. So it's necessary to migrate it to another DBMS (like PostgreSQL). The problem is that SQLite is a bit too light :) Fortunately, &lt;a class="reference" href="http://base-art.net/wk/Article/4.html"&gt;Alinea&lt;/a&gt; is using &lt;a class="reference" href="http://sqlobject.org"&gt;SQLObject&lt;/a&gt; to manage its database. So migration is trivial and can be done using a little &lt;a class="reference" href="http://svn.pythonfr.org/public/alinea/tools/DBCo.py"&gt;script&lt;/a&gt; which takes two db URIs and handle the data replication from a db to another.&lt;/p&gt;

]]></description>
<dc:creator>Philippe Normand</dc:creator>
<dc:date>2004-10-06T10:40:29Z</dc:date>
</item>


<item>
<title>Bringing RSS to SVN</title>
<link>http://base-art.net/Articles/18/</link>
<guid isPermaLink="true">http://base-art.net/Articles/18/</guid>
<description><![CDATA[
&lt;p&gt;About one week ago, Aaron Brady posted a svnstatus.py script which
displays an SVN repository version history in an HTML document. I
liked it and wanted to use it as a post-commit hook script for the
&lt;a class="reference" href="http://xmlobject.base-art.net"&gt;XMLObject&lt;/a&gt; SVN repository. But svnstatus is not optimal at all. If you
want to periodically build a static HTML file it's ok. The problem, if
you want to use it in post-commit hook is that it rebuilds the file
for each commit, which turns to be really CPU hungry.&lt;/p&gt;
&lt;p&gt;That's why i wrote &lt;a class="reference" href="http://svn.pythonfr.org/public/pythonfr/utils/subversion/subverssed.py"&gt;SubveRSSed.py&lt;/a&gt;. SubveRSSed incrementally builds an
RSS feed containing the commit history of a SVN Repository. Then an
HTML document is built based upon the RSS feed. This approach has many
advantages:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;post-commit hook friendly :)&lt;/li&gt;
&lt;li&gt;the RSS can be made available for aggregators and people can monitor
the activity/vitality of a repository&lt;/li&gt;
&lt;li&gt;the history can still be consulted via the HTML document, if you
don't like aggregators nor RSS ;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But there is one issue thought, the RSS accumulates all revisions, so it can grow enormously. I think i'll make 2 feeds, one complete and one with the 20 latest revisions .. So SubverRSSed will evolve, may be in the &lt;a class="reference" href="http://svn.pythonfr.org/"&gt;PythonFR&lt;/a&gt; SVN repository :-)&lt;/p&gt;
&lt;p&gt;BTW, many thanks to Aaron for svnstatus from which SubveRSSed used
some functions and embedded CSS.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;update&lt;/strong&gt;: the script now handles 2 RSS feeds as described above :)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;update2&lt;/strong&gt; :  check out SubveRSSed at this &lt;a class="reference" href="http://svn.pythonfr.org/public/pythonfr/utils/subversion/subverssed.py"&gt;url&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;update3(2005/05/05)&lt;/strong&gt; : There's a more recent &lt;a class="reference" href="http://base-art.net/Articles/46/"&gt;post&lt;/a&gt; about this script.&lt;/p&gt;

]]></description>
<dc:creator>Philippe Normand</dc:creator>
<dc:date>2004-09-17T07:05:01Z</dc:date>
</item>


<item>
<title>When IMAP lags with big folders</title>
<link>http://base-art.net/Articles/3/</link>
<guid isPermaLink="true">http://base-art.net/Articles/3/</guid>
<description><![CDATA[
&lt;p&gt;I'm using mutt to read my mail through IMAP4_SSL... But currently it lacks of a cache system, so dealing with big folders (~2000) is quite hard for it.&lt;/p&gt;
&lt;p&gt;That's why I hacked an archive utility script to better fit with my needs. The original one is &lt;a class="reference" href="http://gray.mine.nu/maildirarchive/mdirarchive-0.1.py"&gt;here&lt;/a&gt;. The purpose is to move old mails on subtrees of the folder we want to archive, sorted by month.&lt;/p&gt;
&lt;p&gt;I mainly added an option relating mail dates comparisons. So now there are two possibilities :&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;believe IMAP dates (appearing as timestamps in beginning of mail filenames) (default behavior)&lt;/li&gt;
&lt;li&gt;believe &lt;cite&gt;Date:&lt;/cite&gt; Mail header (-m option)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Use-case :)&lt;/p&gt;
&lt;pre class="literal-block"&gt;
$ ./mdirarchive.py -m respyre
$ tree ~/Maildir/.respyre* -L 1
/home/phil/Maildir/.respyre
|-- courierimapacl
|-- courierimapkeywords
|-- courierimapuiddb
|-- cur
|-- new
`-- tmp
/home/phil/Maildir/.respyre.2003-06
|-- cur
|-- new
`-- tmp
/home/phil/Maildir/.respyre.2003-09
|-- cur
|-- new
`-- tmp
/home/phil/Maildir/.respyre.2003-10
|-- cur
|-- new
`-- tmp
&lt;/pre&gt;
&lt;p&gt;There is now a subfolder per month. Check script online help for more options.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference" href="/static/mdirarchive.py"&gt;Download&lt;/a&gt;&lt;/p&gt;

]]></description>
<dc:creator>Philippe Normand</dc:creator>
<dc:date>2004-04-17T18:50:12Z</dc:date>
</item>



</channel>
</rss>