Wiki started from scratch by CaseyWest for the ShortestWikiContest, heavily influenced by the amazing work done on FleaWi, PeeWee, and mostly PeWi.
Quick instructions.
Features.
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"$_
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 "$_
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'})."$_
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