-
-
Save Guillawme/06d884c4b9536217e14ff3b9b21aec47 to your computer and use it in GitHub Desktop.
Download all chimerax-users mailing list archives
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [[ ! -d chimerax-users ]] | |
then | |
mkdir chimerax-users | |
fi | |
cd chimerax-users | |
curl -s https://www.rbvi.ucsf.edu/pipermail/chimerax-users/ |\ | |
grep -o "2[0-9]\+-[A-Z][a-z]\+\.txt" |\ | |
while read input_url | |
do | |
output_txt=$(basename ${input_url} .gz |\ | |
sed -e 's/January/01/' \ | |
-e 's/February/02/' \ | |
-e 's/March/03/' \ | |
-e 's/April/04/' \ | |
-e 's/May/05/' \ | |
-e 's/June/06/' \ | |
-e 's/July/07/' \ | |
-e 's/August/08/' \ | |
-e 's/September/09/' \ | |
-e 's/October/10/' \ | |
-e 's/November/11/' \ | |
-e 's/December/12/') | |
curl -s https://www.rbvi.ucsf.edu/pipermail/chimerax-users/${input_url} > ${output_txt} | |
done | |
find . -name '????-??.txt' | sort -t- -n -k1,2 | xargs cat > chimerax-users.txt | |
find . -name '????-??.txt' -delete | |
cd .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment