GSoC/GCI Archive
Google Code-in 2012 The NetBSD Project

Create a small markdown wiki CGI

completed by: wmzhere

mentors: Julian Coleman, Julian Fagir

NetBSD has a shipped web server name bozohttpd (http://netbsd.gw.com/cgi-bin/man-cgi?httpd++NetBSD-current).

Your task this time is to write a cgi in C which uses libsoldout (http://fossil.instinctive.eu/libsoldout/index) to create a wiki that runs locally on your webserver. Then, this cgi just parses the markdown to html and resolves the links right, such that you can browse a local wiki (e.g. the NetBSD one) without having to parse everything to HTML and leave it as such in the file system.

So mainly you have to write a CGI which uses the mkd2html parser from libsoldout, but does the links right. You also have to consider the links written as [[Linkname]] which are often used internally in wikis.

mkd2html: http://fossil.instinctive.eu/libsoldout/artifact/fd100c723c722189d62fd9bf261d67db69240043


As the parsing itself is rather small, you should provide a small tutorial, or rather a complete setup which already runs this cgi with bozohttpd. You can use the test virtual machines from ftp://ftp.netbsd.org/pub/NetBSD/misc/GCi to provide such a setup.

Optimally, you would make everything as easy as possible, also delivering a bozohttpd configuration to run the cgi directly. The user should not have to set up much to get this running, but rather only start one script and then point his web browser to localhost to make it run.