diff options
| author | Philip Wittamore <philip@wittamore.com> | 2025-11-08 17:52:58 +0100 |
|---|---|---|
| committer | Philip Wittamore <philip@wittamore.com> | 2025-11-08 17:52:58 +0100 |
| commit | 5637b6bc9e9ca99779fd6483318f33a6fe38152d (patch) | |
| tree | e7c7f5556be89e8f11ded44ca167a473032bcdfe /phlogmap | |
| parent | 301c765535e2dc4e51a3b756e2b830dbe51293aa (diff) | |
| download | scripts-master.tar.gz scripts-master.tar.bz2 scripts-master.zip | |
Diffstat (limited to 'phlogmap')
| -rwxr-xr-x | phlogmap | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -1,10 +1,11 @@ #!/usr/bin/env bash # build the phlog gophermap -cd "$HOME/src/gopher/phlog" +year=$(date +%Y) +cd "$HOME/src/gopher/phlog/$year" echo "+-----------------------------------+" > gophermap -echo "| Phils Phlog |" >> gophermap +echo "| Phils Phlog $year |" >> gophermap echo "+-----------------------------------+" >> gophermap echo "" >> gophermap echo "0Subscribe to rss feed /phlog/rss.xml spike.nagatha.fr 70" >> gophermap @@ -13,11 +14,12 @@ echo "" >> gophermap echo "+----------------------------------------------------------+" >> gophermap echo "" >> gophermap -dirs=($(ls -dr */)) -for dir in "${dirs[@]}"; do - dt=$(echo "$dir" | cut -c 1-10) - title="$(head -n 1 "$dir/gophermap")" - echo -e "1$dt $title\t/phlog/$dir\tspike.nagatha.fr\t70" >> gophermap +files=$(ls -r *.txt) +for file in $files; do + dt=$(echo "$file" | cut -c 1-10) + title="$(head -n 1 "$file")" + echo -e "0$dt $title\t/phlog/$year/$file\tspike.nagatha.fr\t70" >> gophermap done + exit 0 |
