X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=scoop-cgi;h=b7531ecb7df6192252ccb70709ccb01f9040593d;hb=1c7a6f892f643cc0f61cc11612bcc1ba18822835;hp=3b2aef5c0dc730f3602d9fe8d8e20936a3bb49d2;hpb=fb1ad35343b7959e5a1c103969a4fbb3ff6b6457;p=bin.git diff --git a/scoop-cgi b/scoop-cgi index 3b2aef5..b7531ec 100755 --- a/scoop-cgi +++ b/scoop-cgi @@ -1,14 +1,27 @@ #!/usr/bin/env sh -# CGI script to get irc logs from scoop. Powers https://logs.armaanb.net. +# CGI script to get irc logs from scoop. Powers https://irclogs.armaanb.net. channel=$(echo "$PATH_INFO" | awk -F / '{print $2}') if [ -z "$channel" ]; then - echo "Content-type: text/plain\n" - echo "Logged channels:" - cat /etc/scoop-cgi/channels - echo " -url format: /channel/date -date is optional, and defaults to the current day" + echo "Content-type: text/plain + +================= +acheam's IRC logs +================= + +logged channels +--------------- +$(awk '{print " * " $0}' /etc/scoop-cgi/channels) + +url format +---------- +/channel/date +date is optional, and defaults to the current day + +source +------ +https://git.armaanb.net/bin/tree/scoop-cgi +it's in the public domain!" exit 0 fi