papers-cli 2.15__tar.gz → 2.15.2__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 (46) hide show
  1. {papers_cli-2.15 → papers_cli-2.15.2}/PKG-INFO +4 -7
  2. {papers_cli-2.15 → papers_cli-2.15.2}/README.md +2 -5
  3. {papers_cli-2.15 → papers_cli-2.15.2}/papers/__main__.py +1 -1
  4. {papers_cli-2.15 → papers_cli-2.15.2}/papers/_version.py +16 -3
  5. {papers_cli-2.15 → papers_cli-2.15.2}/papers/bib.py +1 -2
  6. papers_cli-2.15.2/papers/compat.py +8 -0
  7. {papers_cli-2.15 → papers_cli-2.15.2}/papers/extract.py +6 -3
  8. {papers_cli-2.15 → papers_cli-2.15.2}/papers/filename.py +1 -1
  9. {papers_cli-2.15 → papers_cli-2.15.2}/papers_cli.egg-info/PKG-INFO +4 -7
  10. {papers_cli-2.15 → papers_cli-2.15.2}/papers_cli.egg-info/SOURCES.txt +1 -0
  11. {papers_cli-2.15 → papers_cli-2.15.2}/papers_cli.egg-info/requires.txt +1 -1
  12. {papers_cli-2.15 → papers_cli-2.15.2}/pyproject.toml +2 -2
  13. {papers_cli-2.15 → papers_cli-2.15.2}/requirements.txt +2 -2
  14. {papers_cli-2.15 → papers_cli-2.15.2}/.gitattributes +0 -0
  15. {papers_cli-2.15 → papers_cli-2.15.2}/.github/FUNDING.yml +0 -0
  16. {papers_cli-2.15 → papers_cli-2.15.2}/.github/workflows/pypi.yml +0 -0
  17. {papers_cli-2.15 → papers_cli-2.15.2}/.github/workflows/tests.yml +0 -0
  18. {papers_cli-2.15 → papers_cli-2.15.2}/.gitignore +0 -0
  19. {papers_cli-2.15 → papers_cli-2.15.2}/LICENSE +0 -0
  20. {papers_cli-2.15 → papers_cli-2.15.2}/papers/__init__.py +0 -0
  21. {papers_cli-2.15 → papers_cli-2.15.2}/papers/config.py +0 -0
  22. {papers_cli-2.15 → papers_cli-2.15.2}/papers/duplicate.py +0 -0
  23. {papers_cli-2.15 → papers_cli-2.15.2}/papers/encoding.py +0 -0
  24. {papers_cli-2.15 → papers_cli-2.15.2}/papers/latexenc.py +0 -0
  25. {papers_cli-2.15 → papers_cli-2.15.2}/papers/utils.py +0 -0
  26. {papers_cli-2.15 → papers_cli-2.15.2}/papers_cli.egg-info/dependency_links.txt +0 -0
  27. {papers_cli-2.15 → papers_cli-2.15.2}/papers_cli.egg-info/entry_points.txt +0 -0
  28. {papers_cli-2.15 → papers_cli-2.15.2}/papers_cli.egg-info/top_level.txt +0 -0
  29. {papers_cli-2.15 → papers_cli-2.15.2}/setup.cfg +0 -0
  30. {papers_cli-2.15 → papers_cli-2.15.2}/setup.py +0 -0
  31. {papers_cli-2.15 → papers_cli-2.15.2}/tests/__init__.py +0 -0
  32. {papers_cli-2.15 → papers_cli-2.15.2}/tests/common.py +0 -0
  33. {papers_cli-2.15 → papers_cli-2.15.2}/tests/config.py +0 -0
  34. {papers_cli-2.15 → papers_cli-2.15.2}/tests/download.py +0 -0
  35. {papers_cli-2.15 → papers_cli-2.15.2}/tests/downloadedpapers/.gitignore +0 -0
  36. {papers_cli-2.15 → papers_cli-2.15.2}/tests/downloadedpapers/bg-8-515-2011.txt +0 -0
  37. {papers_cli-2.15 → papers_cli-2.15.2}/tests/test_add.py +0 -0
  38. {papers_cli-2.15 → papers_cli-2.15.2}/tests/test_biblio.py +0 -0
  39. {papers_cli-2.15 → papers_cli-2.15.2}/tests/test_duplicates.py +0 -0
  40. {papers_cli-2.15 → papers_cli-2.15.2}/tests/test_encoding.py +0 -0
  41. {papers_cli-2.15 → papers_cli-2.15.2}/tests/test_extract.py +0 -0
  42. {papers_cli-2.15 → papers_cli-2.15.2}/tests/test_filecheck.py +0 -0
  43. {papers_cli-2.15 → papers_cli-2.15.2}/tests/test_install.py +0 -0
  44. {papers_cli-2.15 → papers_cli-2.15.2}/tests/test_list.py +0 -0
  45. {papers_cli-2.15 → papers_cli-2.15.2}/tests/test_misc.py +0 -0
  46. {papers_cli-2.15 → papers_cli-2.15.2}/tests/test_undo.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: papers-cli
3
- Version: 2.15
3
+ Version: 2.15.2
4
4
  Summary: utilities to keep your PDF library organized
5
5
  Author-email: Mahé Perrette <mahe.perrette@gmail.com>
6
6
  License: MIT
@@ -16,16 +16,13 @@ Requires-Dist: crossrefapi
16
16
  Requires-Dist: bibtexparser
17
17
  Requires-Dist: scholarly
18
18
  Requires-Dist: rapidfuzz
19
- Requires-Dist: normality
19
+ Requires-Dist: python-slugify
20
20
  Requires-Dist: bs4
21
21
  Dynamic: license-file
22
22
 
23
- [![test](https://github.com/perrette/papers/workflows/CI/badge.svg?query=branch%3Amaster)](https://github.com/perrette/papers/actions)
24
- [![python](https://img.shields.io/badge/python-3.9-blue.svg)]()
25
- [![python](https://img.shields.io/badge/python-3.10-blue.svg)]()
26
- [![python](https://img.shields.io/badge/python-3.11-blue.svg)]()
27
- [![python](https://img.shields.io/badge/python-3.12-blue.svg)]()
23
+ [![pypi](https://img.shields.io/pypi/v/papers-cli)](https://pypi.org/project/papers-cli)
28
24
  [![python](https://img.shields.io/badge/python-3.13-blue.svg)]()
25
+ [![test](https://github.com/perrette/papers/workflows/CI/badge.svg?query=branch%3Amaster)](https://github.com/perrette/papers/actions)
29
26
 
30
27
  # papers
31
28
 
@@ -1,9 +1,6 @@
1
- [![test](https://github.com/perrette/papers/workflows/CI/badge.svg?query=branch%3Amaster)](https://github.com/perrette/papers/actions)
2
- [![python](https://img.shields.io/badge/python-3.9-blue.svg)]()
3
- [![python](https://img.shields.io/badge/python-3.10-blue.svg)]()
4
- [![python](https://img.shields.io/badge/python-3.11-blue.svg)]()
5
- [![python](https://img.shields.io/badge/python-3.12-blue.svg)]()
1
+ [![pypi](https://img.shields.io/pypi/v/papers-cli)](https://pypi.org/project/papers-cli)
6
2
  [![python](https://img.shields.io/badge/python-3.13-blue.svg)]()
3
+ [![test](https://github.com/perrette/papers/workflows/CI/badge.svg?query=branch%3Amaster)](https://github.com/perrette/papers/actions)
7
4
 
8
5
  # papers
9
6
 
@@ -21,6 +21,7 @@ from papers.duplicate import list_duplicates, list_uniques, edit_entries
21
21
  from papers.bib import (Biblio, FUZZY_RATIO, DEFAULT_SIMILARITY, entry_filecheck,
22
22
  backupfile as backupfile_func, isvalidkey, DuplicateKeyError, clean_filesdir)
23
23
  from papers.utils import move, checksum, view_pdf, open_folder
24
+ from papers.compat import slugify
24
25
  from papers import __version__
25
26
 
26
27
 
@@ -424,7 +425,6 @@ def installcmd(parser, o, config):
424
425
  config.gitdir = o.gitdir
425
426
 
426
427
  elif config.bibtex is not None:
427
- from normality import slugify
428
428
  bibi = config.bibtex[:-len(".bib")] if config.bibtex.endswith(".bib") else config.bibtex
429
429
  config.gitdir = os.path.join(BACKUP_DIR, slugify(bibi))
430
430
 
@@ -1,7 +1,14 @@
1
1
  # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
3
 
4
- __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
5
12
 
6
13
  TYPE_CHECKING = False
7
14
  if TYPE_CHECKING:
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
9
16
  from typing import Union
10
17
 
11
18
  VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
12
20
  else:
13
21
  VERSION_TUPLE = object
22
+ COMMIT_ID = object
14
23
 
15
24
  version: str
16
25
  __version__: str
17
26
  __version_tuple__: VERSION_TUPLE
18
27
  version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
19
30
 
20
- __version__ = version = '2.15'
21
- __version_tuple__ = version_tuple = (2, 15)
31
+ __version__ = version = '2.15.2'
32
+ __version_tuple__ = version_tuple = (2, 15, 2)
33
+
34
+ __commit_id__ = commit_id = 'g08670fade'
@@ -435,7 +435,6 @@ class Biblio:
435
435
  bibtex = fetch_bibtex_by_doi(doi)
436
436
  else:
437
437
  bibtex = extract_pdf_metadata(pdf, search_doi, search_fulltext, scholar=scholar)
438
-
439
438
  bib = bibtexparser.loads(bibtex)
440
439
  entry = bib.entries[0]
441
440
 
@@ -892,4 +891,4 @@ def clean_filesdir(biblio, interactive=True, ignore_files=None, ignore_folders=N
892
891
 
893
892
  break
894
893
 
895
- return removed_files
894
+ return removed_files
@@ -0,0 +1,8 @@
1
+ # compat
2
+ from slugify import slugify
3
+ from unidecode import unidecode
4
+
5
+ def normalize(text):
6
+ if text is None:
7
+ return None
8
+ return unidecode(text).strip()
@@ -279,7 +279,7 @@ def fetch_bibtex_by_doi(doi):
279
279
  pass
280
280
 
281
281
  try:
282
- return fetch_bibtex_on_journal_website(doi)
282
+ return fetch_bibtex_on_journal_website(doi, as_string=True)
283
283
  except:
284
284
  pass
285
285
 
@@ -525,13 +525,16 @@ def parse_bibtex(bibtex_content, target_doi):
525
525
  return entry
526
526
  return None
527
527
 
528
- def fetch_bibtex_on_journal_website(doi):
528
+ def fetch_bibtex_on_journal_website(doi, as_string=False):
529
529
  base_url = f"https://doi.org/{doi}"
530
530
  html_content = fetch_html(base_url)
531
531
  for bibtex_url in find_bibtex_links(html_content, base_url):
532
532
  bibtex_content = download_bibtex(bibtex_url)
533
533
  bibtex_entry = parse_bibtex(bibtex_content, doi)
534
534
  if bibtex_entry:
535
- return bibtex_entry
535
+ if as_string:
536
+ return bibtex_content
537
+ else:
538
+ return bibtex_entry
536
539
 
537
540
  raise DOIRequestError("No matching BibTeX entry found for the given DOI.")
@@ -1,7 +1,7 @@
1
1
  """
2
2
  Key and file name formatting
3
3
  """
4
- from normality import slugify, normalize
4
+ from papers.compat import slugify, normalize
5
5
  from papers.encoding import family_names
6
6
 
7
7
  def listtag(words, maxlength=30, minwordlen=3, n=100, sep='-'):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: papers-cli
3
- Version: 2.15
3
+ Version: 2.15.2
4
4
  Summary: utilities to keep your PDF library organized
5
5
  Author-email: Mahé Perrette <mahe.perrette@gmail.com>
6
6
  License: MIT
@@ -16,16 +16,13 @@ Requires-Dist: crossrefapi
16
16
  Requires-Dist: bibtexparser
17
17
  Requires-Dist: scholarly
18
18
  Requires-Dist: rapidfuzz
19
- Requires-Dist: normality
19
+ Requires-Dist: python-slugify
20
20
  Requires-Dist: bs4
21
21
  Dynamic: license-file
22
22
 
23
- [![test](https://github.com/perrette/papers/workflows/CI/badge.svg?query=branch%3Amaster)](https://github.com/perrette/papers/actions)
24
- [![python](https://img.shields.io/badge/python-3.9-blue.svg)]()
25
- [![python](https://img.shields.io/badge/python-3.10-blue.svg)]()
26
- [![python](https://img.shields.io/badge/python-3.11-blue.svg)]()
27
- [![python](https://img.shields.io/badge/python-3.12-blue.svg)]()
23
+ [![pypi](https://img.shields.io/pypi/v/papers-cli)](https://pypi.org/project/papers-cli)
28
24
  [![python](https://img.shields.io/badge/python-3.13-blue.svg)]()
25
+ [![test](https://github.com/perrette/papers/workflows/CI/badge.svg?query=branch%3Amaster)](https://github.com/perrette/papers/actions)
29
26
 
30
27
  # papers
31
28
 
@@ -12,6 +12,7 @@ papers/__init__.py
12
12
  papers/__main__.py
13
13
  papers/_version.py
14
14
  papers/bib.py
15
+ papers/compat.py
15
16
  papers/config.py
16
17
  papers/duplicate.py
17
18
  papers/encoding.py
@@ -4,5 +4,5 @@ crossrefapi
4
4
  bibtexparser
5
5
  scholarly
6
6
  rapidfuzz
7
- normality
7
+ python-slugify
8
8
  bs4
@@ -22,7 +22,7 @@ dependencies = [
22
22
  "bibtexparser",
23
23
  "scholarly",
24
24
  "rapidfuzz",
25
- "normality",
25
+ "python-slugify",
26
26
  "bs4",
27
27
  ]
28
28
  dynamic = ["version"]
@@ -65,7 +65,7 @@ deps =
65
65
  crossrefapi
66
66
  rapidfuzz
67
67
  unidecode
68
- normality
68
+ python-slugify
69
69
  bs4
70
70
  pytest
71
71
  pytest-cov
@@ -4,5 +4,5 @@ crossrefapi
4
4
  bibtexparser < 2.0.0
5
5
  scholarly
6
6
  rapidfuzz
7
- normality
8
- bs4
7
+ bs4
8
+ python-slugify
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