papers-cli 2.15__tar.gz → 2.15.1__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.15 → papers_cli-2.15.1}/PKG-INFO +3 -6
- {papers_cli-2.15 → papers_cli-2.15.1}/README.md +2 -5
- {papers_cli-2.15 → papers_cli-2.15.1}/papers/_version.py +2 -2
- {papers_cli-2.15 → papers_cli-2.15.1}/papers/bib.py +1 -2
- {papers_cli-2.15 → papers_cli-2.15.1}/papers/extract.py +6 -3
- {papers_cli-2.15 → papers_cli-2.15.1}/papers_cli.egg-info/PKG-INFO +3 -6
- {papers_cli-2.15 → papers_cli-2.15.1}/.gitattributes +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/.github/FUNDING.yml +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/.github/workflows/pypi.yml +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/.github/workflows/tests.yml +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/.gitignore +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/LICENSE +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/papers/__init__.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/papers/__main__.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/papers/config.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/papers/duplicate.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/papers/encoding.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/papers/filename.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/papers/latexenc.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/papers/utils.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/papers_cli.egg-info/SOURCES.txt +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/papers_cli.egg-info/dependency_links.txt +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/papers_cli.egg-info/entry_points.txt +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/papers_cli.egg-info/requires.txt +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/papers_cli.egg-info/top_level.txt +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/pyproject.toml +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/requirements.txt +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/setup.cfg +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/setup.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/tests/__init__.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/tests/common.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/tests/config.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/tests/download.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/tests/downloadedpapers/.gitignore +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/tests/downloadedpapers/bg-8-515-2011.txt +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/tests/test_add.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/tests/test_biblio.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/tests/test_duplicates.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/tests/test_encoding.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/tests/test_extract.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/tests/test_filecheck.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/tests/test_install.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/tests/test_list.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/tests/test_misc.py +0 -0
- {papers_cli-2.15 → papers_cli-2.15.1}/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.1
|
|
4
4
|
Summary: utilities to keep your PDF library organized
|
|
5
5
|
Author-email: Mahé Perrette <mahe.perrette@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -20,12 +20,9 @@ Requires-Dist: normality
|
|
|
20
20
|
Requires-Dist: bs4
|
|
21
21
|
Dynamic: license-file
|
|
22
22
|
|
|
23
|
-
[]()
|
|
25
|
-
[]()
|
|
26
|
-
[]()
|
|
27
|
-
[]()
|
|
23
|
+
[](https://pypi.org/project/papers-cli)
|
|
28
24
|
[]()
|
|
25
|
+
[](https://github.com/perrette/papers/actions)
|
|
29
26
|
|
|
30
27
|
# papers
|
|
31
28
|
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
[]()
|
|
3
|
-
[]()
|
|
4
|
-
[]()
|
|
5
|
-
[]()
|
|
1
|
+
[](https://pypi.org/project/papers-cli)
|
|
6
2
|
[]()
|
|
3
|
+
[](https://github.com/perrette/papers/actions)
|
|
7
4
|
|
|
8
5
|
# papers
|
|
9
6
|
|
|
@@ -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
|
|
@@ -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
|
-
|
|
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,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: papers-cli
|
|
3
|
-
Version: 2.15
|
|
3
|
+
Version: 2.15.1
|
|
4
4
|
Summary: utilities to keep your PDF library organized
|
|
5
5
|
Author-email: Mahé Perrette <mahe.perrette@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -20,12 +20,9 @@ Requires-Dist: normality
|
|
|
20
20
|
Requires-Dist: bs4
|
|
21
21
|
Dynamic: license-file
|
|
22
22
|
|
|
23
|
-
[]()
|
|
25
|
-
[]()
|
|
26
|
-
[]()
|
|
27
|
-
[]()
|
|
23
|
+
[](https://pypi.org/project/papers-cli)
|
|
28
24
|
[]()
|
|
25
|
+
[](https://github.com/perrette/papers/actions)
|
|
29
26
|
|
|
30
27
|
# papers
|
|
31
28
|
|
|
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
|