💾 Archived View for krauserd.xyz › src › stats.gmi captured on 2024-08-18 at 17:56:25. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-04-28)
-=-=-=-=-=-=-
This Gemini capsule is somewhat dynamic. It has a user visit count, and each page is generated on-the-fly from files on disk. These are the hacky bits that make the capsule stats page:
#!/bin/sh sed 3q ../header.gmi | unix2dos /usr/bin/echo -ne '\r\n\r\n' /usr/bin/echo -ne "# Capsule Statistics\r\n\r\n" /usr/bin/echo -ne "Here you'll find the number of (non-unique) views this capsule received each day. I don't track IP addresses or anything, so I can't calculate unique views.\r\n\r\n" /usr/bin/echo -ne '```\r\n' for count in $(ls 20* | grep -v index | sort -r); do /usr/bin/echo -ne "$count: $(wc -c $count | cut -d' ' -f1)\r\n" done /usr/bin/echo -ne '```\r\n' /usr/bin/echo -ne "\r\n\r\n" /usr/bin/echo -ne '=> gemini://krauserd.xyz/src/stats.gmi Source code for this page\r\n' unix2dos < ../footer.gmi