<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>dm's technical weblog</title>
    <link>http://parenchym.com/pymblog/</link>
    <description>Musings about Parenchym and day-to-day work</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.5.5 - http://www.s9y.org/</generator>
    <pubDate>Thu, 02 Jun 2011 11:44:03 GMT</pubDate>

    <image>
        <url>http://parenchym.com/pymblog/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: dm's technical weblog - Musings about Parenchym and day-to-day work</title>
        <link>http://parenchym.com/pymblog/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Learning Pyramid: 1// Installation</title>
    <link>http://parenchym.com/pymblog/index.php?/archives/326-Learning-Pyramid-1-Installation.html</link>
            <category>HowTo</category>
            <category>Programming</category>
            <category>Pyramid</category>
            <category>Python</category>
            <category>Tutorial</category>
            <category>WebDev</category>
    
    <comments>http://parenchym.com/pymblog/index.php?/archives/326-Learning-Pyramid-1-Installation.html#comments</comments>
    <wfw:comment>http://parenchym.com/pymblog/wfwcomment.php?cid=326</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://parenchym.com/pymblog/rss.php?version=2.0&amp;type=comments&amp;cid=326</wfw:commentRss>
    

    <author>nospam@example.com (Dirk Makowski)</author>
    <content:encoded>
    &lt;p&gt;Use &lt;tt&gt;virtualenv&lt;/tt&gt; and &lt;tt&gt;virtualenvwrapper&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Put this into &lt;tt&gt;~/.bashrc&lt;/tt&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;
# virtualenv
export WORKON_HOME=$HOME/myprojects
source /etc/bash_completion.d/virtualenvwrapper
&lt;/pre&gt;

&lt;p&gt;Create a virtual environment with&lt;/p&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;
mkvirtualenv $ENV
workon $ENV
cdvirtualenv
&lt;/pre&gt;

&lt;p&gt;Install Pyramid and other eggs:&lt;/p&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;
pip install --upgrade distribute
pip install pyramid
pip install pyramid_openid pyramid_beaker
&lt;/pre&gt;

&lt;p&gt;Create a Pyramid project&lt;/p&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;
# Traversal, no DB
bin/paster create -t pyramid_starter $PROJECT
cd $PROJECT
which python # check whether virtualenv is correctly installed
which paster
python setup.py develop # create development environment
# Run tests
python setup.py test -q
pip install nose coverage
nosetests --cover-package=$PROJECT --cover-erase --with-coverage
&lt;/pre&gt;

&lt;p&gt;Start server:&lt;/p&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;
cd $PROJECT
paster serve development.ini --reload
&lt;/pre&gt; 
    </content:encoded>

    <pubDate>Thu, 02 Jun 2011 11:50:13 +0200</pubDate>
    <guid isPermaLink="false">http://parenchym.com/pymblog/index.php?/archives/326-guid.html</guid>
    
</item>
<item>
    <title>Parallel processing batches of images with ImageMagick, reconsidered</title>
    <link>http://parenchym.com/pymblog/index.php?/archives/325-Parallel-processing-batches-of-images-with-ImageMagick,-reconsidered.html</link>
            <category>tech</category>
    
    <comments>http://parenchym.com/pymblog/index.php?/archives/325-Parallel-processing-batches-of-images-with-ImageMagick,-reconsidered.html#comments</comments>
    <wfw:comment>http://parenchym.com/pymblog/wfwcomment.php?cid=325</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://parenchym.com/pymblog/rss.php?version=2.0&amp;type=comments&amp;cid=325</wfw:commentRss>
    

    <author>nospam@example.com (Dirk Makowski)</author>
    <content:encoded>
    &lt;p&gt;Recently I showed some bash scripts to process images with ImageMagick in parallel. Boy, was I astonished when I read more about &lt;a href=&quot;http://www.gnu.org/software/parallel/&quot; title=&quot;GNU parallel&quot;&gt;GNUs &quot;parallel&quot;&lt;/a&gt; command: It does not only scale perfectly on all CPUs and all cores, it also can use several machines via the network.&lt;/p&gt;
&lt;p&gt;The task to scale down all photographs can be condensed into this simple command line:&lt;/p&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;
1024$ ls ../all/*.JPG | parallel convert {} -resize 1024x1024 {/.}_preview.jpg
&lt;/pre&gt;
&lt;p&gt;See also the great comments to &lt;a href=&quot;http://psung.blogspot.com/2010/08/gnu-parallel.html&quot;&gt;this blog entry about &quot;parallel&quot;&lt;/a&gt;. 
    </content:encoded>

    <pubDate>Mon, 02 May 2011 13:10:08 +0200</pubDate>
    <guid isPermaLink="false">http://parenchym.com/pymblog/index.php?/archives/325-guid.html</guid>
    
</item>
<item>
    <title>Parallel processing batches of images with ImageMagick</title>
    <link>http://parenchym.com/pymblog/index.php?/archives/324-Parallel-processing-batches-of-images-with-ImageMagick.html</link>
            <category>tech</category>
    
    <comments>http://parenchym.com/pymblog/index.php?/archives/324-Parallel-processing-batches-of-images-with-ImageMagick.html#comments</comments>
    <wfw:comment>http://parenchym.com/pymblog/wfwcomment.php?cid=324</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://parenchym.com/pymblog/rss.php?version=2.0&amp;type=comments&amp;cid=324</wfw:commentRss>
    

    <author>nospam@example.com (Dirk Makowski)</author>
    <content:encoded>
    &lt;p&gt;From my recent holiday trip to Lanzarote I brought back nearly 600 photographs.
When I reviewed them, it became quite clear that my picture-taking skills are not
&lt;em&gt;that&lt;/em&gt; impressive and most of the images, if not all, need some kind of retouching,
most notably, adjusting the white-balance.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;http://www.gimp.org&quot; title=&quot;The Gimp&quot;&gt;Gimp&lt;/a&gt; becomes more and more my friend, but processing all of the photographs
manually would rather quickly wear out my mouse arm and index finger. Some kind of
scripting would be nice here, as scripts also can be kept for later reference on what
I did.&lt;/p&gt;
 &lt;br /&gt;&lt;a href=&quot;http://parenchym.com/pymblog/index.php?/archives/324-Parallel-processing-batches-of-images-with-ImageMagick.html#extended&quot;&gt;Continue reading &quot;Parallel processing batches of images with ImageMagick&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 29 Apr 2011 14:07:03 +0200</pubDate>
    <guid isPermaLink="false">http://parenchym.com/pymblog/index.php?/archives/324-guid.html</guid>
    
</item>
<item>
    <title>Parenchym 2</title>
    <link>http://parenchym.com/pymblog/index.php?/archives/323-Parenchym-2.html</link>
            <category>Parenchym 2</category>
    
    <comments>http://parenchym.com/pymblog/index.php?/archives/323-Parenchym-2.html#comments</comments>
    <wfw:comment>http://parenchym.com/pymblog/wfwcomment.php?cid=323</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://parenchym.com/pymblog/rss.php?version=2.0&amp;type=comments&amp;cid=323</wfw:commentRss>
    

    <author>nospam@example.com (adm: Dirk Makowski)</author>
    <content:encoded>
    &lt;p&gt;Unter diesem Titel werde ich loser Folge über die Neuentwicklung von Parenchym schreiben. Im Grunde könnte Parenchym wie es ist einfach um neue Funktionen erweitert werden. An manchen Stellen hatte ich meine Ideen jedoch nicht konsequent genug umgesetzt, und diese verdienen eine Vereinfachung. Ausschlaggebender ist jedoch, dass ich in Parenchym die neuen Sprachkonstrukte  wie z.B. Namespaces einführen möchte. Und um alle Klassen in Namensräumen anzuordnen muss ich ohnehin fast den gesamten Code refaktorieren -- und dies scheint mir ein geeigneter Zeitpunkt, auch die architektonischen Änderungen umzusetzen.
&lt;/p&gt;
&lt;p&gt;Natürlich wird der bestehende Zweig von Parenchym noch weiter gepflegt und ausgebaut werden. Parenchym 2 ist zum jetzigen Zeitpunkt nicht viel mehr als eine Studie.
&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Sat, 17 Apr 2010 17:27:51 +0200</pubDate>
    <guid isPermaLink="false">http://parenchym.com/pymblog/index.php?/archives/323-guid.html</guid>
    
</item>
<item>
    <title>Deutsche Ländernamen im PrestaShop</title>
    <link>http://parenchym.com/pymblog/index.php?/archives/322-Deutsche-Laendernamen-im-PrestaShop.html</link>
    
    <comments>http://parenchym.com/pymblog/index.php?/archives/322-Deutsche-Laendernamen-im-PrestaShop.html#comments</comments>
    <wfw:comment>http://parenchym.com/pymblog/wfwcomment.php?cid=322</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://parenchym.com/pymblog/rss.php?version=2.0&amp;type=comments&amp;cid=322</wfw:commentRss>
    

    <author>nospam@example.com (adm: Dirk Makowski)</author>
    <content:encoded>
    &lt;p&gt;Möchte man den PrestaShop in Deutsch installieren, erhält man bei &lt;a href=&quot;http://www.prestashop-deutschland.de/&quot;&gt;prestashop-deutschland.de/&lt;/a&gt; und dem angeschlossenen &lt;a href=&quot;http://www.homepage-community.de/prestashopdeutschland-b9.0/&quot;&gt;Forum&lt;/a&gt; Rat und Hilfe. Auch eine schon eingedeutschte Variante kann man dort herunter laden.
&lt;/p&gt;
&lt;p&gt;Die Namen der Länder sind jedoch noch nicht übersetzt. Man kann zwar die Namen im Backend einzeln selbst übersetzen, aber das war mir zu mühselig.
&lt;/p&gt;
&lt;p&gt;In der Tabelle &quot;ps_country&quot; speichert PrestaShop Informationen wie die interne LänderId (id_country) und den ISO Code. Die Tabelle &quot;ps_country_lang&quot; enthält die übersetzten Namen in verschiedenen Sprachen. Und Tabelle &quot;ps_lang&quot; enthält die Namen der Sprachen.
&lt;/p&gt;
&lt;p&gt;So kann man sich einen Überblick verschaffen:
&lt;/p&gt;
&lt;pre class=&quot;brush: sql&quot;&gt;
SELECT * FROM ps_country c, ps_country_lang cl, ps_lang l WHERE c.id_country=cl.id_country AND cl.id_lang=l.id_lang;
&lt;/pre&gt;

&lt;p&gt;Der aktuelle Datenbestand enthält zwar schon Übersetzungen für deutsch (id_lang=3), aber die Namen sind dennoch englisch. 
&lt;/p&gt;
 &lt;br /&gt;&lt;a href=&quot;http://parenchym.com/pymblog/index.php?/archives/322-Deutsche-Laendernamen-im-PrestaShop.html#extended&quot;&gt;Continue reading &quot;Deutsche Ländernamen im PrestaShop&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 25 Feb 2010 15:54:27 +0100</pubDate>
    <guid isPermaLink="false">http://parenchym.com/pymblog/index.php?/archives/322-guid.html</guid>
    
</item>
<item>
    <title>Finding stuff in multiple files and opening them in gVIM</title>
    <link>http://parenchym.com/pymblog/index.php?/archives/317-Finding-stuff-in-multiple-files-and-opening-them-in-gVIM.html</link>
            <category>tech</category>
    
    <comments>http://parenchym.com/pymblog/index.php?/archives/317-Finding-stuff-in-multiple-files-and-opening-them-in-gVIM.html#comments</comments>
    <wfw:comment>http://parenchym.com/pymblog/wfwcomment.php?cid=317</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://parenchym.com/pymblog/rss.php?version=2.0&amp;type=comments&amp;cid=317</wfw:commentRss>
    

    <author>nospam@example.com ()</author>
    <content:encoded>
    &lt;p&gt;Currently I&#039;m working on some &lt;a href=&quot;http://www.dokuwiki.org/dokuwiki&quot;&gt;DokuWiki&lt;/a&gt; template which is based on the &lt;a href=&quot;http://www.dokuwiki.org/template:arctic?s[]=arctic&quot;&gt;arctic template&lt;/a&gt;. DokuWiki itself scatters the CSS styles in several files like &#039;layout.css&#039;, &#039;design.css etc. The arctic template adds its own bunch of files like &#039;arctic_layout.css&#039;, &#039;arctic_design.css&#039; and so on.
&lt;/p&gt;
&lt;p&gt;Now I needed to change the color of some page element. But where in this plethora of style files is the matching CSS definition? I called upon several good friends to find it.
&lt;/p&gt;
&lt;p&gt;Firstly I fired up &lt;a href=&quot;https://addons.mozilla.org/de/firefox/addon/1843&quot;&gt;FireBug&lt;/a&gt; which nicely showed which CSS classes were applied to that page element. As it turned out, the element was wrapped in a div tag and formatted by a CSS class named &#039;meta&#039;.
&lt;/p&gt;
&lt;p&gt;Fine. Now I need to find the string &quot;div.meta&quot; (or, maybe just &quot;.meta&quot;) in the style files. Of course we know the commands &#039;find&#039; and &#039;grep&#039; will quickly show us the results, but today -- as an additional sugar -- I wanted to open all found files together in the same instance of &lt;a href=&quot;http://www.vim.org/&quot;&gt;gVIM&lt;/a&gt;. Ah this is why I love the command line:
&lt;/p&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;find . -name &#039;*.css&#039; -or -name &#039;*.php&#039; | xargs grep div.meta \
|awk -F: &#039;{print $1;}&#039; |sort -u | xargs gvim&lt;/pre&gt;

&lt;p&gt;Let&#039;s split that command up:

&lt;ol&gt;
	&lt;li&gt;The find command lets us only look into the wanted files. And it does that recursively, if we would need that.&lt;/li&gt;
	&lt;li&gt;With xargs we feed those filenames nicely into grep. And grep prints each line which matches the expression, prepended with the name of the file where the line was found.&lt;/li&gt;
	&lt;li&gt;We are only interested in the filenames, so awk will get them for us: &quot;split the line at colons and print the first column&quot;.&lt;/li&gt;
	&lt;li&gt;Maybe there are more than one matching lines in the same file. Therefore we build an unique list of &#039;em.&lt;/li&gt;
	&lt;li&gt;And lastly, let xargs provide the list as arguments to gVIM&lt;/li&gt;
&lt;/ol&gt;
&lt;/p&gt;

&lt;p&gt;That&#039;s it.&lt;/p&gt;

&lt;p&gt;Well, not quite. &lt;img src=&quot;http://parenchym.com/pymblog/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; DokuWiki allows to use some kind of variables in the CSS files. Consequently, the file which defines the CSS for &#039;div.meta&#039; does not contain the sought color information, but the name of a variable. And this, FINALLY, I can change in the file &#039;style.ini&#039;. Argh.&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Sun, 21 Feb 2010 17:15:44 +0100</pubDate>
    <guid isPermaLink="false">http://parenchym.com/pymblog/index.php?/archives/317-guid.html</guid>
    
</item>
<item>
    <title>Repair grub with grml</title>
    <link>http://parenchym.com/pymblog/index.php?/archives/314-Repair-grub-with-grml.html</link>
            <category>tech</category>
    
    <comments>http://parenchym.com/pymblog/index.php?/archives/314-Repair-grub-with-grml.html#comments</comments>
    <wfw:comment>http://parenchym.com/pymblog/wfwcomment.php?cid=314</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://parenchym.com/pymblog/rss.php?version=2.0&amp;type=comments&amp;cid=314</wfw:commentRss>
    

    <author>nospam@example.com ()</author>
    <content:encoded>
    My development box runs a bleeding edge &lt;a href=&quot;http://www.debian.org/&quot;&gt;Debian&lt;/a&gt; sid installation. One day an update produced the message that &lt;a href=&quot;http://www.gnu.org/software/grub/&quot;&gt;grub&lt;/a&gt; 0.97 is now called &lt;em&gt;grub-legacy&lt;/em&gt; and that it will chainload into the new (extremely bleeding edge) grub 2. Should that work I could run &lt;code&gt;upgrade-from-grub-legacy&lt;/code&gt;.

Well, that sounded nice and I researched what is the status of Grub 2. Almost everybody who wrote about Grub 2 noted, that documentation lacks a lot -- so I won&#039;t reproduce this statement here &lt;img src=&quot;http://parenchym.com/pymblog/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; Fortunately, in the caveat section the draft of the &lt;a href=&quot;http://grub.enbug.org/Manual&quot;&gt;Grub 2 manual&lt;/a&gt; gives the following hint

&lt;blockquote&gt;deb upgrades - In the Debian 5.x and Ubuntu 9.x series, upgrading to GRUB 2 after an an LVM/LVM+crypto installation (under GRUB legacy) will leave you unhappy.&lt;/blockquote&gt;

Hmpf. Made a mental note not to touch above command, because I am using lvm.

But yesterday evening my mental state was kind of unconscious and out of -- whatever it was, that had driven me -- I entered &lt;code&gt;upgrade-from-grub-legacy&lt;/code&gt;. A dialogue asked me which devices Grub 2 shall be installed on and -- @$&quot;&quot;&amp;sect; again without thinking -- I selected both drives.

[Deviation] The computer has two different brands of hard drives drives, an old one and a new one, with different sizes and partitioning. The system used to identify them as &lt;code&gt;/dev/hda&lt;/code&gt; and &lt;code&gt;/dev/sda&lt;/code&gt;. A recent upgrade of the kernel introduced some confusion here, because suddenly the &lt;code&gt;hda&lt;/code&gt; was populated as &lt;code&gt;sdb&lt;/code&gt;! Researching (many thanks to all the people who write about their knowledge) found that the new kernels see &lt;em&gt;all&lt;/em&gt; drives as &quot;sd&quot;. So I changed the fstab and everything worked again. [/Deviation]

Back to Grub 2. The installation and a reboot finished without errors. Null sweat here. But I noticed that the Vista entry in Grub&#039;s menu was missing. So I installed and run &lt;code&gt;os-prober&lt;/code&gt; which found the Vista partition and also produced an entry for the splash screen (which I disliked but accepted). &lt;em&gt;Strangely, it did not list my Linux kernels!&lt;/em&gt; As Whitesnake had put it:

&lt;blockquote&gt;When I first saw you baby
You took my breath away,
I knew your name was Trouble
But, my heart got in the way
I couldn&#039;t stop myself from reaching out,
I could not turn away&lt;/blockquote&gt;

In my case my brain just passed out. I did a reboot.

Great, the Grub menu appeared and an entry for Vista was there. -- BUT IT WAS THE ONLY ONE! Uniqueness might be applicable for certain rings, but certainly it was displeasing for my boot menu. Very!

Hardened from battling with overwritten Lilo boot records in the past, and in the very comforting situation of having a quite recent backup I did not break into sweat. Browsing through the pile of stuff on my desk produced two things, in that order: a disc of &lt;a href=&quot;http://grml.org/&quot;&gt;grml Schluchtenscheisser&lt;/a&gt;, and a grin on my face. 
    </content:encoded>

    <pubDate>Wed, 14 Oct 2009 09:05:39 +0200</pubDate>
    <guid isPermaLink="false">http://parenchym.com/pymblog/index.php?/archives/314-guid.html</guid>
    
</item>
<item>
    <title>Linux Virus Shock?</title>
    <link>http://parenchym.com/pymblog/index.php?/archives/308-Linux-Virus-Shock.html</link>
            <category>tech</category>
    
    <comments>http://parenchym.com/pymblog/index.php?/archives/308-Linux-Virus-Shock.html#comments</comments>
    <wfw:comment>http://parenchym.com/pymblog/wfwcomment.php?cid=308</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://parenchym.com/pymblog/rss.php?version=2.0&amp;type=comments&amp;cid=308</wfw:commentRss>
    

    <author>nospam@example.com ()</author>
    <content:encoded>
    A couple of minutes ago something weird happened on my Linux box: I had been working on some graphics in Gimp and was clicking through the windows when suddenly a song started to play. I was startled, and it lasted only for a few notes and then fell silent again.

My first (paranoid) suspicion was, somehow a virus had pirated my machine or, some hacker was trying out commands in a shell...

Hmm, a &lt;code&gt;less&lt;/code&gt; into &lt;code&gt;/var/log/auth.log&lt;/code&gt; showed nothing suspicious. But then, a capable hacker could have concealed her traces. Unfortunately I had no more ideas about how to find out the source of the song and so I finished the graphics.

When the desktop reappeared after all of Gimp&#039;s windows were closed, I remembered that I had saved that song onto the desktop. And there was another mp3. I wanted to listen to it again and moved the mouse cursor upon its icon, but -- before I could double-click, the song started to play!

Aww, I was tricked by the (new?) Gnome (or Nautilus?) behaviour, to play a sound file immediately when the cursor hovers it. That must have happened when I browsed through Gimp&#039;s windows earlier on! 
    </content:encoded>

    <pubDate>Tue, 23 Jun 2009 18:00:07 +0200</pubDate>
    <guid isPermaLink="false">http://parenchym.com/pymblog/index.php?/archives/308-guid.html</guid>
    
</item>
<item>
    <title>Today's favourite documentation egg</title>
    <link>http://parenchym.com/pymblog/index.php?/archives/294-Todays-favourite-documentation-egg.html</link>
            <category>tech</category>
            <category>Today's favourite...</category>
    
    <comments>http://parenchym.com/pymblog/index.php?/archives/294-Todays-favourite-documentation-egg.html#comments</comments>
    <wfw:comment>http://parenchym.com/pymblog/wfwcomment.php?cid=294</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://parenchym.com/pymblog/rss.php?version=2.0&amp;type=comments&amp;cid=294</wfw:commentRss>
    

    <author>nospam@example.com ()</author>
    <content:encoded>
    &lt;blockquote&gt;:nunmap can also be used outside of a monastery.&lt;/blockquote&gt;

Found in &lt;a href=&quot;http://www.vim.org/&quot;&gt;VIM&lt;/a&gt;&#039;s help, describing the various map commands. 
    </content:encoded>

    <pubDate>Sun, 22 Feb 2009 02:47:01 +0100</pubDate>
    <guid isPermaLink="false">http://parenchym.com/pymblog/index.php?/archives/294-guid.html</guid>
    
</item>
<item>
    <title>What Wikipedia has to do with Star Wars</title>
    <link>http://parenchym.com/pymblog/index.php?/archives/291-What-Wikipedia-has-to-do-with-Star-Wars.html</link>
            <category>general</category>
    
    <comments>http://parenchym.com/pymblog/index.php?/archives/291-What-Wikipedia-has-to-do-with-Star-Wars.html#comments</comments>
    <wfw:comment>http://parenchym.com/pymblog/wfwcomment.php?cid=291</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://parenchym.com/pymblog/rss.php?version=2.0&amp;type=comments&amp;cid=291</wfw:commentRss>
    

    <author>nospam@example.com ()</author>
    <content:encoded>
    Hmm, what an interesting sight...

[caption id=&quot;attachment_101&quot; align=&quot;aligncenter&quot; width=&quot;300&quot; caption=&quot;Vaderpedia&quot;]&lt;a href=&quot;http://www.annwn.de/blog/wp-content/uploads/2008/12/vaderpedia.jpg&quot;&gt;&lt;img src=&quot;http://www.annwn.de/blog/wp-content/uploads/2008/12/vaderpedia-300x220.jpg&quot; alt=&quot;Vaderpedia&quot; title=&quot;vaderpedia&quot; width=&quot;300&quot; height=&quot;220&quot; class=&quot;size-medium wp-image-101&quot; /&gt;&lt;/a&gt;[/caption] 
    </content:encoded>

    <pubDate>Sat, 27 Dec 2008 18:11:27 +0100</pubDate>
    <guid isPermaLink="false">http://parenchym.com/pymblog/index.php?/archives/291-guid.html</guid>
    
</item>
<item>
    <title>Microsoft Outlook Security -- WTF?</title>
    <link>http://parenchym.com/pymblog/index.php?/archives/282-Microsoft-Outlook-Security-WTF.html</link>
            <category>tech</category>
    
    <comments>http://parenchym.com/pymblog/index.php?/archives/282-Microsoft-Outlook-Security-WTF.html#comments</comments>
    <wfw:comment>http://parenchym.com/pymblog/wfwcomment.php?cid=282</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://parenchym.com/pymblog/rss.php?version=2.0&amp;type=comments&amp;cid=282</wfw:commentRss>
    

    <author>nospam@example.com ()</author>
    <content:encoded>
    Aus aktuellem Anlass suche ich im Internet nach Informationen ueber die Sicherheit der Emailanzeige in Microsoft Outlook. Obwohl ich schon einiges gewoehnt bin von Microsoft, verschlaegt es mir bei folgender Dreistigkeit doch dermassen die Sprache, dass ich entgegen meiner sonstigen Gewohnheit nicht einmal mehr faehig bin, in Englisch zu schreiben.
Doch der Reihe nach. Zunaechst schaute ich bei Google, welche Seiten zum Thema &quot;Outlook Sicherheit&quot; zu finden sind.
&lt;a href=&quot;http://www.annwn.de/blog/wp-content/uploads/2008/12/screen01.png&quot;&gt;&lt;img src=&quot;http://www.annwn.de/blog/wp-content/uploads/2008/12/screen01-150x126.png&quot; alt=&quot;Suchergebnisse&quot; title=&quot;Suchergebnisse&quot; width=&quot;150&quot; height=&quot;126&quot; class=&quot;alignnone size-thumbnail wp-image-86&quot; /&gt;&lt;/a&gt;
Prima, es sind sogar 2 Links zu Artikeln bei Microsoft mit unter den ersten Ergebnissen: &lt;a href=&quot;http://office.microsoft.com/de-de/outlook/HP030799591031.aspx&quot;&gt;1&lt;/a&gt; und &lt;a href=&quot;http://office.microsoft.com/de-de/outlook/CH062556131031.aspx&quot;&gt;2&lt;/a&gt;.
Aber statt zu den erhofften Artikeln fuehren sie lediglich zu dem Hinweis &lt;strong&gt;&quot;Um die optimale Anzeige Ihrer Webseiten zu unterstuetzen, wird ueberprueft, ob ein Programm von 2007 Microsoft Office installiert ist.&quot;&lt;/strong&gt;
Wow. Dass man neuerdings zur Ansicht von Webseiten nicht mehr einen Browser wie Firefox oder auch Microsofts Internet Explorer benoetigt, sondern ein Microsoft Office der neuesten Generation, ist allerdings ein starkes Stueck.
&lt;a href=&quot;http://www.annwn.de/blog/wp-content/uploads/2008/12/screen02.png&quot;&gt;&lt;img src=&quot;http://www.annwn.de/blog/wp-content/uploads/2008/12/screen02-150x69.png&quot; alt=&quot;screen02&quot; title=&quot;screen02&quot; width=&quot;150&quot; height=&quot;69&quot; class=&quot;alignnone size-thumbnail wp-image-87&quot; /&gt;&lt;/a&gt;
Natuerlich surfe ich mit abgeschaltetem JavaScript, das hat jene Seite richtig erkannt, und so klicke ich selbst auf den angebotenen Link, endlich zum erwarteten Artikel zu gelangen.
Aber weit gefehlt! Die folgende Seite bestaetigt, -- nun auf bunte Weise --, dass die Informationen nur fuer Besitzer von MS Office zugaenglich sind, und man wird gleich aufgefordert, die neueste Version zu kaufen.
Ist doch interessant, dass man jedoch diese Webseite ohne JavaScript und auch g&amp;auml;nzlich ohne Microsoft-Programme lesen kann!
&lt;a href=&quot;http://www.annwn.de/blog/wp-content/uploads/2008/12/screen03.jpg&quot;&gt;&lt;img src=&quot;http://www.annwn.de/blog/wp-content/uploads/2008/12/screen03-150x126.jpg&quot; alt=&quot;&quot; title=&quot;screen03&quot; width=&quot;150&quot; height=&quot;126&quot; class=&quot;alignnone size-thumbnail wp-image-91&quot; /&gt;&lt;/a&gt;
(Hervorhebung im Bild von mir.)

Was haben wir gelernt?
&lt;ol&gt;
	&lt;li&gt;Die Aussage &quot;Um die optimale Anzeige Ihrer Webseiten zu unterstuetzen&quot;, dient nur dazu, einen Laien zum Kauf von MS Office zu noetigen. Was ist an der Anzeige der bunten Webseite nicht optimal, ganz ohne Microsoft Programme? -- Abgesehen davon, dass sie nicht den versprochenen Inhalt hat.&lt;/li&gt;
	&lt;li&gt;Informationen zu Office bekommt man von Microsoft offenbar nur, wenn man schon Office gekauft hat. Sich vorab zu informieren oder als unabhaengiger Consultant sich zu informieren, ist ausgeschlossen.&lt;/li&gt;
	&lt;li&gt;Nicht nur wird man zum Kauf von MS Office genoetigt, man muss auch Microsoft erlauben, den eigenen Computer zu durchsuchen! Unser Bundestrojaner wird vor Neid erblassen!&lt;/li&gt;
&lt;/ol&gt;

So, WTF? Eigentlich wollte ich mich nur ueber MS Outlook informieren, um meine Kunden gut unterstuetzen zu koennen, aber was passiert? 2 Stunden verschwendet fuer nichts.
Danke, Microsoft. 
    </content:encoded>

    <pubDate>Tue, 16 Dec 2008 08:19:43 +0100</pubDate>
    <guid isPermaLink="false">http://parenchym.com/pymblog/index.php?/archives/282-guid.html</guid>
    
</item>
<item>
    <title>Parenchym</title>
    <link>http://parenchym.com/pymblog/index.php?/archives/271-Parenchym.html</link>
            <category>tech</category>
    
    <comments>http://parenchym.com/pymblog/index.php?/archives/271-Parenchym.html#comments</comments>
    <wfw:comment>http://parenchym.com/pymblog/wfwcomment.php?cid=271</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://parenchym.com/pymblog/rss.php?version=2.0&amp;type=comments&amp;cid=271</wfw:commentRss>
    

    <author>nospam@example.com ()</author>
    <content:encoded>
    The long planned documentation for my web application framework &lt;a href=&quot;http://parenchym.com/pym/&quot;&gt;Parenchym&lt;/a&gt; is online.

Finally I found a way to describe and present it that suits me right. Since the pages have just started, most of them are in German, but translation into English is under way.
&lt;a href=&quot;http://parenchym.com/pym/&quot;&gt;
http://parenchym.com&lt;/a&gt; 
    </content:encoded>

    <pubDate>Mon, 25 Aug 2008 08:56:47 +0200</pubDate>
    <guid isPermaLink="false">http://parenchym.com/pymblog/index.php?/archives/271-guid.html</guid>
    
</item>
<item>
    <title>My new photoalbum is online</title>
    <link>http://parenchym.com/pymblog/index.php?/archives/270-My-new-photoalbum-is-online.html</link>
            <category>tech</category>
    
    <comments>http://parenchym.com/pymblog/index.php?/archives/270-My-new-photoalbum-is-online.html#comments</comments>
    <wfw:comment>http://parenchym.com/pymblog/wfwcomment.php?cid=270</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://parenchym.com/pymblog/rss.php?version=2.0&amp;type=comments&amp;cid=270</wfw:commentRss>
    

    <author>nospam@example.com ()</author>
    <content:encoded>
    I am happy to announce that Pixy, my new photoalbum is now online.

&lt;a href=&quot;http://parenchym.com/pixy/&quot;&gt;Visit Pixy here&lt;/a&gt; 
    </content:encoded>

    <pubDate>Sun, 03 Aug 2008 13:00:35 +0200</pubDate>
    <guid isPermaLink="false">http://parenchym.com/pymblog/index.php?/archives/270-guid.html</guid>
    
</item>
<item>
    <title>Convert your photo collections into an online album</title>
    <link>http://parenchym.com/pymblog/index.php?/archives/262-Convert-your-photo-collections-into-an-online-album.html</link>
            <category>tech</category>
    
    <comments>http://parenchym.com/pymblog/index.php?/archives/262-Convert-your-photo-collections-into-an-online-album.html#comments</comments>
    <wfw:comment>http://parenchym.com/pymblog/wfwcomment.php?cid=262</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://parenchym.com/pymblog/rss.php?version=2.0&amp;type=comments&amp;cid=262</wfw:commentRss>
    

    <author>nospam@example.com ()</author>
    <content:encoded>
    It has been a long time since I lastly uploaded a new gallery to &lt;a href=&quot;http://www.annwn.de/digipics/index.html&quot;&gt;DigiPics&lt;/a&gt;, my old gallery in The Annwn.
Now, this does not mean, I had not taken any pictures in the meantime. Au contraire, mon capitain!

But how could I handle all those photographs more efficiently? For some picture sets I had made special pages to display them, as you can see in &lt;a href=&quot;http://www.annwn.de/digipics/index.html&quot;&gt;DigiPics&lt;/a&gt;. But I only want to repeat this for special occasions. For now I want a method to process the images, like converting them to suitable sizes for displaying on screen, and show them in some decent album, where the visitior can browse through sets and all of that. Additionally, the EXIF data of the photographs should be displayed, so that one could get an impression how they were taken.

Of course, you could argue, there already are plenty of picture sharing sites. Yeah, what about being techie if I&#039;d use someone else&#039;s program? &lt;img src=&quot;http://parenchym.com/pymblog/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;

What I finally have produced are (1) some scripts to process the images, and (2) a small application to display the albums.

&lt;strong&gt;First, the scripts&lt;/strong&gt;

All scripts (two, in fact) can be installed into Gnome&#039;s file browser Nautilus, so you only have to select the images to process, right-click and select the script from the context menu.

&lt;a href=&quot;http://www.annwn.de/blog/wp-content/uploads/2008/08/nautilus_scripts1.png&quot;&gt;&lt;img src=&quot;http://www.annwn.de/blog/wp-content/uploads/2008/08/nautilus_scripts1-300x179.png&quot; alt=&quot;&quot; title=&quot;nautilus_scripts&quot; width=&quot;300&quot; height=&quot;179&quot; class=&quot;alignnone size-medium wp-image-78&quot; /&gt;&lt;/a&gt;

&lt;tt&gt;create_thumbs&lt;/tt&gt; is a small shell script that resamples the selected images into various sizes, 120px for thumbnails, 640px and 1024px. It also rotates them according to the orientation flag in the EXIF data. Of course, the script relies on external programs to accomplish this, namely &lt;tt&gt;convert&lt;/tt&gt; from ImageMagick, &lt;tt&gt;jhead&lt;/tt&gt; and &lt;tt&gt;jpegtran&lt;/tt&gt;.

&lt;tt&gt;get_exif&lt;/tt&gt; is a Perl script that fetches all EXIF data from the original image and stores in in a separate file. I use Image::ExifTool for this. In a first attempt I used PHP&#039;s EXIF functions, but as it turned out, the Perl lib is better, especially because it interprets the MakerNotes quite nicely.

&lt;a href=&#039;http://www.annwn.de/blog/wp-content/uploads/2008/08/scripts.tgz&#039;&gt;Download the scripts&lt;/a&gt;

&lt;strong&gt;Second, the application&lt;/strong&gt;

With the scripts we produced a nice gallery and now we need some way to display it. &lt;tt&gt;Pixy&lt;/tt&gt; does right this. It is (almost) a single-file PHP script, which borrows some code and ideas from my Web Application Framework Parenchym.

Look inside &lt;tt&gt;pixy.php&lt;/tt&gt; for more information how to set the galleries up.

In the next days I will upload my galleries, so that you can see Pixy live. Maybe I&#039;ll also publish the sources. 
    </content:encoded>

    <pubDate>Sat, 02 Aug 2008 20:26:21 +0200</pubDate>
    <guid isPermaLink="false">http://parenchym.com/pymblog/index.php?/archives/262-guid.html</guid>
    
</item>
<item>
    <title>PHP Madness: Floats, type casts and locales</title>
    <link>http://parenchym.com/pymblog/index.php?/archives/257-PHP-Madness-Floats,-type-casts-and-locales.html</link>
            <category>tech</category>
    
    <comments>http://parenchym.com/pymblog/index.php?/archives/257-PHP-Madness-Floats,-type-casts-and-locales.html#comments</comments>
    <wfw:comment>http://parenchym.com/pymblog/wfwcomment.php?cid=257</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://parenchym.com/pymblog/rss.php?version=2.0&amp;type=comments&amp;cid=257</wfw:commentRss>
    

    <author>nospam@example.com ()</author>
    <content:encoded>
    While working on my framework &lt;a href=&quot;http://www.parenchym.com&quot;&gt;Parenchym&lt;/a&gt;, I encountered the following situation:

In a form a user has to input a floating point value, which will then get processed. After that, the form with the latest input is re-displayed.

Now, Parenchym is very thorough when it comes to checking the user&#039;s input. Not only does it check whether the value is valid or not, it also casts PHP&#039;s internal type to the right one. As you will remember, all input is recieved by PHP as string. So, the user&#039;s float comes in as a string as well, but Parechym converts that to float again.

So far, so good.

Enter the user&#039;s locale. For this examination, we&#039;ll suppose it is set to `de_DE.utf8&#039;.

The first input poses no problem, because the user (which was me, at that time) is used to input floats with a &lt;em&gt;decimal point&lt;/em&gt;. The input of 8.3 enters the script as &quot;8.3&quot; and Parenchym returns it as 8.3. Great.

But the shit hits the fan when the form, and so the float, is displayed again. This time the locale settings strike! The value in the form field is suddenly &quot;8,3&quot;. Mind the &lt;em&gt;decimal comma&lt;/em&gt; here! Submitted again, PHP&#039;s type cast -- completely ignorant of the locale settings -- &lt;strong&gt;truncates the float&lt;/strong&gt;, rendering it as 8! &lt;strong&gt;WTF!&lt;/strong&gt;

Lesson learned today:
&lt;strong&gt;PHP respects locale settings when printing floats, it DOES NOT respect locale settings when doing type casts!&lt;/strong&gt; 
    </content:encoded>

    <pubDate>Thu, 26 Jul 2007 10:17:40 +0200</pubDate>
    <guid isPermaLink="false">http://parenchym.com/pymblog/index.php?/archives/257-guid.html</guid>
    
</item>

</channel>
</rss>
