mirror of
https://github.com/papers-we-love/papers-we-love.git
synced 2024-10-27 20:34:20 +00:00
Added script to download all PDFs from the Readmes
This commit is contained in:
parent
dcba4ddf7c
commit
c5e0afd327
18
download_all.sh
Executable file
18
download_all.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
download_for_directory() {
|
||||||
|
cd $1
|
||||||
|
sleep 0.1
|
||||||
|
for f in *; do
|
||||||
|
if [ -d "$f" ]; then
|
||||||
|
download_for_directory $f &
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
ls | cat *.md 2> /dev/null | egrep -o 'https?://[^ ]+' | grep 'pdf' | tr -d ')' | xargs --no-run-if-empty wget --no-clobber --quiet --timeout=5 --tries=2
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
echo "Done $1"
|
||||||
|
}
|
||||||
|
|
||||||
|
download_for_directory .
|
||||||
|
wait
|
Loading…
Reference in New Issue
Block a user