diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-07 21:00:48 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-07 21:00:48 +0000 |
commit | 1bdfa4d8b54763eee1c266e3516bb50dd864cedc (patch) | |
tree | 45bb961a8b4b2b790875c320f2c6e6e5d141de10 /ikiwiki-w3m.cgi | |
parent | 1cd1f073fff6be0300dec80cf1571ca247ce24ab (diff) |
* Support a w3mmode, which lets w3m run ikiwiki using its local CGI
support, to edit pages etc without a web server.
Diffstat (limited to 'ikiwiki-w3m.cgi')
-rwxr-xr-x | ikiwiki-w3m.cgi | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ikiwiki-w3m.cgi b/ikiwiki-w3m.cgi new file mode 100755 index 000000000..fd0b0d677 --- /dev/null +++ b/ikiwiki-w3m.cgi @@ -0,0 +1,15 @@ +#!/usr/bin/perl +# ikiwiki w3m cgi meta-wrapper +if (! exists $ENV{PATH_INFO} || ! length $ENV{PATH_INFO}) { + die "PATH_INFO should be set"; +} +my $path=$ENV{PATH_INFO}; +$path=~s!/!!g; +$path="$ENV{HOME}/.ikiwiki/wrappers/$path"; +if (! -x $path) { + print "Content-type: text/html\n\n"; + print "Cannot find ikiwiki wrapper: $path\n"; + exit 1; +} +exec $path; +die "$path: exec error: $!"; |