nnnotes/parse/parse-skim.sh

23 lines
321 B
Bash
Raw Normal View History

2014-08-25 12:54:27 +02:00
#!/bin/bash
for i in *.pdf; do
f=$i
done
2014-08-25 19:23:13 +02:00
if [[ -d '$f' ]]; then
echo "$f No pdf file in directory... Aborting.";
2014-08-25 12:54:27 +02:00
exit;
fi
filename="${f%.*}"
skimnotes get -format txt $f
2014-08-25 19:23:13 +02:00
if [[ ! -f '$filename.txt' ]]; then
echo "No skim notes in pdf $f. Aborting.";
exit;
fi
2014-08-25 12:54:27 +02:00
parse-skim.py < "$filename.txt"
2014-08-25 17:57:34 +02:00
rm $filename.txt