[H-GEN] Cool stuff: ikiwiki and sputnik

Anthony Towns aj at erisian.com.au
Tue Aug 18 07:33:06 EDT 2009


On Tue, Aug 18, 2009 at 08:11:04PM +1000, Russell Stuart wrote:
> On Tue, 2009-08-18 at 18:52 +1000, Anthony Towns wrote:
> > So anyway, ikiwiki and sputnik! 
> Well, you managed to divert me away from doing useful work for over an
> hour.  I have no idea what is going on under the hood with Sputnik, but
> the end result looks dammed impressive.  It is pity you didn't tell us
> more about your secret recipe for automagically doing syntax colouring

It's no secret, it's a plugin for python markdown:

    http://www.freewisdom.org/projects/python-markdown/CodeHilite

which in turn uses python pygments:

    http://pygments.org/

I did have to package python-markdown 2.0.1, but haven't gotten around to
working out quite what I did to see about uploading it properly.

While integrating it with lua, I added some code to pull a prior
"#!python" line down into subsequent code blocks (as ":::python") to
get the language detection working right.

> and extracting the code.

That bit's easy: it's just the equivalent of sed -ne 's/^    //p' in python.
(It's also wrong, in that it means I can't have lists within lists,
but oh well)

> Markdown was even more impressive in some ways.  So much so that I now
> finding myself wondering what use I can put it to.

Markdown's pretty cool. There's a list of apps that support it at:

    http://markdown.infogami.com/

There's reStructuredText too, but markdown's my preference.

> And I yet again stumble across yaml, and yet again end up wishing I
> hadn't.

Such negativity. Tsk.

Cheers,
aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: Digital signature
URL: <http://lists.humbug.org.au/pipermail/general/attachments/20090818/9611758c/attachment.sig>


More information about the General mailing list