CikiWiki (2005-05) ================== CikiWiki is a small implementation of the Wiki concept created by Ward Cunningham. For more information, see http://c2.com/cgi/wiki . Installation ------------ To use CikiWiki, you need a web server that supports Common Gateway Interface. Apache, for instance, should be configured to enable ExecCGI: Options +ExecCGI Then compile the program: gcc tokigun.c -o tokigun Move the executable to the directory in which the server has the permission to both read and write, and in which CGI is enabled for the server as well. As many web servers recommend CGI files to have extension .cgi, do the following: mkdir wiki chmod ugo+w wiki cd tokigun wiki/cikiwiki.cgi And grant the permission of the CGI executable to the web server to use it. chmod ugo+x wiki/cikiwiki.cgi Finally, you can access the wiki with a web browser. Makefile included in the entry automatically does what is described above. Try: make install Features -------- - CikiWiki is widely portable, as it runs on any web server that supports CGI (RFC 3875). - All wikipages are saved as text files in the same directory in which the executable is placed. - By the tradition, the name of the main page is FrontPage. - Anyone can freely either edit an existing page, or create a new page. - Supports basic FormattingRules. See below for more information. - Supports BackLink by full-text searching. FormattingRules --------------- - All paragraphs are separated by one or more empty lines. Line breaks with no following empty line are counted as no line break. - All raw HTML tags are escaped. - You can specify the text as __bold__ and ''italic''. - CikiWiki automatically parses each WikiWord as a link. By regular expression, /[A-Z]+[a-z]+[A-Z][A-Za-z]*/ is recognized as a WikiWord. You can make a wikipage under a non-WikiWord title, but cannot link it from another page. - By tradition, you can prevent a WikiWord from converted to a link by separating words with '''' or ____ linking. e.g. Wiki''''Word - Four hyphens('-') are converted into a horizontal line. - Lines starting with asterisk('*') are parsed into a unordered bullet list. - Lines starting with a space are converted into preformatted text, where any space or FormattingRules are not parsed. - Lines starting with an exclamation mark('!') are headings, where you can specify the levels of heading by number of '!'s. (i.e. ! is

, !! is

, etc.) Comments -------- - CikiWiki requires ASCII character set. Probably byte order independent. - CikiWiki embeds a small utility, as you see, a rot13 encoder/decoder. ;) This is the source code of embedded program: main(int c,char**v){for(++v;*v&&**v ;++*v)putchar(**v+(isalpha(**v)?(** v|32)<110?13:-13:0));putchar(10);} I considered a quine like this, but it is too hard to achieve. - Thanks to this embedded program I could abuse the rules. :p CikiWiki is 2,175 bytes long by IOCCC 2005 rule, while total size is 5,420 bytes. - The source code of CikiWiki is best viewed with 8-character-long tab, and *very small* font. - CikiWiki can handle up to 891 bytes per each wikipage. Though it isn't enough for most wiki sites. - The content of each wikipage is stored under the file name starting with '_', followed by the pagename expressed as a hexadecimal number. - The file named "_" contains the list of all pages. This file is used for full-text searching. Miscellany ---------- - Some web browser, e.g. lynx, can't handle some relative URLs, like "?P=blah" (See also RFC 1808). Most other web browsers support it, however.