tgenindex.sh - monochromatic - monochromatic blog: http://blog.z3bra.org
(HTM) git clone git://z3bra.org/monochromatic
(DIR) Log
(DIR) Files
(DIR) Refs
---
tgenindex.sh (242B)
---
1 #!/bin/sh
2
3 i=0
4 for post in $(find 20* -type f -name '*.txt' ! -name 'index.txt'|sort); do
5 title="$(sed -n 's/^# \(.*\)/\1/p' $post)"
6 href="/${post%.txt}.html"
7 printf '* 0x%04x - [%s](%s)\n' "$i" "$title" "$href"
8 i=$((i+1))
9 done | sort -r