From 3360f5a3acf34ca2585951d4c08564615938654c Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Wed, 1 Oct 2008 12:50:49 -0500 Subject: [PATCH] add irc-log webapp to redirect you to today's \#concatenative log --- extra/webapps/irc-log/authors.txt | 1 + extra/webapps/irc-log/irc-log.factor | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 extra/webapps/irc-log/authors.txt create mode 100644 extra/webapps/irc-log/irc-log.factor diff --git a/extra/webapps/irc-log/authors.txt b/extra/webapps/irc-log/authors.txt new file mode 100644 index 0000000000..b4bd0e7b35 --- /dev/null +++ b/extra/webapps/irc-log/authors.txt @@ -0,0 +1 @@ +Doug Coleman \ No newline at end of file diff --git a/extra/webapps/irc-log/irc-log.factor b/extra/webapps/irc-log/irc-log.factor new file mode 100644 index 0000000000..c193550719 --- /dev/null +++ b/extra/webapps/irc-log/irc-log.factor @@ -0,0 +1,22 @@ +! Copyright (C) 2008 Doug Coleman. +! See http://factorcode.org/license.txt for BSD license. +USING: calendar kernel http.server.dispatchers prettyprint +sequences printf furnace.actions html.forms accessors +furnace.redirection ; +IN: webapps.irc-log + +TUPLE: irclog-app < dispatcher ; + +: irc-link ( -- string ) + gmt -7 hours convert-timezone >date< + [ unparse 2 tail ] 2dip + "http://bespin.org/~nef/logs/concatenative/%02s.%02d.%02d" + sprintf ; + +: ( -- action ) + + [ irc-link ] >>display ; + +: ( -- dispatcher ) + irclog-app new-dispatcher + "" add-responder ;