swerc

anselm's simpler werc fork
git clone git://git.suckless.org/swerc
Log | Files | Refs | README

commit f32034d4f8b1581b7d9133863009fcd1c5d4155f
parent 82980b8711da4e9909d1bf2a3489fb9ec793b454
Author: uriel@engel.se.cat-v.org <unknown>
Date:   Tue, 13 Jan 2009 03:18:19 +0100

Get rid of response_format which was only used by blagh feeds anyway, and we can emulate by setting $headers to nil plus adding a $res_tail var.
Diffstat:
Mbin/werc.rc | 13+++----------
1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/bin/werc.rc b/bin/werc.rc @@ -3,7 +3,6 @@ cd .. forbidden_uri_chars='[^a-zA-Z0-9_+\-\/\.]' -response_format=html fn get_lib_file { if(test -f $sitedir/_werc/lib/$1) @@ -133,6 +132,7 @@ path=(. $PLAN9/bin ./bin/ /bin/ /usr/bin) headers=lib/headers.tpl master_template=default_master.tpl +res_tail='</body></html>' sidebar=sidebar werc_root=`{pwd} for(i in siteTitle siteSubTitle pageTitle extraHeaders) @@ -210,12 +210,5 @@ setup_handlers if(! ~ $#debug 0) dprint ' '$"SERVER_NAME^$"REQUEST_URI' - '$"HTTP_USER_AGENT' - '$"REQUEST_METHOD' - '$"handler -# Template/body selection -master_template=`{get_lib_file $master_template} - -if(~ $response_format html) { - template $headers $master_template | awk_buffer - echo '</body></html>' -} -if not if(~ $response_format raw) - template < $master_template +template $headers `{get_lib_file $master_template} | awk_buffer +echo $res_tail