papers-cli 2.4__tar.gz → 2.5__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.4 → papers_cli-2.5}/.github/workflows/tests.yml +1 -1
  2. papers_cli-2.5/.gitignore +15 -0
  3. {papers-cli-2.4 → papers_cli-2.5}/PKG-INFO +26 -11
  4. {papers-cli-2.4 → papers_cli-2.5}/README.md +17 -8
  5. {papers-cli-2.4 → papers_cli-2.5}/papers/__main__.py +249 -109
  6. papers_cli-2.5/papers/_version.py +16 -0
  7. {papers-cli-2.4 → papers_cli-2.5}/papers/bib.py +39 -24
  8. {papers-cli-2.4 → papers_cli-2.5}/papers/config.py +47 -22
  9. {papers-cli-2.4 → papers_cli-2.5}/papers/duplicate.py +1 -1
  10. {papers-cli-2.4 → papers_cli-2.5}/papers/filename.py +42 -18
  11. {papers-cli-2.4 → papers_cli-2.5}/papers/utils.py +43 -6
  12. {papers-cli-2.4 → papers_cli-2.5}/papers_cli.egg-info/PKG-INFO +26 -11
  13. {papers-cli-2.4 → papers_cli-2.5}/papers_cli.egg-info/SOURCES.txt +1 -0
  14. papers_cli-2.5/papers_cli.egg-info/entry_points.txt +2 -0
  15. {papers-cli-2.4 → papers_cli-2.5}/pyproject.toml +14 -14
  16. {papers-cli-2.4 → papers_cli-2.5}/requirements.txt +1 -1
  17. {papers-cli-2.4 → papers_cli-2.5}/tests/common.py +89 -37
  18. {papers-cli-2.4 → papers_cli-2.5}/tests/test_add.py +22 -5
  19. {papers-cli-2.4 → papers_cli-2.5}/tests/test_filecheck.py +1 -1
  20. {papers-cli-2.4 → papers_cli-2.5}/tests/test_install.py +47 -136
  21. {papers-cli-2.4 → papers_cli-2.5}/tests/test_list.py +17 -6
  22. papers_cli-2.5/tests/test_undo.py +438 -0
  23. papers-cli-2.4/.gitignore +0 -8
  24. papers-cli-2.4/papers/_version.py +0 -4
  25. papers-cli-2.4/papers_cli.egg-info/entry_points.txt +0 -2
  26. {papers-cli-2.4 → papers_cli-2.5}/.gitattributes +0 -0
  27. {papers-cli-2.4 → papers_cli-2.5}/LICENSE +0 -0
  28. {papers-cli-2.4 → papers_cli-2.5}/papers/__init__.py +0 -0
  29. {papers-cli-2.4 → papers_cli-2.5}/papers/encoding.py +0 -0
  30. {papers-cli-2.4 → papers_cli-2.5}/papers/extract.py +0 -0
  31. {papers-cli-2.4 → papers_cli-2.5}/papers/latexenc.py +0 -0
  32. {papers-cli-2.4 → papers_cli-2.5}/papers_cli.egg-info/dependency_links.txt +0 -0
  33. {papers-cli-2.4 → papers_cli-2.5}/papers_cli.egg-info/requires.txt +0 -0
  34. {papers-cli-2.4 → papers_cli-2.5}/papers_cli.egg-info/top_level.txt +0 -0
  35. {papers-cli-2.4 → papers_cli-2.5}/setup.cfg +0 -0
  36. {papers-cli-2.4 → papers_cli-2.5}/setup.py +0 -0
  37. {papers-cli-2.4 → papers_cli-2.5}/tests/__init__.py +0 -0
  38. {papers-cli-2.4 → papers_cli-2.5}/tests/config.py +0 -0
  39. {papers-cli-2.4 → papers_cli-2.5}/tests/download.py +0 -0
  40. {papers-cli-2.4 → papers_cli-2.5}/tests/downloadedpapers/.gitignore +0 -0
  41. {papers-cli-2.4 → papers_cli-2.5}/tests/downloadedpapers/bg-8-515-2011.txt +0 -0
  42. {papers-cli-2.4 → papers_cli-2.5}/tests/test_biblio.py +0 -0
  43. {papers-cli-2.4 → papers_cli-2.5}/tests/test_duplicates.py +0 -0
  44. {papers-cli-2.4 → papers_cli-2.5}/tests/test_encoding.py +0 -0
  45. {papers-cli-2.4 → papers_cli-2.5}/tests/test_extract.py +0 -0
  46. {papers-cli-2.4 → papers_cli-2.5}/tests/test_misc.py +0 -0
@@ -10,7 +10,7 @@ jobs:
10
10
  runs-on: ubuntu-latest
11
11
  strategy:
12
12
  matrix:
13
- python-version: [ "3.8", "3.9", "3.10" ]
13
+ python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
14
14
 
15
15
  steps:
16
16
  - uses: actions/checkout@v2
@@ -0,0 +1,15 @@
1
+ *.egg-info/
2
+ *.pyc
3
+ .tox
4
+ .cache
5
+ __pycache__
6
+ build
7
+ MANIFEST
8
+ papers/_version.py
9
+ dist/
10
+ .coverage
11
+ htmlcov/
12
+ .venv
13
+ .pytest_cache
14
+ papers.sublime-project
15
+ papers.sublime-workspace
@@ -1,21 +1,28 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: papers-cli
3
- Version: 2.4
3
+ Version: 2.5
4
4
  Summary: utilities to keep your PDF library organized
5
5
  Author-email: Mahé Perrette <mahe.perrette@gmail.com>
6
6
  License: MIT
7
7
  Project-URL: homepage, https://github.com/perrette/papers
8
8
  Keywords: bibtex,references,bibliography
9
9
  Classifier: Programming Language :: Python :: 3
10
- Requires-Python: >=3.7
10
+ Requires-Python: >=3.9
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
+ Requires-Dist: unidecode
14
+ Requires-Dist: crossrefapi
15
+ Requires-Dist: bibtexparser
16
+ Requires-Dist: scholarly
17
+ Requires-Dist: rapidfuzz
18
+ Requires-Dist: normality
13
19
 
14
20
  [![test](https://github.com/perrette/papers/workflows/CI/badge.svg)](https://github.com/perrette/papers/actions)
15
- [![python](https://img.shields.io/badge/python-3.8-blue.svg)]()
16
21
  [![python](https://img.shields.io/badge/python-3.9-blue.svg)]()
17
22
  [![python](https://img.shields.io/badge/python-3.10-blue.svg)]()
18
23
  [![python](https://img.shields.io/badge/python-3.11-blue.svg)]()
24
+ [![python](https://img.shields.io/badge/python-3.12-blue.svg)]()
25
+ [![python](https://img.shields.io/badge/python-3.13-blue.svg)]()
19
26
 
20
27
  # papers
21
28
 
@@ -27,7 +34,7 @@ That said, it is becoming useful :)
27
34
  ## Motivation
28
35
 
29
36
  This project is an attempt to create a light-weight,
30
- command-line bibliography managenent tool. Aims:
37
+ command-line bibliography management tool. Aims:
31
38
 
32
39
  - maintain a PDF library (with appropriate naming)
33
40
  - maintain one or several bibtex-compatible collections, linked to PDFs
@@ -36,7 +43,7 @@ command-line bibliography managenent tool. Aims:
36
43
 
37
44
  ## Dependencies
38
45
 
39
- - python 3.8+
46
+ - python 3.9+
40
47
  - [poppler-utils](https://en.wikipedia.org/wiki/Poppler_(software)) (only:`pdftotext`): convert PDF to text for parsing
41
48
  - [bibtexparser](https://bibtexparser.readthedocs.io) : parse bibtex files
42
49
  - [crossrefapi](https://github.com/fabiobatalha/crossrefapi) : make polite requests to crossref API
@@ -103,7 +110,15 @@ If you already know the DOI of a PDF, and don't want to gamble the fulltext sear
103
110
  The `add` command above also works without any PDF (create a bibtex entry without file attachment).
104
111
 
105
112
  papers add --doi 10.5194/esd-4-11-2013 --bibtex papers.bib
106
-
113
+
114
+
115
+ ### Add entry without DOI from bibtex library + PDF
116
+
117
+ Some old files don't have a DOI. Best is to add the entry from its bibtex:
118
+
119
+ papers add entry.bib --attachment esd-4-11-2013.pdf
120
+
121
+
107
122
  ### List entries (and edit etc...)
108
123
 
109
124
  Pretty listing (-1 or -l for one-liner listing, otherwise plain bibtex):
@@ -206,7 +221,7 @@ Sometimes it is desirable to have separate configurations. In that case a local
206
221
  Bibtex file name [default to existing: papers.bib] [Enter/Yes/No]:
207
222
  Files folder [default to new: papers] [Enter/Yes/No]: pdfs
208
223
  papers configuration
209
- * configuration file: .papers/config.json
224
+ * configuration file: papersconfig.json
210
225
  * cache directory: /home/perrette/.cache/papers
211
226
  * absolute paths: True
212
227
  * git-tracked: False
@@ -234,7 +249,7 @@ and remove the configuration file by hand (`rm ...`). Or use `papers uninstall`
234
249
 
235
250
  papers uninstall
236
251
 
237
- You may repeat `papers status -v` and cleaning until a satistfying state is reached, or remove all config files recursively up to (and including) global install:
252
+ You may repeat `papers status -v` and cleaning until a satisfying state is reached, or remove all config files recursively up to (and including) global install:
238
253
 
239
254
  papers uninstall --recursive
240
255
 
@@ -242,7 +257,7 @@ You may repeat `papers status -v` and cleaning until a satistfying state is reac
242
257
  ### Relative versus Absolute path
243
258
 
244
259
  By default, the file paths in the bibtex are stored as absolute paths (starting with `/`), except for local installs.
245
- It is possible to change this behavious explicitly during install or in a case by case basis with `--relative-paths` or `--absolute-paths` options.
260
+ It is possible to change this behaviour explicitly during install or in a case by case basis with `--relative-paths` or `--absolute-paths` options.
246
261
  With or without install.
247
262
 
248
263
 
@@ -255,7 +270,7 @@ Simple cases are:
255
270
  In any other cases, you risk breaking the file links.
256
271
 
257
272
  Papers tries to be as little opinionated as possible about how files are organized, and so it relies on your own judgement and use case.
258
- When loading a bibtex, it always inteprete relative file links as being relative to the bibtex file.
273
+ When loading a bibtex, it always interprete relative file links as being relative to the bibtex file.
259
274
  When saving a bibtex, it will save file links accordingly to the default setting path (usually absolute, unless local install or unless you specify otherwise).
260
275
 
261
276
  In any case, the following set of commands will always work provided the initial file links are valid (optional parameters in brackets):
@@ -1,8 +1,9 @@
1
1
  [![test](https://github.com/perrette/papers/workflows/CI/badge.svg)](https://github.com/perrette/papers/actions)
2
- [![python](https://img.shields.io/badge/python-3.8-blue.svg)]()
3
2
  [![python](https://img.shields.io/badge/python-3.9-blue.svg)]()
4
3
  [![python](https://img.shields.io/badge/python-3.10-blue.svg)]()
5
4
  [![python](https://img.shields.io/badge/python-3.11-blue.svg)]()
5
+ [![python](https://img.shields.io/badge/python-3.12-blue.svg)]()
6
+ [![python](https://img.shields.io/badge/python-3.13-blue.svg)]()
6
7
 
7
8
  # papers
8
9
 
@@ -14,7 +15,7 @@ That said, it is becoming useful :)
14
15
  ## Motivation
15
16
 
16
17
  This project is an attempt to create a light-weight,
17
- command-line bibliography managenent tool. Aims:
18
+ command-line bibliography management tool. Aims:
18
19
 
19
20
  - maintain a PDF library (with appropriate naming)
20
21
  - maintain one or several bibtex-compatible collections, linked to PDFs
@@ -23,7 +24,7 @@ command-line bibliography managenent tool. Aims:
23
24
 
24
25
  ## Dependencies
25
26
 
26
- - python 3.8+
27
+ - python 3.9+
27
28
  - [poppler-utils](https://en.wikipedia.org/wiki/Poppler_(software)) (only:`pdftotext`): convert PDF to text for parsing
28
29
  - [bibtexparser](https://bibtexparser.readthedocs.io) : parse bibtex files
29
30
  - [crossrefapi](https://github.com/fabiobatalha/crossrefapi) : make polite requests to crossref API
@@ -90,7 +91,15 @@ If you already know the DOI of a PDF, and don't want to gamble the fulltext sear
90
91
  The `add` command above also works without any PDF (create a bibtex entry without file attachment).
91
92
 
92
93
  papers add --doi 10.5194/esd-4-11-2013 --bibtex papers.bib
93
-
94
+
95
+
96
+ ### Add entry without DOI from bibtex library + PDF
97
+
98
+ Some old files don't have a DOI. Best is to add the entry from its bibtex:
99
+
100
+ papers add entry.bib --attachment esd-4-11-2013.pdf
101
+
102
+
94
103
  ### List entries (and edit etc...)
95
104
 
96
105
  Pretty listing (-1 or -l for one-liner listing, otherwise plain bibtex):
@@ -193,7 +202,7 @@ Sometimes it is desirable to have separate configurations. In that case a local
193
202
  Bibtex file name [default to existing: papers.bib] [Enter/Yes/No]:
194
203
  Files folder [default to new: papers] [Enter/Yes/No]: pdfs
195
204
  papers configuration
196
- * configuration file: .papers/config.json
205
+ * configuration file: papersconfig.json
197
206
  * cache directory: /home/perrette/.cache/papers
198
207
  * absolute paths: True
199
208
  * git-tracked: False
@@ -221,7 +230,7 @@ and remove the configuration file by hand (`rm ...`). Or use `papers uninstall`
221
230
 
222
231
  papers uninstall
223
232
 
224
- You may repeat `papers status -v` and cleaning until a satistfying state is reached, or remove all config files recursively up to (and including) global install:
233
+ You may repeat `papers status -v` and cleaning until a satisfying state is reached, or remove all config files recursively up to (and including) global install:
225
234
 
226
235
  papers uninstall --recursive
227
236
 
@@ -229,7 +238,7 @@ You may repeat `papers status -v` and cleaning until a satistfying state is reac
229
238
  ### Relative versus Absolute path
230
239
 
231
240
  By default, the file paths in the bibtex are stored as absolute paths (starting with `/`), except for local installs.
232
- It is possible to change this behavious explicitly during install or in a case by case basis with `--relative-paths` or `--absolute-paths` options.
241
+ It is possible to change this behaviour explicitly during install or in a case by case basis with `--relative-paths` or `--absolute-paths` options.
233
242
  With or without install.
234
243
 
235
244
 
@@ -242,7 +251,7 @@ Simple cases are:
242
251
  In any other cases, you risk breaking the file links.
243
252
 
244
253
  Papers tries to be as little opinionated as possible about how files are organized, and so it relies on your own judgement and use case.
245
- When loading a bibtex, it always inteprete relative file links as being relative to the bibtex file.
254
+ When loading a bibtex, it always interprete relative file links as being relative to the bibtex file.
246
255
  When saving a bibtex, it will save file links accordingly to the default setting path (usually absolute, unless local install or unless you specify otherwise).
247
256
 
248
257
  In any case, the following set of commands will always work provided the initial file links are valid (optional parameters in brackets):