Wiki started from scratch by CaseyWest for the ShortestWikiContest, heavily influenced by the amazing work done on FleaWi, PeeWee, and mostly PeWi. 222 Characters of Perl and Shell. * Code: http://web.archive.org/web/20060301215335/http://caseywest.com/code/scripts/sigwik.txt * Demo: http://web.archive.org/web/20050425213209/http://caseywest.com/cgi-bin/sig/wik/HomePage Quick instructions. 0. make a /sig/ subdirectory in your cgi-bin 0. upload the script into this directory, e.g as cgi-bin/sig/wik 0. chmod 755 wik 0. chown nobody cgi-bin/sig to make sure that the script can write to cgi-bin/sig 0. visit /cgi-bin/sig/wik/HomePage to start creating. Features. * 222 characters of Perl and Shell, * Automatic WikiWord and link linking, * BackLink''''''s above PageTitle, * OneClick edits, * and Infinite formatting options via WYSIWYG editor. Named by NicholasClark, as it spans just four lines. Ok, now I am amazed. -- DougMerritt Original source code, since Casey West's web site has lost it: #!/usr/bin/perl use CGI':all';path_info=~/\w+/;$_=`grep -l $& *`.h1($&).escapeHTML$t=param(t) ||`dd<$&`;open F,">$&";print F$t;s/htt\S+|([A-Z]\w+){2,}/a{href,$&},$&/eg; print header,pre"$_
",submit,textarea t,$t,9,70 ---- I've expanded SigWik a little to use css and provide Recent Changes. #!/usr/bin/perl use CGI':all';path_info=~/\w+/;$_='
'.`ls -1 --sort=t|head`.'
'.`grep -l $& *|fmt`.h1($&). escapeHTML$t=param(2)||`dd<$&`;open F,">$&";print F$t;s/htt\S+|([A-Z]\w+){2,}/a{href,$&},$&/eg;s/ /br/eg;print header, ""; print "$_",submit,textarea 2,$t,9,70 It's 5 lines. It's 371 bytes. Bloatware, I know :) And it fooking rocks!!!! ---- I "optimized" the css+Recent Changes version just a little bit; instead of "ls -l --sort=t" it should be possible to use "ls -lt" and there was an unnecessary space after "print header". Also I took an advantage of start_html() and stripped out one print statement. These modifications brings the file size to 312 bytes and four lines. -- Janne Pikkarainen #!/usr/bin/perl use CGI':all';path_info=~/\w+/;$_='
'.`ls -1t|head`.'
'.`grep -l $& *|fmt`.h1($&). escapeHTML$t=param(2)||`dd<$&`;open F,">$&";print F$t;s/htt\S+|([A-Z]\w+){2,}/a{href,$&},$&/eg;s/ /br/eg;print header,start_html(-style=>{-src=>'./s.css'})."$_",submit,textarea 2,$t,9,70 ---- When I tried using the code from Janne, I kept getting an empty file named "s" created. I fixed this by changing "./s.css" to "/s.css" Perhaps it's a bug in the version of CGI.pm I'm using. -- Troy Goodson ---- Wonderful. I'm using the one with css as my web notepad -- MarkusSrank ---- CategoryWikiImplementation