💾 Archived View for gemini.circumlunar.space › ~ew › file › 20201217-gem-archive-index.sh.gmi captured on 2022-01-08 at 14:44:07. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-05)

➡️ Next capture (2024-06-20)

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

------------------------------------------------------------
#!/bin/bash
# 2020-12-13 ew

unset LANG
set -euo pipefail

# head
cat <<EOF
# ~ew's FlightLog
## Archive Index

=> /index.gmi Home
=> /tag-index.gmi  Tag Index

EOF

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


 |
    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
------------------------------------------------------------