plfr integration

This commit is contained in:
gauthiier 2015-04-08 10:50:15 +02:00
parent e8ffa3c3ce
commit dbe66b3922
3 changed files with 16 additions and 3 deletions

View File

@ -13,4 +13,6 @@ elif [[ $f -nt $INDXFILE ]]; then
make --quiet index
fi
parse-skim.sh | compare.py .indx
#parse-skim.sh | compare.py .indx
parse-plfr.sh | compare.py .indx

13
parse/parse-plfr.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
for i in *.pdf; do
f=$i
done
if [[ -d '$f' ]]; then
echo "$f No pdf file in directory... Aborting.";
exit;
fi
plfr -json $f

View File

@ -18,7 +18,6 @@ def is_tag_identifier(line):
markups = {'QUOTES' : (is_quote_identifier, 'pp', 'tags', 'quote', 'fpc'), 'NOTES' : (is_note_identifier, '#', 'tags', 'note', 'fpc')}
output = {'QUOTES' : [], 'NOTES' : []}
def error(c):
fp, l = c
sys.stderr.write('Unidentifiable line:\n'+ l)
@ -66,7 +65,6 @@ def segment(c):
cursor = fp.tell()
line = fp.readline()
if not line:
# transition: EOF - record entry
record_segment(c, t, q, cc, (sect, x, tt, y, cnt))