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.
Files changed (45) hide show
  1. {papers_cli-2.14.2 → papers_cli-2.15}/PKG-INFO +4 -2
  2. {papers_cli-2.14.2 → papers_cli-2.15}/papers/_version.py +2 -2
  3. {papers_cli-2.14.2 → papers_cli-2.15}/papers/bib.py +11 -0
  4. {papers_cli-2.14.2 → papers_cli-2.15}/papers_cli.egg-info/PKG-INFO +4 -2
  5. {papers_cli-2.14.2 → papers_cli-2.15}/papers_cli.egg-info/requires.txt +1 -0
  6. {papers_cli-2.14.2 → papers_cli-2.15}/pyproject.toml +2 -0
  7. {papers_cli-2.14.2 → papers_cli-2.15}/requirements.txt +2 -1
  8. {papers_cli-2.14.2 → papers_cli-2.15}/.gitattributes +0 -0
  9. {papers_cli-2.14.2 → papers_cli-2.15}/.github/FUNDING.yml +0 -0
  10. {papers_cli-2.14.2 → papers_cli-2.15}/.github/workflows/pypi.yml +0 -0
  11. {papers_cli-2.14.2 → papers_cli-2.15}/.github/workflows/tests.yml +0 -0
  12. {papers_cli-2.14.2 → papers_cli-2.15}/.gitignore +0 -0
  13. {papers_cli-2.14.2 → papers_cli-2.15}/LICENSE +0 -0
  14. {papers_cli-2.14.2 → papers_cli-2.15}/README.md +0 -0
  15. {papers_cli-2.14.2 → papers_cli-2.15}/papers/__init__.py +0 -0
  16. {papers_cli-2.14.2 → papers_cli-2.15}/papers/__main__.py +0 -0
  17. {papers_cli-2.14.2 → papers_cli-2.15}/papers/config.py +0 -0
  18. {papers_cli-2.14.2 → papers_cli-2.15}/papers/duplicate.py +0 -0
  19. {papers_cli-2.14.2 → papers_cli-2.15}/papers/encoding.py +0 -0
  20. {papers_cli-2.14.2 → papers_cli-2.15}/papers/extract.py +0 -0
  21. {papers_cli-2.14.2 → papers_cli-2.15}/papers/filename.py +0 -0
  22. {papers_cli-2.14.2 → papers_cli-2.15}/papers/latexenc.py +0 -0
  23. {papers_cli-2.14.2 → papers_cli-2.15}/papers/utils.py +0 -0
  24. {papers_cli-2.14.2 → papers_cli-2.15}/papers_cli.egg-info/SOURCES.txt +0 -0
  25. {papers_cli-2.14.2 → papers_cli-2.15}/papers_cli.egg-info/dependency_links.txt +0 -0
  26. {papers_cli-2.14.2 → papers_cli-2.15}/papers_cli.egg-info/entry_points.txt +0 -0
  27. {papers_cli-2.14.2 → papers_cli-2.15}/papers_cli.egg-info/top_level.txt +0 -0
  28. {papers_cli-2.14.2 → papers_cli-2.15}/setup.cfg +0 -0
  29. {papers_cli-2.14.2 → papers_cli-2.15}/setup.py +0 -0
  30. {papers_cli-2.14.2 → papers_cli-2.15}/tests/__init__.py +0 -0
  31. {papers_cli-2.14.2 → papers_cli-2.15}/tests/common.py +0 -0
  32. {papers_cli-2.14.2 → papers_cli-2.15}/tests/config.py +0 -0
  33. {papers_cli-2.14.2 → papers_cli-2.15}/tests/download.py +0 -0
  34. {papers_cli-2.14.2 → papers_cli-2.15}/tests/downloadedpapers/.gitignore +0 -0
  35. {papers_cli-2.14.2 → papers_cli-2.15}/tests/downloadedpapers/bg-8-515-2011.txt +0 -0
  36. {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_add.py +0 -0
  37. {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_biblio.py +0 -0
  38. {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_duplicates.py +0 -0
  39. {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_encoding.py +0 -0
  40. {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_extract.py +0 -0
  41. {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_filecheck.py +0 -0
  42. {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_install.py +0 -0
  43. {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_list.py +0 -0
  44. {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_misc.py +0 -0
  45. {papers_cli-2.14.2 → papers_cli-2.15}/tests/test_undo.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: papers-cli
3
- Version: 2.14.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
  [![test](https://github.com/perrette/papers/workflows/CI/badge.svg?query=branch%3Amaster)](https://github.com/perrette/papers/actions)
22
24
  [![python](https://img.shields.io/badge/python-3.9-blue.svg)]()
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '2.14.2'
21
- __version_tuple__ = version_tuple = (2, 14, 2)
20
+ __version__ = version = '2.15'
21
+ __version_tuple__ = version_tuple = (2, 15)
@@ -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.2
1
+ Metadata-Version: 2.4
2
2
  Name: papers-cli
3
- Version: 2.14.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
  [![test](https://github.com/perrette/papers/workflows/CI/badge.svg?query=branch%3Amaster)](https://github.com/perrette/papers/actions)
22
24
  [![python](https://img.shields.io/badge/python-3.9-blue.svg)]()
@@ -5,3 +5,4 @@ bibtexparser
5
5
  scholarly
6
6
  rapidfuzz
7
7
  normality
8
+ bs4
@@ -23,6 +23,7 @@ dependencies = [
23
23
  "scholarly",
24
24
  "rapidfuzz",
25
25
  "normality",
26
+ "bs4",
26
27
  ]
27
28
  dynamic = ["version"]
28
29
 
@@ -65,6 +66,7 @@ deps =
65
66
  rapidfuzz
66
67
  unidecode
67
68
  normality
69
+ bs4
68
70
  pytest
69
71
  pytest-cov
70
72
  depends =
@@ -4,4 +4,5 @@ crossrefapi
4
4
  bibtexparser < 2.0.0
5
5
  scholarly
6
6
  rapidfuzz
7
- normality
7
+ normality
8
+ bs4
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