Created
June 1, 2015 00:51
-
-
Save strubell/7b97e0858eed38bbad72 to your computer and use it in GitHub Desktop.
Convert a bunch of files from pdf -> svg using iesl-pdf-to-text
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
#!/bin/bash | |
# | |
# pdf2svg-parallel.sh | |
# | |
# Usage: pdf2svg-parallel.sh /dir/containing/pdfs /output/dir | |
# | |
# You must set the PDF2SVG_ROOT environment variable to a directory containing | |
# iesl-pdf-to-text, e.g. from that directory: | |
# export PDF2SVG_ROOT=`pwd` | |
# | |
input_dir=$1 | |
output_dir=$2 | |
cores=48 | |
find $input_dir -type f \ | |
| parallel -j $cores --eta $PDF2SVG_ROOT/bin/run.js --svg -i {} -o $output_dir/{/.}.svg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment