papers-cli 2.14.2__tar.gz → 2.15__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.14.2 → papers_cli-2.15}/PKG-INFO +4 -2
- {papers_cli-2.14.2 → papers_cli-2.15}/papers/_version.py +2 -2
- {papers_cli-2.14.2 → papers_cli-2.15}/papers/bib.py +11 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/papers_cli.egg-info/PKG-INFO +4 -2
- {papers_cli-2.14.2 → papers_cli-2.15}/papers_cli.egg-info/requires.txt +1 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/pyproject.toml +2 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/requirements.txt +2 -1
- {papers_cli-2.14.2 → papers_cli-2.15}/.gitattributes +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/.github/FUNDING.yml +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/.github/workflows/pypi.yml +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/.github/workflows/tests.yml +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/.gitignore +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/LICENSE +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/README.md +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/papers/__init__.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/papers/__main__.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/papers/config.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/papers/duplicate.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/papers/encoding.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/papers/extract.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/papers/filename.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/papers/latexenc.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/papers/utils.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/papers_cli.egg-info/SOURCES.txt +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/papers_cli.egg-info/dependency_links.txt +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/papers_cli.egg-info/entry_points.txt +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/papers_cli.egg-info/top_level.txt +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/setup.cfg +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/setup.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/tests/__init__.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/tests/common.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/tests/config.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/tests/download.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/tests/downloadedpapers/.gitignore +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/tests/downloadedpapers/bg-8-515-2011.txt +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_add.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_biblio.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_duplicates.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_encoding.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_extract.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_filecheck.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_install.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_list.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_misc.py +0 -0
- {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_undo.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: papers-cli
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.15
|
|
4
4
|
Summary: utilities to keep your PDF library organized
|
|
5
5
|
Author-email: Mahé Perrette <mahe.perrette@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -17,6 +17,8 @@ Requires-Dist: bibtexparser
|
|
|
17
17
|
Requires-Dist: scholarly
|
|
18
18
|
Requires-Dist: rapidfuzz
|
|
19
19
|
Requires-Dist: normality
|
|
20
|
+
Requires-Dist: bs4
|
|
21
|
+
Dynamic: license-file
|
|
20
22
|
|
|
21
23
|
[](https://github.com/perrette/papers/actions)
|
|
22
24
|
[]()
|
|
@@ -420,6 +420,17 @@ class Biblio:
|
|
|
420
420
|
|
|
421
421
|
def add_pdf(self, pdf, attachments=None, search_doi=True, search_fulltext=True, scholar=False, doi=None, **kw):
|
|
422
422
|
|
|
423
|
+
if str(pdf).startswith("http"):
|
|
424
|
+
# if pdf is a URL, download it
|
|
425
|
+
import requests, tempfile
|
|
426
|
+
response = requests.get(pdf)
|
|
427
|
+
if response.status_code == 200:
|
|
428
|
+
pdf = tempfile.NamedTemporaryFile(delete=False, suffix='.pdf').name
|
|
429
|
+
with open(pdf, 'wb') as f:
|
|
430
|
+
f.write(response.content)
|
|
431
|
+
else:
|
|
432
|
+
raise ValueError(f"Failed to download PDF from {pdf}")
|
|
433
|
+
|
|
423
434
|
if doi:
|
|
424
435
|
bibtex = fetch_bibtex_by_doi(doi)
|
|
425
436
|
else:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: papers-cli
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.15
|
|
4
4
|
Summary: utilities to keep your PDF library organized
|
|
5
5
|
Author-email: Mahé Perrette <mahe.perrette@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -17,6 +17,8 @@ Requires-Dist: bibtexparser
|
|
|
17
17
|
Requires-Dist: scholarly
|
|
18
18
|
Requires-Dist: rapidfuzz
|
|
19
19
|
Requires-Dist: normality
|
|
20
|
+
Requires-Dist: bs4
|
|
21
|
+
Dynamic: license-file
|
|
20
22
|
|
|
21
23
|
[](https://github.com/perrette/papers/actions)
|
|
22
24
|
[]()
|
|
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
|