papers-cli 2.17.3__tar.gz → 2.17.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {papers_cli-2.17.3 → papers_cli-2.17.4}/PKG-INFO +1 -1
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers/_version.py +3 -3
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers/extract.py +11 -11
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers_cli.egg-info/PKG-INFO +1 -1
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers_cli.egg-info/scm_version.json +2 -2
- {papers_cli-2.17.3 → papers_cli-2.17.4}/.gitattributes +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/.github/FUNDING.yml +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/.github/workflows/docs.yml +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/.github/workflows/pypi.yml +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/.github/workflows/release.yml +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/.github/workflows/tests.yml +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/.gitignore +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/LICENSE +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/README.md +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/docs/adding-entries.md +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/docs/comparison.md +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/docs/configuration.md +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/docs/features.md +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/docs/git.md +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/docs/index.md +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/docs/installation.md +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/docs/library-management.md +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/docs/listing.md +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/docs/quickstart.md +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/docs/renaming.md +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/docs/undo-redo.md +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/mkdocs.yml +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers/__init__.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers/__main__.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers/backup.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers/bib.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers/config.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers/duplicate.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers/encoding.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers/entries.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers/filename.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers/install.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers/latexenc.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers/utils.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers_cli.egg-info/SOURCES.txt +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers_cli.egg-info/dependency_links.txt +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers_cli.egg-info/entry_points.txt +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers_cli.egg-info/requires.txt +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers_cli.egg-info/scm_file_list.json +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/papers_cli.egg-info/top_level.txt +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/pyproject.toml +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/requirements.txt +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/scripts/README.md +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/scripts/benchmark_bibtexparser_load.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/scripts/generate_dummy_bib.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/setup.cfg +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/setup.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/__init__.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/common.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/config.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/download.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/downloadedpapers/.gitignore +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/downloadedpapers/bg-8-515-2011.pdf +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/downloadedpapers/bg-8-515-2011.txt +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/downloadedpapers/esd-4-11-2013-supplement.pdf +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/downloadedpapers/esd-4-11-2013.pdf +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/test_add.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/test_backup_dirs.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/test_bib_unit.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/test_biblio.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/test_check.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/test_config_unit.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/test_duplicates.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/test_encoding.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/test_extract.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/test_extract_unit.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/test_filecheck.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/test_filename_unit.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/test_install.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/test_latexenc.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/test_list.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/test_undo.py +0 -0
- {papers_cli-2.17.3 → papers_cli-2.17.4}/tests/test_utils.py +0 -0
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '2.17.
|
|
22
|
-
__version_tuple__ = version_tuple = (2, 17,
|
|
21
|
+
__version__ = version = '2.17.4'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 17, 4)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'gc3df29014'
|
|
@@ -37,11 +37,11 @@ class DOIRequestError(ValueError):
|
|
|
37
37
|
|
|
38
38
|
# PDF parsing / crossref requests
|
|
39
39
|
# ===============================
|
|
40
|
-
def
|
|
41
|
-
import
|
|
40
|
+
def readpdf_pymupdf(pdf_path, pages=None, first=None, last=None):
|
|
41
|
+
import pymupdf
|
|
42
42
|
|
|
43
43
|
# Open the PDF file
|
|
44
|
-
document =
|
|
44
|
+
document = pymupdf.open(pdf_path)
|
|
45
45
|
text = ""
|
|
46
46
|
|
|
47
47
|
# Iterate through the pages
|
|
@@ -78,7 +78,7 @@ def readpdf(pdf, first=None, last=None):
|
|
|
78
78
|
if not os.path.isfile(pdf):
|
|
79
79
|
raise ValueError(repr(pdf) + ": not a file")
|
|
80
80
|
try:
|
|
81
|
-
return
|
|
81
|
+
return readpdf_pymupdf(pdf, first=first, last=last)
|
|
82
82
|
except ImportError:
|
|
83
83
|
logger.warning("PyMuPDF not installed, using pdftotext")
|
|
84
84
|
return readpdf_poputils(pdf, first=first, last=last)
|
|
@@ -144,11 +144,11 @@ def parse_doi_from_pdf_metadata_poppler(pdf_path):
|
|
|
144
144
|
pass
|
|
145
145
|
return None
|
|
146
146
|
|
|
147
|
-
def
|
|
148
|
-
"""Extract DOI from PDF metadata using PyMuPDF
|
|
149
|
-
import
|
|
147
|
+
def parse_doi_from_pdf_metadata_pymupdf(pdf_path):
|
|
148
|
+
"""Extract DOI from PDF metadata using PyMuPDF."""
|
|
149
|
+
import pymupdf
|
|
150
150
|
|
|
151
|
-
with
|
|
151
|
+
with pymupdf.open(pdf_path) as doc:
|
|
152
152
|
metadata = doc.metadata
|
|
153
153
|
|
|
154
154
|
# Try direct metadata fields first
|
|
@@ -170,11 +170,11 @@ def parse_doi_from_pdf_metadata_fitz(pdf_path):
|
|
|
170
170
|
|
|
171
171
|
|
|
172
172
|
def parse_doi_from_pdf_metadata(pdf_path):
|
|
173
|
-
"""Extract DOI from PDF metadata (tries
|
|
174
|
-
# Try
|
|
173
|
+
"""Extract DOI from PDF metadata (tries pymupdf, falls back to poppler)."""
|
|
174
|
+
# Try pymupdf first (no subprocess overhead)
|
|
175
175
|
|
|
176
176
|
try:
|
|
177
|
-
return
|
|
177
|
+
return parse_doi_from_pdf_metadata_pymupdf(pdf_path)
|
|
178
178
|
except ImportError:
|
|
179
179
|
# Fall back to poppler-utils
|
|
180
180
|
return parse_doi_from_pdf_metadata_poppler(pdf_path)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|