diff options
Diffstat (limited to 'scraper/pdf_dump_first_page.sh')
| -rw-r--r-- | scraper/pdf_dump_first_page.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scraper/pdf_dump_first_page.sh b/scraper/pdf_dump_first_page.sh new file mode 100644 index 00000000..2749915d --- /dev/null +++ b/scraper/pdf_dump_first_page.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +for i in datasets/s2/pdf/*/*/*.pdf + do + OUTPUT="${i%.*}.txt" + if [[ ! -e $OUTPUT ]] + then + pdf2txt.py -p 1 $i > $OUTPUT + echo $OUTPUT + else + if [ -s $OUTPUT ] + then + echo "found $OUTPUT" + else + echo "rm empty $OUTPUT" + rm -f $OUTPUT + fi + fi + done |
