2020-12-17
Towards a proper FlightLog 2 -- The Archive Index
I wrote:
More things to contemplate:
Limiting the number of entries in the index.gmi to 25 or so, keep /all/ entries in a separate archive.gmi.
To distinguish between the lasted n items for the main index, and listing all entries for the archive-index on the other hand, is fairly simple. It amounts to one more command (head) in the pipeline (aside from header and footer text).
@@ -18,7 +20,6 @@
grep -v '^file/' |
LANG='' sort -r |
grep '20.*\.gmi$' |
+ head -25 |
while read file
do
date=$( sed -n -e 's/^#[# ]*//' -e '1p' "${file}" )
The archive-index is then produced (1 line in Makefile) and referenced (in the main index) and that's pretty much it.