<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
hehe thx Kim :)<br>the reason I chose Pygophers is that it could serve over wap and the main thing, is that is a gopher server that can do Gopher +<br>Will u be writing gophernicus to run on multi-user systems ie *nix and with G+ functionality ?<br><br>-Barana<br><br>> Date: Wed, 6 Oct 2010 13:00:10 +0300<br>> From: kim@holviala.com<br>> To: gopher-project@lists.alioth.debian.org<br>> Subject: Re: [gopher] Someone out there with python skills want to help?<br>> <br>> On 6.10.2010 12:07, daniel g wrote:<br>> <br>> > there must be more than one way to skin a cat.<br>> > is there a way u or anyone knows to get a gophermap to patch thru to the<br>> > os or to the gophermap so I can write in a hit counter?<br>> <br>> 1) Remove pygopherd, install gophernicus<br>> 2) Create a gophermap and in it have a line like this:<br>> <br>> =/path/to/counter.sh "Woohoo! You're number " "."<br>> <br>> Here's the (grossly over-engineered) counter.sh:<br>> <br>> #!/bin/sh<br>> <br>> ##<br>> ## A simple visitor counter to use with gophermaps<br>> ##<br>> ## Usage: counter.sh <pre message> <post message><br>> ##<br>> <br>> # Figure out a safe file to keep our counter<br>> HASH=`echo "$SELECTOR" | md5sum | cut -d" " -f1`<br>> FILE=/var/tmp/gopher-counter-$HASH<br>> <br>> # Get count and the previous visitors IP address<br>> COUNT="`cut -d' ' -f1 $FILE`"<br>> OLD_ADDR="`cut -d' ' -f2 $FILE`"<br>> <br>> # Increase counter only if the user is new<br>> if [ "$OLD_ADDR" != "$REMOTE_ADDR" ]; then<br>> COUNT=$(( COUNT + 1 ))<br>> echo "$COUNT $REMOTE_ADDR" > $FILE<br>> fi<br>> <br>> # Output counter message<br>> echo "$1$COUNT$2"<br>> <br>> <br>> The reason I wrote Gophernicus was that none of the existing gopher <br>> servers did what I wanted them to do. Not that they're bad software, I <br>> just had different ideas.<br>> <br>> - Kim<br>> <br>> <br>> _______________________________________________<br>> Gopher-Project mailing list<br>> Gopher-Project@lists.alioth.debian.org<br>> http://lists.alioth.debian.org/mailman/listinfo/gopher-project<br>                                            </body>
</html>