💾 Archived View for gemini.circumlunar.space › ~ew › file › 20201217-gem-index.sh.gmi captured on 2021-12-05 at 23:47:19. Gemini links have been rewritten to link to archived content

View Raw

More Information

➡️ Next capture (2024-06-20)

-=-=-=-=-=-=-

------------------------------------------------------------
#!/bin/bash
# 2020-12-15 ~ew
# License: CC0-1.0

unset LANG
set -euo pipefail

# head
cat <<EOF
# ~ew's FlightLog
## mostly harmless stuff

EOF

# files
find . -type f        |
    sed -e 's|^\./||' |
    grep -v '^file/'  |
    LANG='' sort -r   |
    grep '20.*\.gmi


 |
    head -25          |
    while read file
    do
        date=$(  sed -n -e 's/^#[# ]*//' -e '1p' "${file}" )
        title=$( sed -n -e 's/^#[# ]*//' -e '2p' "${file}" )

        printf "=> /%s   %s %s\n" "${file}" "${date}" "${title}"
    done


cat <<EOF

For older entries see
=> /archive-index.gmi Archive Index

For a generated tag index see
=> /tag-index.gmi Tag Index

# About

Imagine some grumpy ol'bloke having been sitting on the dimly lit flight deck for way too long ...
EOF
------------------------------------------------------------