SansFiltre

Aller au contenu | Aller au menu | Aller à la recherche

Tag - Editeur de texte

Fil des billets - Fil des commentaires

Use the Dotclear wiki syntax in text editors

Since the beginning, Markdown was developed to be used as a text filter for various text editors. I thought that it was probably possible to do the same with wiki2xhtml, the "engine" driving the wiki syntax of Dotclear.

To do this, it is necessary to install PHP 5 locally. The most simple is to trust the specialist of that kind of tools for Mac, Marc Liyanage. The installation is really simple.

Once PHP 5 installed, we need a script to send the text to the engine, and return the result to the text editor.

BBedit

Download the file wiki2xhtml.php.zip, unpack it then move the resulting file wiki2xhtml.php in the folder ~/Library/Application Support/BBEdit/Unix Support/Unix Filters/. You may need to modify line 9 to the location of the file class.wiki2xhtml.php on you machine.

The command will be available in the menu #! -> Unix Filters -> wiki2xhtml.php

TextWrangler

Download the file wiki2xhtml.php.zip, unpack it then move the resulting file wiki2xhtml.php in the folder ~/Library/Application Support/TextWrangler/Unix Support/Unix Filters/. You may need to modify line 9 to the location of the file class.wiki2xhtml.php on you machine.

The command will be available in the menu #! -> Unix Filters -> wiki2xhtml.php

MarsEdit

Download the file wiki2xhtml.zip, unpack it then move the resulting folder wiki2xhtml in the folder ~/Library/Application Support/MarsEdit/TextFilters/. You may need to modify line 9 to the location of the file class.wiki2xhtml.php on you machine.

In the editing windows, click on the Preview button. At the bottom of this windows, you can select wiki2xhtml in the formatting menu.

Update 20090406 : change to the MarsEdit URL. It was about time...

Utiliser la syntaxe wiki de Dotclear dans un éditeur de texte

Depuis ses origines, Markdown a été conçu pour être utilisé comme un filtre avec divers logiciels d'édition. Je me suis dit que la même chose devait être possible avec wiki2xhtml, le "moteur" qui analyse et restitue la syntax wiki de Dotclear.

Pour réaliser celà, il faut d'abord installer PHP 5 sur sa machine. Le plus simple c'est de faire confiance au site de référence pour ce type d'outils, le site de Marc Liyanage. A partir de là, l'installation se fait très simplement.

Une fois PHP 5 installé, il faut installer un script qui va passer le texte à transformer à wiki2xhtml et retourner le résultat de la transformation.

BBedit

Il suffit de télécharger et de décompacter le fichier wiki2xhtml.php.zip, puis de déplacer le fichier résultant wiki2xhtml.php dans le répertoire ~/Library/Application Support/BBEdit/Unix Support/Unix Filters/. Il faudra modifier la ligne 9 en fonction de l'emplacement du fichier class.wiki2xhtml.php sur votre ordinateur.

La commande sera accessible par le menu #! -> Unix Filters -> wiki2xhtml.php

TextWrangler

Il suffit de télécharger et de décompacter le fichier wiki2xhtml.php.zip, puis de déplacer le fichier résultant wiki2xhtml.php dans le répertoire ~/Library/Application Support/TextWrangler/Unix Support/Unix Filters/. Il faudra modifier la ligne 9 en fonction de l'emplacement du fichier class.wiki2xhtml.php sur votre ordinateur.

La commande sera accessible par le menu #! -> Unix Filters -> wiki2xhtml.php

MarsEdit

Il suffit de télécharger et de décompacter le fichier wiki2xhtml.zip, puis de déplacer le dossier résultant wiki2xhtml dans le répertoire ~/Library/Application Support/MarsEdit/TextFilters/. Il faudra modifier la ligne 9 en fonction de l'emplacement du fichier class.wiki2xhtml.php sur votre ordinateur.
MàJ (24/01/2007) : nouvelle version 0.1.1. Corrige des problème de fin de ligne mal interprétés après un copier/coller.

Dans la fenêtre d'édition, cliquez sur le bouton aperçu. En bas de la fenêtre d'aperçu, vous pourrez sélectionner wiki2xhtml dans le menu formatage.