I use moinmoin for my main web site since 2007 and moved my blog engine to pyblosxom (the old one was powered by wordpress) since april 2011. While moving to pyblosxom I wrote an entry parser in order to write my posts using moinmoin wiki syntax.

As one can notice, most of my posts use http://www.wikipedia.org as reference. By the time, linking to wikipedia notices' become quite painfull. In fact, I had type the full URL to the wikipedia notice. So I decided to write a simple macro LinkToWiki to ease the linking procedure to wikipedia notices' either on by blog or my web site.

To use this macro, just drop it in the macro folder of moinmoin and use <<LinkToWiki(notice,label,lang)>> to create links...

For example, <<LinkToWiki(wikipedia,Wikipedia,en)>> creates the link http://en.wikiepdia.org/wikipedia which is displayed as Wikipedia.

Moreover, the macro is quite flexible. In fact, it can be customized using:

  • notice: wikipedia notice. It is mandatory.
  • label: is the name of the link. It's also displayed when the cursor is over it. If omited, notice is used.

  • lang: wikipedia language(en for english, fr for french etc.). If missing, french is used.

C'est fait. Depuis le temps que je m'étais lancé dans la migration du moteur de blog actuel (wordpress) vers quelque chose de plus simple, c'est maintenant chose faite. L'ensemble des posts et les commentaires ont été migrés sous pyblosxom.

Cette migration longue (elle a duré plusieurs mois) m'a permis d'apprendre à programmer en python et comprendre CSS et HTML.

Python parce que le pyblosxom est écrit en python, tout comme moinmoin. La version de pyblosxom (1.5 rc-2) contient quelques bugs, nottament dans la gestion des previews AJAX des commentaires. Il a fallu les corriger (le patch a été posté sur le bug tracker. Je voulais également continuer à utiliser la syntaxe de moinmoin pour écrire mes posts. Or, il n'existait pas de parser, donc, j'ai dû en écrire moinmoin.py un.

HTML et CSS car pour réutiliser le thème Moniker du site principal, il fallait comprendre CSS et HTML et l'adopter afin que le thème fonctionne correctement avec pyblosxom. Le code n'est pas propre, mais est disponible.

Enfin, la migration des posts de wordpress vers pyblosxom s'est faite par le script wp-to-pyblosxom.

Il reste encore à remettre le tout au propre et faire la documentation...