Getting text versions of mail list posts

This commit is contained in:
ken_fallon committed 2026-11-22 15:22:22 +01:00
1 parent be2b17506f
commit 97c4ac2e88
1 file changed
+16
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
maillist_base_url="https://lists.hackerpublicradio.com/pipermail/hpr/"
maillist_dir="${HOME}/hpr/maillist"
maillist_index="${maillist_dir}/index.html"
#wget --timestamping "${maillist_base_url}" --output-document="${maillist_dir}/index.html"
curl --silent --fail --location --remote-time --time-cond "${maillist_index}" --output "${maillist_index}" "${maillist_base_url}"
grep "Gzip'd Text" "${maillist_dir}/index.html" | awk -F '"' '{print $2}' | while read month_pack
do
curl --silent --fail --location --remote-time --time-cond "${maillist_dir}/${month_pack}" --output "${maillist_dir}/${month_pack}" "${maillist_base_url}/${month_pack}"
done
gzip --keep --decompress "${maillist_dir}/"*.gz