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.
- {papers-cli-2.4 → papers_cli-2.5}/.github/workflows/tests.yml +1 -1
- papers_cli-2.5/.gitignore +15 -0
- {papers-cli-2.4 → papers_cli-2.5}/PKG-INFO +26 -11
- {papers-cli-2.4 → papers_cli-2.5}/README.md +17 -8
- {papers-cli-2.4 → papers_cli-2.5}/papers/__main__.py +249 -109
- papers_cli-2.5/papers/_version.py +16 -0
- {papers-cli-2.4 → papers_cli-2.5}/papers/bib.py +39 -24
- {papers-cli-2.4 → papers_cli-2.5}/papers/config.py +47 -22
- {papers-cli-2.4 → papers_cli-2.5}/papers/duplicate.py +1 -1
- {papers-cli-2.4 → papers_cli-2.5}/papers/filename.py +42 -18
- {papers-cli-2.4 → papers_cli-2.5}/papers/utils.py +43 -6
- {papers-cli-2.4 → papers_cli-2.5}/papers_cli.egg-info/PKG-INFO +26 -11
- {papers-cli-2.4 → papers_cli-2.5}/papers_cli.egg-info/SOURCES.txt +1 -0
- papers_cli-2.5/papers_cli.egg-info/entry_points.txt +2 -0
- {papers-cli-2.4 → papers_cli-2.5}/pyproject.toml +14 -14
- {papers-cli-2.4 → papers_cli-2.5}/requirements.txt +1 -1
- {papers-cli-2.4 → papers_cli-2.5}/tests/common.py +89 -37
- {papers-cli-2.4 → papers_cli-2.5}/tests/test_add.py +22 -5
- {papers-cli-2.4 → papers_cli-2.5}/tests/test_filecheck.py +1 -1
- {papers-cli-2.4 → papers_cli-2.5}/tests/test_install.py +47 -136
- {papers-cli-2.4 → papers_cli-2.5}/tests/test_list.py +17 -6
- papers_cli-2.5/tests/test_undo.py +438 -0
- papers-cli-2.4/.gitignore +0 -8
- papers-cli-2.4/papers/_version.py +0 -4
- papers-cli-2.4/papers_cli.egg-info/entry_points.txt +0 -2
- {papers-cli-2.4 → papers_cli-2.5}/.gitattributes +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/LICENSE +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/papers/__init__.py +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/papers/encoding.py +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/papers/extract.py +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/papers/latexenc.py +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/papers_cli.egg-info/dependency_links.txt +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/papers_cli.egg-info/requires.txt +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/papers_cli.egg-info/top_level.txt +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/setup.cfg +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/setup.py +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/tests/__init__.py +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/tests/config.py +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/tests/download.py +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/tests/downloadedpapers/.gitignore +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/tests/downloadedpapers/bg-8-515-2011.txt +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/tests/test_biblio.py +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/tests/test_duplicates.py +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/tests/test_encoding.py +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/tests/test_extract.py +0 -0
- {papers-cli-2.4 → papers_cli-2.5}/tests/test_misc.py +0 -0
|
@@ -1,21 +1,28 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: papers-cli
|
|
3
|
-
Version: 2.
|
|
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.
|
|
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
|
[](https://github.com/perrette/papers/actions)
|
|
15
|
-
[]()
|
|
16
21
|
[]()
|
|
17
22
|
[]()
|
|
18
23
|
[]()
|
|
24
|
+
[]()
|
|
25
|
+
[]()
|
|
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
|
|
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.
|
|
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: .
|
|
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
|
|
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
|
|
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
|
|
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
|
[](https://github.com/perrette/papers/actions)
|
|
2
|
-
[]()
|
|
3
2
|
[]()
|
|
4
3
|
[]()
|
|
5
4
|
[]()
|
|
5
|
+
[]()
|
|
6
|
+
[]()
|
|
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
|
|
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.
|
|
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: .
|
|
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
|
|
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
|
|
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
|
|
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):
|