diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-11-25 22:20:29 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-11-25 22:20:29 +0100 |
| commit | 4d0fc39c2a7a2974a3e5402990010dcd3b7bd596 (patch) | |
| tree | 53a31fe94dd8c9ec1784b2cf323d3885148f0faf /scraper | |
| parent | e1fa31bfd6a938341c3a8a63f238d0952cf4b429 (diff) | |
mv
Diffstat (limited to 'scraper')
| -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 |
