Skip to content

Commit

Permalink
Merge branch 'release/0.0.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
lb803 committed May 4, 2023
2 parents cc782f6 + d8a5192 commit 9ccf05b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def run(input_file: Path = typer.Option("./file.pdf",
# Iterate over chapters metadata
for chapter in metadata.get_chapters():
page_range = re.split('-|–', chapter.get("pages"))
output_file_name = chapter.get("doi").split('/')[-1] + '.pdf'

doi_fragments = chapter.get("doi").split('/')
output_file_name = doi_fragments[-1].lower() + '.pdf'

# Merge PDFs
pdf.merge_pdfs(page_range, output_file_name)
Expand Down

0 comments on commit 9ccf05b

Please sign in to comment.