prototyping improvements
parent
0943c375d4
commit
28055bbcc5
4
README
4
README
|
@ -1,4 +1,4 @@
|
||||||
Use ./Makefile.PL to generate a Makefile, "make" will generate docs and a
|
Use ./Makefile.PL to generate a Makefile, "make" will build the
|
||||||
man page, and "make install" will install ikiwiki.
|
documentation wiki and a man page, and "make install" will install ikiwiki.
|
||||||
|
|
||||||
All other documentation is in the ikiwiki documentation wiki.
|
All other documentation is in the ikiwiki documentation wiki.
|
||||||
|
|
26
ikiwiki
26
ikiwiki
|
@ -81,7 +81,7 @@ sub getconfig () { #{{{
|
||||||
}
|
}
|
||||||
} #}}}
|
} #}}}
|
||||||
|
|
||||||
sub checkconfig { #{{{
|
sub checkconfig () { #{{{
|
||||||
if ($config{cgi} && ! length $config{url}) {
|
if ($config{cgi} && ! length $config{url}) {
|
||||||
error("Must specify url to wiki with --url when using --cgi");
|
error("Must specify url to wiki with --url when using --cgi");
|
||||||
}
|
}
|
||||||
|
@ -99,11 +99,7 @@ sub checkconfig { #{{{
|
||||||
}
|
}
|
||||||
} #}}}
|
} #}}}
|
||||||
|
|
||||||
sub usage { #{{{
|
sub error ($) { #{{{
|
||||||
die "usage: ikiwiki [options] source dest\n";
|
|
||||||
} #}}}
|
|
||||||
|
|
||||||
sub error { #{{{
|
|
||||||
if ($config{cgi}) {
|
if ($config{cgi}) {
|
||||||
print "Content-type: text/html\n\n";
|
print "Content-type: text/html\n\n";
|
||||||
print misctemplate("Error", "<p>Error: @_</p>");
|
print misctemplate("Error", "<p>Error: @_</p>");
|
||||||
|
@ -111,6 +107,16 @@ sub error { #{{{
|
||||||
die @_;
|
die @_;
|
||||||
} #}}}
|
} #}}}
|
||||||
|
|
||||||
|
sub usage () { #{{{
|
||||||
|
die "usage: ikiwiki [options] source dest\n";
|
||||||
|
} #}}}
|
||||||
|
|
||||||
|
sub possibly_foolish_untaint ($) { #{{{
|
||||||
|
my $tainted=shift;
|
||||||
|
my ($untainted)=$tainted=~/(.*)/;
|
||||||
|
return $untainted;
|
||||||
|
} #}}}
|
||||||
|
|
||||||
sub debug ($) { #{{{
|
sub debug ($) { #{{{
|
||||||
return unless $config{verbose};
|
return unless $config{verbose};
|
||||||
if (! $config{cgi}) {
|
if (! $config{cgi}) {
|
||||||
|
@ -121,12 +127,6 @@ sub debug ($) { #{{{
|
||||||
}
|
}
|
||||||
} #}}}
|
} #}}}
|
||||||
|
|
||||||
sub possibly_foolish_untaint { #{{{
|
|
||||||
my $tainted=shift;
|
|
||||||
my ($untainted)=$tainted=~/(.*)/;
|
|
||||||
return $untainted;
|
|
||||||
} #}}}
|
|
||||||
|
|
||||||
sub basename ($) { #{{{
|
sub basename ($) { #{{{
|
||||||
my $file=shift;
|
my $file=shift;
|
||||||
|
|
||||||
|
@ -236,7 +236,7 @@ sub isinlinableimage ($) { #{{{
|
||||||
$file=~/\.(png|gif|jpg|jpeg)$/;
|
$file=~/\.(png|gif|jpg|jpeg)$/;
|
||||||
} #}}}
|
} #}}}
|
||||||
|
|
||||||
sub htmllink { #{{{
|
sub htmllink ($$;$$) { #{{{
|
||||||
my $page=shift;
|
my $page=shift;
|
||||||
my $link=shift;
|
my $link=shift;
|
||||||
my $noimageinline=shift; # don't turn links into inline html images
|
my $noimageinline=shift; # don't turn links into inline html images
|
||||||
|
|
Loading…
Reference in New Issue