blob: c43b38e5264cac399e85f72b34c73121eef5b4bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/usr/bin/env bash
# build the phlog gophermap
year=$(date +%Y)
cd "$HOME/src/gopher/phlog/$year"
echo "+-----------------------------------+" > gophermap
echo "| Phils Phlog $year |" >> gophermap
echo "+-----------------------------------+" >> gophermap
echo "" >> gophermap
echo "0Subscribe to rss feed /phlog/rss.xml spike.nagatha.fr 70" >> gophermap
echo "7Search this phlog /search spike.nagatha.fr 70" >> gophermap
echo "" >> gophermap
echo "+----------------------------------------------------------+" >> gophermap
echo "" >> 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
|