initial commit

This commit is contained in:
exquisitecorp 2021-03-10 00:43:31 -05:00
commit 3d270c4cbc
2 changed files with 24 additions and 0 deletions

7
README.md Normal file
View File

@ -0,0 +1,7 @@
# Gemstats
My gemini statistics simple fish script.
```
fish gemstats.fish
```

17
gemstats.fish Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env fish
# counts total hits on my gemlog based on access log file, removing ip address
# lettuce feb 2021
#cc0 public domain, no rights reserved
echo "~lettuce"
echo "total hits alltime: "
grep lettuce /home/gemini/access.log | grep -v "69.120.239.191" | wc -l
echo "total hits current month: "
grep lettuce /home/gemini/access.log | grep (date +"%m") | wc -l
echo "total hits today: "
grep lettuce /home/gemini/access.log | grep (date +"%Y-%m-%d") | wc -l