[CONTACT]

[ABOUT]

[POLICY]

The site runs on Raspberry the

Found at: srjskam.iki.fi:70/technical

Some techical detail about how this site was implemented.
The site runs on a Raspberry PI, the server software
is Gophernicus.
Getting a text copy of a WWW page:
>   wget -O - https:// |
    html2text -utf8 -width 75 > gophermap
(Requires some cleanup, converting image links etc.)
Calling the guestbook script:
>  7Write to guestbook/cgi-bin/write_guestbook.cgi
The script itself:
>   #!/bin/sh
>   echo "$(date -u +%Y-%m-%d\ %H:%M)  $QUERY_STRING" >>
    /var/log/gopher_guestbook.txt
>   echo Done!
(No cleanup done, so this is probably vulnerable
to at least some kinds of attacks. Try it if you
are so inclined, and preferably report your findings!)
Write the guestbook:
>   =tac /var/log/gopher_guestbook.txt
('=' is a specific to Gophernicus, and simply runs
a command in shell. 'tac' is like 'cat', but outputs lines
in reverse order. I find this one delightfully unixy.)
Show the Roman calendar and uptime:
>   =echo "$(uname -a)\n\n$(hodie -vv)\n\n$(uptime -p)" |
    /usr/games/cowsay -f tux
('hodie' is not by me.)
With this kind of pattern you can do all sorts of
fun stuff. Well, the quite specific fun thing that is
making cows say things dynamically:
>   =echo "$(date -u +%H:%M)" |figlet -f future|cowsay -n
 _______________
/ ┏━┓┏━┓ ┏━┓┏━┓ \
| ┃┃┃┣━┓╹╺━┫┃┃┃ |
\ ┗━┛┗━┛╹┗━┛┗━┛ /
 ---------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
.


AD: