Skip to content

Commit 33ba7a7

Browse files
committed
fix(add_pdf)!: fixed bug that was preventing supplemental files to be added
1 parent e8e9105 commit 33ba7a7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="wbtools",
8-
version="1.2.15",
8+
version="1.2.16",
99
author="Valerio Arnaboldi",
1010
author_email="valearna@caltech.edu",
1111
description="Interface to WormBase (www.wormbase.org) curation data, including literature management and NLP "

wbtools/literature/paper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def load_text_from_pdf_files_in_db(self):
217217
file_paths = self.db_manager.get_file_paths(self.paper_id)
218218
for file_path in file_paths:
219219
filename = file_path.split("/")[-1]
220-
if filename.lower().endswith(".pdf"):
220+
if filename.lower().endswith(".pdf") or re.match(r'^[0-9]+$', filename):
221221
dir_path = file_path.rstrip(filename)
222222
self.add_file(dir_path=dir_path, filename=filename, remote_file=True, pdf=True)
223223
else:

0 commit comments

Comments
 (0)