blob: c33d75dbc86f935cc49f3caee9545c5f18ebc8a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/usr/bin/env bash
set -e -u -o pipefail
export FULLTEXTDIR=$1
if [ ! -d $FULLTEXTDIR ]; then
echo "Directory does not exist: $FULLTEXTDIR"
exit -1
fi
# make directories
ls $FULLTEXTDIR/pdf/ | parallel mkdir -p $FULLTEXTDIR/pdftotext/{}
ls $FULLTEXTDIR/pdf/ | parallel mkdir -p $FULLTEXTDIR/thumbnail/{}
fd -I .pdf $FULLTEXTDIR/pdf/ | sed "s/\.pdf//g" | cut -d/ -f3-4 | parallel -j10 ./bin/make_pdf_derivatives.sh $FULLTEXTDIR {}
|