-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Karl,

On 02 May 07 - 14:59, Karl Mowatt-Wilson wrote:
> On 07 Feb 2007, Felix Obenhuber wrote:
> > I've hooked up asciidoc into 3 wikis and i'd like to tell about here.
> ...
> > Ikiwiki is a small and fast wiki compiler which uses markdown as 
> > syntax. The parser plugin interface allows easy integration of other 
> > syntax formats.  40 lines perl module code are enough to get pages 
> > rendered by asciidoc.
> 
> Did you go any further with this?  Is the plugin publishable?

No, I've stopped thinking about due a lots of things to do for my thesis. The
plugin isn't anything else than a simple proof of concept hack - but worked in
my setup.  Refer the Ikiwiki code how to plug that module - I don't remember the
details. You also might place your own options or config files. Here the
defaults are used. Have fun!

- ----
#!/usr/bin/perl
# asciidoc markup language
package IkiWiki::Plugin::asciidoc;

use warnings;
use strict;
use IkiWiki;

sub import {
        hook(type => "htmlize", id => "txt", call => \&htmlize);
}

sub htmlize (@) {
        my [EMAIL PROTECTED];
        my $content = $params{content};
        my $line;


        # or else the other way; run the cmd
        my $pagefile = $config{srcdir} . "/" . $params{page} . ".txt";
        my $adoccmd =  "asciidoc -o - " . $pagefile . "|";
        open(CMD, $adoccmd) or $content = "could not open pipe to asciidoc!\n";
        $content = "";
        foreach $line (<CMD>) {
                $content = $content . $line;
        }
        close(CMD);

        # Workaround for perl bug (#376329)
        $content=Encode::encode_utf8($content);
        $content=Encode::encode_utf8($content);
        $content=Encode::decode_utf8($content);
        $content=Encode::decode_utf8($content);

        return $content;
}
- ----

Let us know about your improvements!

> 
> I'm looking for something to handle static generation of a basic website 
> along with basic blogging.  Ikiwiki looks good for this, but the 
> existing markup formats it has seem to be too simplistic for what I 
> want.

What do you think about the config files the Asciidoc Homepage is generated 
with?

Cheers,

Felix
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGQLfoR7ikofaW1IkRAlhfAJ4sr+KLD5H8+Qn+kjvBEgvPi57/5wCfcFLt
BYxohGA1+mytO1On6InA8rc=
=b7gn
-----END PGP SIGNATURE-----

_______________________________________________
Asciidoc-discuss mailing list
Asciidoc-discuss@metaperl.com
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss

Reply via email to