i use werc for (most of?) my websites, i find it fun to play with and use.
and thus i like to write small apps for it, these apps can be found here,
there is currently only one i found worhtwhile to put on the internet,
but im still experimenting with it,
currently there is a small app for webrings, its pretty simple.
you will provide a file called list.txt in the root of the site,
for example:
list.txt
http://person1.com http://person2.com
and you will have 3 actions
next, prev, random
webring.com/prev/person1 will redirect to person2’s website and webring.com/next/person1 will do the same.
here is a short code snipet to turn a specific dir into a file display directory you can do it pretty simply by doing the following in yourdir/_werc/config
i use it here –> http://pita.im/u/
fn dir_listing_handler {
echo '<h1>index of '^$req_path^'</h1>'
echo '<ul>'
@ {
cd $sitedir$req_path
for(i in *)
if(! ~ $i _werc && test -d $i)
echo '<li><b><a href="'$i'/">'$i'/</a></b></li>'
for(i in *)
if(! ~ $i _werc && ! test -d $i)
echo '<li><a href="'$i'">'$i'</a></li>'
}
echo '</ul>'
}