Skip to content

Commit 429ddf1

Browse files
committed
Fix paths
1 parent c68d12f commit 429ddf1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

normalize_references.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ def resolve_references(reference_trie, bibitems):
2626
for author in ref['authors']:
2727
if normalize_title(author['name'].split(' ')[-1]) not in normalize_title(text):
2828
break
29-
else:
30-
print(text)
31-
print(ref['title'])
29+
else:
3230
found += 1
3331
resolved[bib_id] = ref['id']
3432
break
@@ -79,7 +77,7 @@ def normalize_references(source_path, target_path, automaton, jobs=1):
7977
with open(automaton, 'rb') as f:
8078
reference_trie = pickle.load(f)
8179
with Pool(jobs) as p:
82-
params = [(file, target_path / file.name) for file in source_path.glob("**/*.html")]
80+
params = [(file, target_path / file.relative_to(source_path)) for file in source_path.glob("**/*.html")]
8381
p.map(resolve_references_in_html, params)
8482

8583
if __name__ == "__main__": fire.Fire(normalize_references)

0 commit comments

Comments
 (0)