swerc

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

commit c3c118abdc3da60c588e42552506d961dc4c4e10
parent 795a93e21edbbcc36ddb44f4003ceb0b30df6b92
Author: uriel@suckless.org <unknown>
Date:   Wed, 18 Jun 2008 21:27:08 +0200

Make the output of fortunes.txt more readable and comment a couple of hacks/issues with .txt files.
Diffstat:
Mbin/controller.rc | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bin/controller.rc b/bin/controller.rc @@ -97,7 +97,9 @@ fn genbody { template.awk $body.tpl | rc $rcargs if not if ( test -f $body.txt ) { echo '<pre>' - cat $body.txt |fmt -l 82 -j | sed 's/</\&gt;/g; s/>/\&lt;/g' + # XXX Insering a blank line between lines in input is good for fortunes.txt, but probably not for other .txt files + # XXX Words are not broken, even if they are way beyond 82 chars long + cat $body.txt |sed 's/$/\n/g; s/</\&gt;/g; s/>/\&lt;/g' |fmt -l 82 -j echo '</pre>' } if not if ( test -f $body.html )