pypaperless-cli2 0.2.0__tar.gz → 0.2.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.
Files changed (31) hide show
  1. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/PKG-INFO +15 -7
  2. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/README.md +14 -6
  3. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/pyproject.toml +1 -1
  4. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/LICENSE +0 -0
  5. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/__init__.py +0 -0
  6. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/api.py +0 -0
  7. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/app.py +0 -0
  8. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/commands/__init__.py +0 -0
  9. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/commands/auth.py +0 -0
  10. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/commands/document/__init__.py +0 -0
  11. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/commands/document/edit.py +0 -0
  12. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/commands/document/show.py +0 -0
  13. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/config/__init__.py +0 -0
  14. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/config/account.py +0 -0
  15. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/config/config.py +0 -0
  16. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/const.py +0 -0
  17. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/py.typed +0 -0
  18. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/utils/__init__.py +0 -0
  19. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/utils/converters/__init__.py +0 -0
  20. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/utils/converters/custom_field.py +0 -0
  21. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/utils/converters/date.py +0 -0
  22. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/utils/converters/helpers/__init__.py +0 -0
  23. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/utils/converters/helpers/strtobool.py +0 -0
  24. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/utils/converters/tag.py +0 -0
  25. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/utils/groups.py +0 -0
  26. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/utils/highlighter.py +0 -0
  27. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/utils/types.py +0 -0
  28. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/utils/validators/__init__.py +0 -0
  29. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/utils/validators/custom_field.py +0 -0
  30. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/utils/validators/document.py +0 -0
  31. {pypaperless_cli2-0.2.0 → pypaperless_cli2-0.2.1}/src/pypaperless_cli/utils/validators/tag.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pypaperless-cli2
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Command-line interface for Paperless-ngx (fork of pypaperless-cli, updated for pypaperless 5.x / Paperless-ngx 3.x)
5
5
  License-File: LICENSE
6
6
  Author: Marcel Brückner
@@ -24,16 +24,14 @@ Description-Content-Type: text/markdown
24
24
 
25
25
  Paperless-ngx Command-Line Interface
26
26
 
27
- This is a fork of [Marcel Brückner's `pypaperless-cli`](https://github.com/marcelbrueckner/paperless-ngx-cli), republished as `pypaperless-cli2` with the `pypaperless` dependency updated to `^5.1.0` for compatibility with Paperless-ngx ≥3.0 (which rejects the older API versions requested by `pypaperless` 4.x with `406 Not Acceptable`). The `pngx` command and all usage below are unchanged from upstream.
27
+ This is a fork of [Marcel Brückner's `pypaperless-cli`](https://github.com/marcelbrueckner/paperless-ngx-cli).
28
28
 
29
- I've recently started a project to collect scripts around Paperless-ngx ([paperless.sh](https://paperless.sh)). It turned out - surprise - to be very tedious to write a separate [script](https://github.com/marcelbrueckner/paperless.sh/blob/6cc85b20482e0281d9e26ab82fcaccf34e27a276/scripts/post-consumption/content-matching/pngx-update-document.py) [each](https://github.com/marcelbrueckner/paperless.sh/blob/6cc85b20482e0281d9e26ab82fcaccf34e27a276/scripts/api/custom-field-sum/custom-field-sum.py) [time](https://github.com/marcelbrueckner/paperless.sh/blob/6cc85b20482e0281d9e26ab82fcaccf34e27a276/scripts/api/custom-field-sum/custom-field-sum-of-differences.py) I need to work with Paperless-ngx's API.
30
- I was looking for a way to easily update certain fields of my documents but without the overhead of "manually" calling API endpoints each time.
31
- I wrapped things in simple python scripts which eventually became this tool which essentially ~~is~~ will become Paperless-ngx at your command-line.
29
+ After updating my Paperless-ngx instances to version 3.x the current pypaperless-cli package has thrown some errors when editing documents.
30
+ I republished the current pypaperless-cli as `pypaperless-cli2` with the `pypaperless` dependency updated to `^5.1.0` for compatibility with Paperless-ngx ≥3.0 (which rejects the older API versions requested by `pypaperless` 4.x with `406 Not Acceptable`).
31
+ The `pngx` command and all usage below are unchanged from upstream.
32
32
 
33
33
  ## Usage
34
34
 
35
- This very first public release currently only allows you to retrieve information or update certain fields of your existing documents (with more to come in the future).
36
-
37
35
  ```bash
38
36
  # Run pngx -h for help
39
37
  $ pngx [ command ] [ subcommand ] [ arguments and parameters ]
@@ -67,6 +65,16 @@ Update a document's title and correspondent.
67
65
  $ pngx document edit <ID> --title "My new document title" --correspondent <CORRESPONDENT_ID>
68
66
  ```
69
67
 
68
+ Update a document's creation date.
69
+
70
+ The Paperless-ngx API expects the date in ISO 8601 format. With Version 0.2.0 of this package comes a dateparser which auto-detects the used date format and converts it to ISO 8601 format.
71
+
72
+ ```bash
73
+ # Set document creation date to "14.09.2026"
74
+ $ pngx document edit <ID> --created-date 14.09.2026
75
+ # The date parser automatically converts the date to 2026-09-14 and uses it in the communication with the API
76
+ ```
77
+
70
78
  Assign or unassign a document's tags.
71
79
 
72
80
  Tags can be specified by ID or the *exact* name. If your tag name contains spaces, wrap it in quotes.
@@ -2,16 +2,14 @@
2
2
 
3
3
  Paperless-ngx Command-Line Interface
4
4
 
5
- This is a fork of [Marcel Brückner's `pypaperless-cli`](https://github.com/marcelbrueckner/paperless-ngx-cli), republished as `pypaperless-cli2` with the `pypaperless` dependency updated to `^5.1.0` for compatibility with Paperless-ngx ≥3.0 (which rejects the older API versions requested by `pypaperless` 4.x with `406 Not Acceptable`). The `pngx` command and all usage below are unchanged from upstream.
5
+ This is a fork of [Marcel Brückner's `pypaperless-cli`](https://github.com/marcelbrueckner/paperless-ngx-cli).
6
6
 
7
- I've recently started a project to collect scripts around Paperless-ngx ([paperless.sh](https://paperless.sh)). It turned out - surprise - to be very tedious to write a separate [script](https://github.com/marcelbrueckner/paperless.sh/blob/6cc85b20482e0281d9e26ab82fcaccf34e27a276/scripts/post-consumption/content-matching/pngx-update-document.py) [each](https://github.com/marcelbrueckner/paperless.sh/blob/6cc85b20482e0281d9e26ab82fcaccf34e27a276/scripts/api/custom-field-sum/custom-field-sum.py) [time](https://github.com/marcelbrueckner/paperless.sh/blob/6cc85b20482e0281d9e26ab82fcaccf34e27a276/scripts/api/custom-field-sum/custom-field-sum-of-differences.py) I need to work with Paperless-ngx's API.
8
- I was looking for a way to easily update certain fields of my documents but without the overhead of "manually" calling API endpoints each time.
9
- I wrapped things in simple python scripts which eventually became this tool which essentially ~~is~~ will become Paperless-ngx at your command-line.
7
+ After updating my Paperless-ngx instances to version 3.x the current pypaperless-cli package has thrown some errors when editing documents.
8
+ I republished the current pypaperless-cli as `pypaperless-cli2` with the `pypaperless` dependency updated to `^5.1.0` for compatibility with Paperless-ngx ≥3.0 (which rejects the older API versions requested by `pypaperless` 4.x with `406 Not Acceptable`).
9
+ The `pngx` command and all usage below are unchanged from upstream.
10
10
 
11
11
  ## Usage
12
12
 
13
- This very first public release currently only allows you to retrieve information or update certain fields of your existing documents (with more to come in the future).
14
-
15
13
  ```bash
16
14
  # Run pngx -h for help
17
15
  $ pngx [ command ] [ subcommand ] [ arguments and parameters ]
@@ -45,6 +43,16 @@ Update a document's title and correspondent.
45
43
  $ pngx document edit <ID> --title "My new document title" --correspondent <CORRESPONDENT_ID>
46
44
  ```
47
45
 
46
+ Update a document's creation date.
47
+
48
+ The Paperless-ngx API expects the date in ISO 8601 format. With Version 0.2.0 of this package comes a dateparser which auto-detects the used date format and converts it to ISO 8601 format.
49
+
50
+ ```bash
51
+ # Set document creation date to "14.09.2026"
52
+ $ pngx document edit <ID> --created-date 14.09.2026
53
+ # The date parser automatically converts the date to 2026-09-14 and uses it in the communication with the API
54
+ ```
55
+
48
56
  Assign or unassign a document's tags.
49
57
 
50
58
  Tags can be specified by ID or the *exact* name. If your tag name contains spaces, wrap it in quotes.
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pypaperless-cli2"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  description = "Command-line interface for Paperless-ngx (fork of pypaperless-cli, updated for pypaperless 5.x / Paperless-ngx 3.x)"
5
5
  authors = ["Marcel Brückner <marcelbrueckner@users.noreply.github.com>"]
6
6
  readme = "README.md"