Compare commits

..

647 Commits

Author SHA1 Message Date
Quinn Casey
b034e972b0 Merge pull request #902 from paperless-ngx/v1.7.1
v1.7.1
2022-05-10 16:11:12 -07:00
Paperless-ngx Translation Bot [bot]
cdbf81c51c New Crowdin updates (#816)
* New translations messages.xlf (Polish)
[ci skip]

* New translations messages.xlf (Italian)
[ci skip]

* New translations messages.xlf (Luxembourgish)
[ci skip]

* New translations messages.xlf (Portuguese, Brazilian)
[ci skip]

* New translations messages.xlf (Chinese Simplified)
[ci skip]

* New translations messages.xlf (Turkish)
[ci skip]

* New translations messages.xlf (Swedish)
[ci skip]

* New translations messages.xlf (Slovenian)
[ci skip]

* New translations messages.xlf (Slovak)
[ci skip]

* New translations messages.xlf (Portuguese)
[ci skip]

* New translations messages.xlf (Dutch)
[ci skip]

* New translations messages.xlf (Hebrew)
[ci skip]

* New translations messages.xlf (Danish)
[ci skip]

* New translations messages.xlf (Finnish)
[ci skip]

* New translations messages.xlf (Greek)
[ci skip]

* New translations messages.xlf (German)
[ci skip]

* New translations messages.xlf (Czech)
[ci skip]

* New translations messages.xlf (Belarusian)
[ci skip]

* New translations messages.xlf (Spanish)
[ci skip]

* New translations messages.xlf (Romanian)
[ci skip]

* New translations messages.xlf (Russian)
[ci skip]

* New translations messages.xlf (French)
[ci skip]

* New translations messages.xlf (Serbian (Latin))
[ci skip]

* New translations messages.xlf (Arabic, Saudi Arabia)
[ci skip]

* New translations messages.xlf (Belarusian)
[ci skip]

* New translations messages.xlf (Czech)
[ci skip]

* New translations messages.xlf (German)
[ci skip]

* New translations messages.xlf (Chinese Simplified)
[ci skip]

* New translations messages.xlf (Arabic, Saudi Arabia)
[ci skip]

* New translations messages.xlf (Polish)
[ci skip]

* New translations messages.xlf (Italian)
[ci skip]

* New translations messages.xlf (Luxembourgish)
[ci skip]

* New translations messages.xlf (Portuguese, Brazilian)
[ci skip]

* New translations messages.xlf (Chinese Simplified)
[ci skip]

* New translations messages.xlf (Turkish)
[ci skip]

* New translations messages.xlf (Swedish)
[ci skip]

* New translations messages.xlf (Slovenian)
[ci skip]

* New translations messages.xlf (Slovak)
[ci skip]

* New translations messages.xlf (Portuguese)
[ci skip]

* New translations messages.xlf (Dutch)
[ci skip]

* New translations messages.xlf (Hebrew)
[ci skip]

* New translations messages.xlf (Danish)
[ci skip]

* New translations messages.xlf (Finnish)
[ci skip]

* New translations messages.xlf (Greek)
[ci skip]

* New translations messages.xlf (German)
[ci skip]

* New translations messages.xlf (Czech)
[ci skip]

* New translations messages.xlf (Belarusian)
[ci skip]

* New translations messages.xlf (Spanish)
[ci skip]

* New translations messages.xlf (Romanian)
[ci skip]

* New translations messages.xlf (Russian)
[ci skip]

* New translations messages.xlf (French)
[ci skip]

* New translations messages.xlf (Serbian (Latin))
[ci skip]

* New translations messages.xlf (Arabic, Saudi Arabia)
[ci skip]

* New translations messages.xlf (German)
[ci skip]

* New translations messages.xlf (German)
[ci skip]

* New translations messages.xlf (German)
[ci skip]

* New translations messages.xlf (Serbian (Latin))
[ci skip]

* New translations messages.xlf (Serbian (Latin))
[ci skip]

* New translations django.po (Serbian (Latin))
[ci skip]

* New translations messages.xlf (Italian)
[ci skip]

* New translations messages.xlf (Italian)
[ci skip]

* New translations messages.xlf (Danish)
[ci skip]

* New translations messages.xlf (Italian)
[ci skip]

* New translations messages.xlf (Italian)
[ci skip]

* New translations messages.xlf (Polish)
[ci skip]

* New translations messages.xlf (Italian)
[ci skip]

* New translations messages.xlf (Luxembourgish)
[ci skip]

* New translations messages.xlf (Portuguese, Brazilian)
[ci skip]

* New translations messages.xlf (Chinese Simplified)
[ci skip]

* New translations messages.xlf (Turkish)
[ci skip]

* New translations messages.xlf (Swedish)
[ci skip]

* New translations messages.xlf (Slovenian)
[ci skip]

* New translations messages.xlf (Slovak)
[ci skip]

* New translations messages.xlf (Portuguese)
[ci skip]

* New translations messages.xlf (Dutch)
[ci skip]

* New translations messages.xlf (Hebrew)
[ci skip]

* New translations messages.xlf (Danish)
[ci skip]

* New translations messages.xlf (Finnish)
[ci skip]

* New translations messages.xlf (Greek)
[ci skip]

* New translations messages.xlf (German)
[ci skip]

* New translations messages.xlf (Czech)
[ci skip]

* New translations messages.xlf (Belarusian)
[ci skip]

* New translations messages.xlf (Spanish)
[ci skip]

* New translations messages.xlf (Romanian)
[ci skip]

* New translations messages.xlf (Russian)
[ci skip]

* New translations messages.xlf (French)
[ci skip]

* New translations messages.xlf (Serbian (Latin))
[ci skip]

* New translations messages.xlf (Arabic, Saudi Arabia)
[ci skip]

* New translations messages.xlf (German)
[ci skip]

* New translations messages.xlf (Polish)
[ci skip]

* New translations messages.xlf (German)
[ci skip]

* New translations messages.xlf (German)
[ci skip]

* New translations messages.xlf (German)
[ci skip]

* New translations messages.xlf (Spanish)
[ci skip]

* New translations messages.xlf (Spanish)
[ci skip]

* New translations messages.xlf (French)
[ci skip]

* New translations messages.xlf (Chinese Simplified)
[ci skip]
2022-05-09 11:29:26 -07:00
Quinn Casey
d81e4dbe99 Bump version 2022-05-09 09:48:48 -07:00
Trenton Holmes
a789649d97 Merge pull request #890 from paperless-ngx/feature-pyupgrade
(chore) Runs pyupgrade to Python 3.8+
2022-05-09 08:08:54 -07:00
Michael Shamoon
ce32089cc4 fix back button double history bug 2022-05-07 00:08:34 -07:00
shamoon
f0ee2e14fb Merge pull request #888 from paperless-ngx/feature-docker-improvements
Feature: Dockerfile Organization & Enhancements
2022-05-06 14:45:54 -07:00
Quinn Casey
9b8a490061 Merge pull request #881 from paperless-ngx/feature-fix-saved-view-query-params
Feature / fix saved view & sort field query params
2022-05-06 12:45:22 -07:00
Michael Shamoon
4da49c8d59 Ensure retain all params when loading saved views 2022-05-06 11:27:18 -07:00
Trenton Holmes
3960093231 Organizes the Dockerfile from top to bottom in order of least changing. Uses RUN bind mounts to avoid copies of the installer being included in the final image 2022-05-06 10:27:18 -07:00
Trenton Holmes
3003bdd507 Runs pyupgrade to Python 3.8+ and adds a hook for it 2022-05-06 09:04:08 -07:00
Quinn Casey
7909b30b4b Merge pull request #853 from lippoliv/bugfix-document_exporter-document-dates-are-off-by-one-day-#267
Bugfix document exporter document dates are off by one day #267
2022-05-05 09:59:11 -07:00
Quinn Casey
905a34188d Merge pull request #882 from paperless-ngx/bugfix-q-cluster-setting
Fix: Minor update to Q Cluster Configuration
2022-05-05 09:22:17 -07:00
Michael Shamoon
261cab8450 support sort fields & some refactoring 2022-05-05 08:36:18 -07:00
Quinn Casey
7c2137fcda Merge pull request #873 from paperless-ngx/feature-mobile-friendlier-manage-pages
Feature: mobile friendlier manage pages
2022-05-05 07:41:09 -07:00
Trenton Holmes
2c3cb7f516 Adds stopasgroup to the qcluster run command, as recommended by the documentation 2022-05-05 07:37:53 -07:00
Quinn Casey
3d7aa7a4b9 Merge pull request #880 from paperless-ngx/feature-improve-healthcheck
Add timeout to healthcheck
2022-05-05 06:23:10 -07:00
Michael Shamoon
3e8bff03e7 Refactor query param handling to service 2022-05-05 00:23:06 -07:00
Michael Shamoon
584082a1df Add query params for saved views 2022-05-04 22:31:09 -07:00
Michael Shamoon
49644ce18a Add timeout to healthcheck 2022-05-04 18:58:58 -07:00
Trenton Holmes
7432ef9e19 Accounts for Python 3.8 backported zoneinfo 2022-05-04 15:13:17 -07:00
Michael Shamoon
7e271129c7 fix management test failing due to hidden button 2022-05-03 13:14:19 -07:00
Michael Shamoon
b5f95a351c ng extract-i18n 2022-05-03 13:04:28 -07:00
Michael Shamoon
5e10befe28 Mobile friendly management tables 2022-05-03 13:00:42 -07:00
Quinn Casey
98ebb095cc Merge pull request #851 from paperless-ngx/feature-semver-tags
Feature: Use semver for release process
2022-05-03 06:30:11 -07:00
Oliver Lippert
c3b5b47b22 use zoneinfo instead of pytz
Signed-off-by: Oliver Lippert <info@trusty.codes>

#267
2022-05-03 08:08:28 +02:00
Trenton Holmes
3c133c36bd Merge pull request #830 from paperless-ngx/dependabot/github_actions/dev/tj-actions/changed-files-19
Bump tj-actions/changed-files from 18.7 to 19
2022-05-02 16:13:58 -07:00
dependabot[bot]
9ceb2e6084 Bump tj-actions/changed-files from 18.7 to 19
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 18.7 to 19.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v18.7...v19)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 23:00:56 +00:00
Quinn Casey
2b322b638e Merge pull request #866 from paperless-ngx/feature-arm-tika-consolidate
Deployment: Consolidate tika compose files
2022-05-02 15:56:02 -07:00
phail
0d298d743a Add log messages for mail errors (#727)
* adapt to starttls interface change in imap_tools
pin imap-tools version to avoid breaking changes
improve mail log

* fix unittest

* remove uneeded print and fix merge fail

* bump to next version
2022-05-02 15:54:51 -07:00
shamoon
ec5d80585d Merge pull request #869 from paperless-ngx/feature-update-deps
Chore: Update dependency lock file
2022-05-02 15:44:38 -07:00
Trenton Holmes
88e71e12b1 Manually updates dependencies 2022-05-02 15:11:45 -07:00
Quinn Casey
63bb72caab Merge pull request #867 from paperless-ngx/dependabot/pip/dev/asgiref-3.5.1
Bump asgiref from 3.5.0 to 3.5.1
2022-05-02 14:27:40 -07:00
dependabot[bot]
240c7913e9 Bump asgiref from 3.5.0 to 3.5.1
Bumps [asgiref](https://github.com/django/asgiref) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/django/asgiref/releases)
- [Changelog](https://github.com/django/asgiref/blob/main/CHANGELOG.txt)
- [Commits](https://github.com/django/asgiref/compare/3.5.0...3.5.1)

---
updated-dependencies:
- dependency-name: asgiref
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 20:38:20 +00:00
Quinn Casey
582629a996 Chore: Improve Bug Report template (#859)
* Try to get architecture in BR

* Move screenshots to Description

* Add link to search

* Specify doc page

* Clarify bug report intro

* Add missing period

* Other missing periods for consistiency

* Add line breaks, architecture req

* Expand Currently...

* Removing trailing quote
2022-05-02 11:35:06 -07:00
Quinn Casey
939dd17910 Update Gotenberg to 7.4 2022-05-02 09:16:42 -07:00
Quinn Casey
d58b1a7de7 Update Tika documentation 2022-05-02 09:02:29 -07:00
Quinn Casey
a938895e5e Use our arm compatible tika container 2022-05-02 08:23:04 -07:00
Quinn Casey
9d9111e4d8 Merge pull request #864 from paperless-ngx/fix-863
Always accept yyyy-mm-dd date inputs
2022-05-02 08:10:49 -07:00
shamoon
79dbfce36f Merge pull request #860 from paperless-ngx/dependabot/npm_and_yarn/src-ui/dev/jest-28.0.3
Bump jest from 27.5.1 to 28.0.3 in /src-ui and related packages
2022-05-02 01:29:43 -07:00
shamoon
e7f162e5e5 setup-jest compatibility with v28 2022-05-02 01:24:24 -07:00
shamoon
f23d10f000 Add jest-environment-jsdom, update jest-preset-angular 2022-05-02 01:24:24 -07:00
dependabot[bot]
67dd86988b Bump jest from 27.5.1 to 28.0.3 in /src-ui
Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 27.5.1 to 28.0.3.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v28.0.3/packages/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 01:21:57 -07:00
Michael Shamoon
e16ab324f4 Always accept yyyy-mm-dd date inputs 2022-05-01 21:38:04 -07:00
Quinn Casey
317926f379 Merge pull request #849 from paperless-ngx/feature-fix-image-local-build
Fix local Docker image building
2022-05-01 16:02:56 -07:00
Quinn Casey
fe61ca2c97 Merge pull request #862 from paperless-ngx/fix-date-input-errors
Fix: show errors on invalid date input
2022-05-01 15:48:32 -07:00
Michael Shamoon
2940686fba show errors on invalid date input 2022-05-01 14:07:31 -07:00
Trenton Holmes
2ef2a561ef Fixes beta or rcs from updating the latest Docker tag 2022-05-01 13:58:24 -07:00
shamoon
7ae31def4f Merge pull request #852 from paperless-ngx/fix-818
Fix: Older dates do not display on frontend
2022-05-01 13:36:55 -07:00
shamoon
8f038d7d26 Merge pull request #861 from paperless-ngx/dependabot/npm_and_yarn/src-ui/dev/ng-bootstrap/ng-bootstrap-12.1.1
Bump @ng-bootstrap/ng-bootstrap from 12.1.0 to 12.1.1 in /src-ui
2022-05-01 13:36:33 -07:00
Trenton Holmes
b9a2652013 Fixing up more locations of the old tag naming style 2022-05-01 13:21:10 -07:00
Trenton Holmes
dce4166bc8 First changes for using semver everywhere 2022-05-01 13:21:10 -07:00
dependabot[bot]
3c5f509bc7 Bump @ng-bootstrap/ng-bootstrap from 12.1.0 to 12.1.1 in /src-ui
Bumps [@ng-bootstrap/ng-bootstrap](https://github.com/ng-bootstrap/ng-bootstrap) from 12.1.0 to 12.1.1.
- [Release notes](https://github.com/ng-bootstrap/ng-bootstrap/releases)
- [Changelog](https://github.com/ng-bootstrap/ng-bootstrap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ng-bootstrap/ng-bootstrap/compare/12.1.0...12.1.1)

---
updated-dependencies:
- dependency-name: "@ng-bootstrap/ng-bootstrap"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-01 20:07:08 +00:00
Oliver Lippert
182cea3385 always use datetime.date.isoformat to generate filename
fixes #267

Signed-off-by: Oliver Lippert <info@trusty.codes>
2022-05-01 08:54:41 +02:00
Oliver Lippert
0ba1ba55bd add test for filename expectation with modified timezone
Signed-off-by: Oliver Lippert <info@trusty.codes>

#267
2022-05-01 08:41:38 +02:00
Michael Shamoon
45440eec1d handle very old date strings 2022-04-30 22:01:04 -07:00
Trenton Holmes
49fad14920 Updates the Dockerfile to facilitate local image builds, adds documentation for how to build, adds registry caching for final image too 2022-04-30 10:33:09 -07:00
Quinn Casey
0f1e31643d Merge pull request #725 from paperless-ngx/bugfix-imap-utf8-login
Fixes IMAP UTF8 Authenication
2022-04-29 10:31:38 -07:00
Quinn Casey
c17c291b1c Merge pull request #840 from paperless-ngx/fix-password-field-remains-visible
Fix password field remains visible
2022-04-29 07:08:51 -07:00
Michael Shamoon
666641f990 reset password field visibility 2022-04-28 21:07:25 -07:00
Michael Shamoon
268f99f8ac Bump angular to 13.3.5, builders to 13.3.4, types/node to 17.0.30
Supersedes #831, #832, #838, #839
2022-04-28 20:34:35 -07:00
shamoon
216f048466 Merge pull request #833 from paperless-ngx/dependabot/npm_and_yarn/src-ui/dev/types/node-17.0.29
Bump @types/node from 17.0.27 to 17.0.29 in /src-ui
2022-04-28 20:11:12 -07:00
shamoon
ed8d5f1a80 Merge pull request #834 from paperless-ngx/dependabot/npm_and_yarn/src-ui/dev/ng-bootstrap/ng-bootstrap-12.1.0
Bump @ng-bootstrap/ng-bootstrap from 12.0.2 to 12.1.0 in /src-ui
2022-04-28 20:10:24 -07:00
dependabot[bot]
27a1ef25a5 Bump @ng-bootstrap/ng-bootstrap from 12.0.2 to 12.1.0 in /src-ui
Bumps [@ng-bootstrap/ng-bootstrap](https://github.com/ng-bootstrap/ng-bootstrap) from 12.0.2 to 12.1.0.
- [Release notes](https://github.com/ng-bootstrap/ng-bootstrap/releases)
- [Changelog](https://github.com/ng-bootstrap/ng-bootstrap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ng-bootstrap/ng-bootstrap/compare/12.0.2...12.1.0)

---
updated-dependencies:
- dependency-name: "@ng-bootstrap/ng-bootstrap"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-28 21:27:25 +00:00
dependabot[bot]
ecbc8165d5 Bump @types/node from 17.0.27 to 17.0.29 in /src-ui
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.27 to 17.0.29.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-28 21:27:05 +00:00
shamoon
128594584e Merge pull request #829 from paperless-ngx/fix-missing-labels-dep
Fix `dependabot.yml` config
2022-04-28 14:25:13 -07:00
Quinn Casey
8b798013c1 Merge pull request #828 from paperless-ngx/feature-docker-hub-push
Enable Docker Hub push
2022-04-28 13:40:55 -07:00
Quinn Casey
8c19c2c2e9 Fix comment directory 2022-04-28 12:52:20 -07:00
Quinn Casey
6f0fee4c43 Assign GHA bumps to CI/CD team 2022-04-28 12:51:43 -07:00
Quinn Casey
a5b4a7caad Add back review groups 2022-04-28 12:49:44 -07:00
Quinn Casey
c1b9db19c6 Add back labels removed in 30834e 2022-04-28 12:47:37 -07:00
Trenton Holmes
40f88faf37 Updates the workflow to enable Docker Hub pushing 2022-04-28 12:18:25 -07:00
Trenton Holmes
81e6228ab3 Merge pull request #806 from paperless-ngx/dependabot/pip/dev/pytest-7.1.2
Bump pytest from 7.1.1 to 7.1.2
2022-04-28 07:28:15 -07:00
dependabot[bot]
157951343b Bump pytest from 7.1.1 to 7.1.2
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.1.1 to 7.1.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.1.1...7.1.2)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-28 13:33:34 +00:00
Quinn Casey
9325eff6fc Merge pull request #815 from paperless-ngx/feature-fix-pillow-libs
Fixes Pillow build for armv7
2022-04-27 20:27:12 -07:00
Quinn Casey
8c8f366e0f Merge pull request #766 from paperless-ngx/feature-barcode-tiff-support
Feature barcode tiff support
2022-04-27 19:46:16 -07:00
Trenton Holmes
542221a38d Merge pull request #792 from paperless-ngx/dependabot/github_actions/github/codeql-action-2
Bump github/codeql-action from 1 to 2
2022-04-27 19:33:25 -07:00
dependabot[bot]
aa7faaaa72 Bump github/codeql-action from 1 to 2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-28 01:10:48 +00:00
Trenton Holmes
c96db31006 Merge pull request #821 from aruhier/pr_docker
docker: set default postgresql port back to 5432
2022-04-27 18:09:07 -07:00
Anthony Ruhier
c66de5931c docker: set default postgresql port back to 5432
Postgresql default port in the docker prepare script has been changed by
mistake to 5342 in commit c2c8a2754. Set it back to 5432.
2022-04-28 02:04:19 +02:00
Trenton Holmes
fdec13ef81 Updates the Pillow link to a better anchor 2022-04-27 15:48:19 -07:00
Trenton Holmes
9aee44f363 Adds extra system libraries for pikepdf/Pillow building 2022-04-27 15:48:19 -07:00
Trenton Holmes
2caa2d5b32 Merge pull request #820 from paperless-ngx/feature-rebuild-inter-images
Updates GHA workflow to rebuild intermediate images on changes
2022-04-27 15:47:32 -07:00
Trenton Holmes
66c7f44bea Changes the intermediate image building steps to use registry caching, allowig us to always rebuild them, but do so very quickly when nothing has changed 2022-04-27 11:28:55 -07:00
Quinn Casey
99e4a79cb8 Merge pull request #814 from paperless-ngx/update-i18n
Update frontend localization source file
2022-04-26 15:27:14 -07:00
Michael Shamoon
f7f0df60ec Update messages.xlf 2022-04-26 14:46:37 -07:00
Quinn Casey
e012262301 Merge pull request #813 from paperless-ngx/remove-expected-behavior
Remove expected behavior section
2022-04-26 14:21:33 -07:00
Quinn Casey
5676155e4e Remove expected behavior section 2022-04-26 11:15:26 -07:00
Quinn Casey
d98bfa5bed Merge pull request #777 from paperless-ngx/bugfix-install-ocr-settings
Fix install script extra OCR languages format
2022-04-26 11:12:19 -07:00
Quinn Casey
7ccac8053b Merge pull request #788 from paperless-ngx/feature-wait-for-redis
Adds simple Python to wait for Redis broker to be ready
2022-04-26 11:10:01 -07:00
Quinn Casey
40cf46fe7d Merge pull request #758 from paperless-ngx/dependabot/pip/dev/imap-tools-0.54.0
Bump imap-tools from 0.53.0 to 0.54.0
2022-04-26 10:46:32 -07:00
Trenton Holmes
f5c05e1283 Fixes newly added mail tests to account for model change 2022-04-26 10:03:41 -07:00
Trenton Holmes
330e47f0b7 Adds some logging so we know which login method has failed 2022-04-26 09:41:36 -07:00
Trenton Holmes
1e9378b429 Implements a fallback to AUTH=PLAIN in the event of a UnicodeEncodeError during a normal login 2022-04-26 09:41:36 -07:00
Trenton Holmes
af58fb5fa3 Empty, dummy commit because GHA? 2022-04-26 09:41:08 -07:00
Trenton Holmes
3d6fb2383a Updates install script to split + seperated OCR languages to spaces for installation script 2022-04-26 09:41:08 -07:00
Trenton Holmes
2407798d2e Adds simple Python to wait for Redis broker to be ready (with minor Dockerfile improvements) 2022-04-26 08:46:03 -07:00
Trenton Holmes
f9194bd28c Merge pull request #761 from paperless-ngx/feature-build-all-images
Update GHA workflow to build all Docker images
2022-04-26 08:31:13 -07:00
Trenton Holmes
816f020cc3 Fixes tests with imap-tools 0.54.0 changes to the EmailAddress class 2022-04-26 08:11:25 -07:00
dependabot[bot]
9191aa32df Bump imap-tools from 0.53.0 to 0.54.0
Bumps [imap-tools](https://github.com/ikvk/imap_tools) from 0.53.0 to 0.54.0.
- [Release notes](https://github.com/ikvk/imap_tools/releases)
- [Changelog](https://github.com/ikvk/imap_tools/blob/master/docs/release_notes.rst)
- [Commits](https://github.com/ikvk/imap_tools/compare/v0.53.0...v0.54.0)

---
updated-dependencies:
- dependency-name: imap-tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-26 13:30:32 +00:00
Trenton Holmes
0a6395507e Merge pull request #757 from paperless-ngx/dependabot/pip/dev/ocrmypdf-13.4.3
Bump ocrmypdf from 13.4.2 to 13.4.3
2022-04-25 17:25:41 -07:00
shamoon
eff68c601c Merge pull request #804 from paperless-ngx/dependabot-gha-target-dev
Updates the target branch for GHA updates to be dev
2022-04-25 16:29:50 -07:00
dependabot[bot]
3f5540f35b Bump ocrmypdf from 13.4.2 to 13.4.3
Bumps [ocrmypdf](https://github.com/jbarlow83/ocrmypdf) from 13.4.2 to 13.4.3.
- [Release notes](https://github.com/jbarlow83/ocrmypdf/releases)
- [Changelog](https://github.com/ocrmypdf/OCRmyPDF/blob/master/docs/release_notes.rst)
- [Commits](https://github.com/jbarlow83/ocrmypdf/compare/v13.4.2...v13.4.3)

---
updated-dependencies:
- dependency-name: ocrmypdf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 23:26:26 +00:00
Trenton Holmes
e5f5030e9c Updates the target branch for GHA updates to be dev 2022-04-25 15:27:15 -07:00
Trenton Holmes
df39d37ca9 Merge pull request #756 from paperless-ngx/dependabot/pip/dev/importlib-resources-5.7.1
Bump importlib-resources from 5.6.0 to 5.7.1
2022-04-25 14:19:49 -07:00
dependabot[bot]
bea81d0449 Bump importlib-resources from 5.6.0 to 5.7.1
Bumps [importlib-resources](https://github.com/python/importlib_resources) from 5.6.0 to 5.7.1.
- [Release notes](https://github.com/python/importlib_resources/releases)
- [Changelog](https://github.com/python/importlib_resources/blob/main/CHANGES.rst)
- [Commits](https://github.com/python/importlib_resources/compare/v5.6.0...v5.7.1)

---
updated-dependencies:
- dependency-name: importlib-resources
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 20:54:20 +00:00
Trenton Holmes
d261845fc6 Merge pull request #692 from paperless-ngx/dependabot/pip/dev/tox-3.25.0
Bump tox from 3.24.5 to 3.25.0
2022-04-25 13:49:42 -07:00
dependabot[bot]
eac0b295d2 Bump tox from 3.24.5 to 3.25.0
Bumps [tox](https://github.com/tox-dev/tox) from 3.24.5 to 3.25.0.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/master/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/3.24.5...3.25.0)

---
updated-dependencies:
- dependency-name: tox
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 19:19:35 +00:00
shamoon
f4eefcea13 Merge pull request #800 from paperless-ngx/dependabot/npm_and_yarn/src-ui/dev/cypress-9.6.0
Bump cypress from 9.5.3 to 9.6.0 in /src-ui
2022-04-25 12:18:54 -07:00
dependabot[bot]
268715711f Bump cypress from 9.5.3 to 9.6.0 in /src-ui
Bumps [cypress](https://github.com/cypress-io/cypress) from 9.5.3 to 9.6.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](https://github.com/cypress-io/cypress/compare/v9.5.3...v9.6.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 19:14:24 +00:00
shamoon
c5f70b4401 Merge pull request #799 from paperless-ngx/bump-angular-250422
Bump angular & tools to 13.3.4 or 13.3.3
2022-04-25 12:12:50 -07:00
Michael Shamoon
912caf84a6 Bump angular & tools to 13.3.4 or 13.3.3 2022-04-25 12:09:54 -07:00
shamoon
448fa4d35f Merge pull request #797 from paperless-ngx/dependabot/npm_and_yarn/src-ui/dev/concurrently-7.1.0
Bump concurrently from 7.0.0 to 7.1.0 in /src-ui
2022-04-25 12:08:48 -07:00
Trenton Holmes
cd8d4c357d Fixes the merge issues 2022-04-25 11:39:05 -07:00
Trenton Holmes
bdcc6f861d Converts tabs to spaces and update EditorConfig for the new files 2022-04-25 11:32:55 -07:00
Trenton Holmes
d9d6b7b151 Updates the utlity build script to actually support all the images 2022-04-25 11:32:55 -07:00
Trenton Holmes
4517692c20 Updates the utility script to allow building of other Dockerfiles for building any image locally. Adds a single point to configure non-Python versions 2022-04-25 11:32:55 -07:00
Trenton Holmes
609b9e3369 Adds utility script for building the Docker image locally 2022-04-25 11:32:54 -07:00
Trenton Holmes
be8ca110f4 Fixes spelling 2022-04-25 11:32:54 -07:00
Trenton Holmes
f1da37dd12 Minor fixes for local building 2022-04-25 11:32:53 -07:00
Trenton Holmes
ecca51dbdd Ports over the improvements to the frontend compilation from other PR 2022-04-25 11:32:53 -07:00
Trenton Holmes
d19015579c Instead of using a full image name, use the repo and version to build the image to pull from. Removes building of the frontend for multiple platforms 2022-04-25 11:32:53 -07:00
Trenton Holmes
6179ca5668 Fixes final WORKDIR directive 2022-04-25 11:32:52 -07:00
Trenton Holmes
6c70db31bd Incorporates the base image building back into the main repo with multi stage building 2022-04-25 11:32:52 -07:00
shamoon
b0790d7010 Merge pull request #798 from paperless-ngx/hotfix-mail-tests
Fix Backend Mail Tests
2022-04-25 11:29:31 -07:00
Trenton Holmes
eb8158673f Fixes backend testing of mail on dev 2022-04-25 11:10:32 -07:00
Michael Shamoon
409f17980f Update environment.prod.ts 2022-04-25 10:34:20 -07:00
Michael Shamoon
654ef06682 Merge branch 'main' into dev 2022-04-25 10:33:40 -07:00
dependabot[bot]
bca95a4972 Bump concurrently from 7.0.0 to 7.1.0 in /src-ui
Bumps [concurrently](https://github.com/open-cli-tools/concurrently) from 7.0.0 to 7.1.0.
- [Release notes](https://github.com/open-cli-tools/concurrently/releases)
- [Commits](https://github.com/open-cli-tools/concurrently/compare/v7.0.0...v7.1.0)

---
updated-dependencies:
- dependency-name: concurrently
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 17:27:16 +00:00
Michael Shamoon
4df065d8d5 v1.7.0 2022-04-25 10:26:49 -07:00
shamoon
a358477cda Merge pull request #695 from paperless-ngx/beta
[Beta] Paperless-ngx v1.7.0 Release Candidate 1
2022-04-25 10:24:27 -07:00
shamoon
44d6db8c47 Merge pull request #772 from paperless-ngx/fix-dark-mode-delay-btn-progress
Fix dark mode delay button progress bar not visible
2022-04-22 08:15:30 -07:00
Quinn Casey
49e627d2fd Merge pull request #785 from paperless-ngx/fix-docs-darkmode-toggle
Fix docs dark mode toggle blocks menu button
2022-04-22 07:24:28 -07:00
shamoon
c3a8d93eb4 fix docs dark mode toggle blocks menu button 2022-04-22 01:00:19 -07:00
Paperless-ngx Translation Bot [bot]
7a648c6465 New Crowdin updates (#781)
* New translations messages.xlf (Russian)
[ci skip]

* New translations messages.xlf (Russian)
[ci skip]
2022-04-21 20:33:16 -07:00
Quinn Casey
5c1c5b5b0d Merge pull request #782 from paperless-ngx/add-python-3-10
Adds Python 3.10 to the backend test matrix
2022-04-21 11:13:50 -07:00
Trenton Holmes
811da4bac5 Adds Python 3.10 to the backend test matrix 2022-04-21 10:28:13 -07:00
Michael Shamoon
23b2fbef45 Fix dark mode delay button progress bar not visible 2022-04-19 19:25:24 -07:00
shamoon
f1b52b495a Merge pull request #769 from chrpme/fix/preview-link
Open preview link in new browser tab
2022-04-19 17:49:55 -07:00
Quinn Casey
0bff3891bd Merge pull request #767 from paperless-ngx/bug-fix-list-folders
List Email Account Folders In Event of Error Changing Folder
2022-04-19 15:57:31 -07:00
Florian Brandes
a7b1658ee1 code review changes
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-20 00:55:45 +02:00
Trenton Holmes
c274bbcddf Tweaks documentation around mail fetching sub-folders 2022-04-19 15:35:45 -07:00
Trenton Holmes
57f32e5360 Includes exception information during exception listing folders
Co-authored-by: Florian <florian.brandes@posteo.de>
2022-04-19 13:40:04 -07:00
Mike Unke
b4ecf8e28e Open preview link in new browser tab 2022-04-19 21:47:49 +02:00
Trenton Holmes
06cfba8c7e Updates the documentation 2022-04-19 09:05:30 -07:00
Trenton Holmes
5603834282 Only output the folder names 2022-04-19 09:03:08 -07:00
Trenton Holmes
33134d4529 In the event of an error when setting the mail account folder, attempt to list the account's folders to the log 2022-04-19 08:32:34 -07:00
Florian Brandes
bf57b6e4a2 more improvements to tiff support
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-19 13:08:40 +02:00
Paperless-ngx Translation Bot [bot]
b63f87a5b5 New translations messages.xlf (French) (#764)
[ci skip]
2022-04-18 19:48:23 -07:00
shamoon
68e3612d36 Merge pull request #765 from p-h-a-i-l/fix-mail-action-mixup
fix Mail actions mixup
2022-04-18 16:23:34 -07:00
phail
616a826b8a fix Mail actions mixup 2022-04-19 00:59:57 +02:00
shamoon
09d62d76b2 Merge pull request #745 from paperless-ngx/1.7.0-rc1-css-fixes-1
Beta 1.7.0 rc1 CSS Fixes #1
2022-04-18 12:02:14 -07:00
Quinn Casey
deab7794d6 Merge pull request #751 from paperless-ngx/feature-ci-concurrency
Adds workflow level concurrency group
2022-04-17 17:17:28 -07:00
Trenton Holmes
bc892059a1 Adds workflow level concurrency group with cancelling of in progress jobs to the CI 2022-04-17 15:29:50 -07:00
Florian Brandes
6d0fdc7510 add tests
fix indention
add more documentation

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-17 16:10:53 +02:00
Michael Shamoon
dd1d4b86d2 use var in input check / radio svgs 2022-04-17 00:49:34 -07:00
Michael Shamoon
65eeea9453 toasts should respect close button coloring 2022-04-17 00:48:57 -07:00
Michael Shamoon
b2b202586c fix settings mobile display bugs 2022-04-17 00:36:47 -07:00
Michael Shamoon
49341260dc fix popover carats 2022-04-17 00:25:39 -07:00
Michael Shamoon
dfcef81001 fix dark mode progress showing in light mode 2022-04-17 00:25:28 -07:00
Michael Shamoon
a834a6c874 remove single-use css vars 2022-04-17 00:25:10 -07:00
Florian Brandes
ad5188a280 add TIFF barcode support
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-16 21:59:03 +02:00
Paperless-ngx Translation Bot [bot]
53c2a0c724 New translations messages.xlf (Serbian (Latin)) (#735)
[ci skip]
2022-04-16 00:39:08 -07:00
Michael Shamoon
3a8cc31f1b fix some css specificity issues, unused vars 2022-04-16 00:23:15 -07:00
Quinn Casey
0f6b452d17 Merge pull request #737 from paperless-ngx/add-missing-packages-to-doc
add barcode packages to setup.rst
2022-04-15 06:32:47 -07:00
Florian Brandes
e994bcf737 add barcode packages to setup.rst
fixes #730

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-15 08:32:53 +02:00
Michael Shamoon
5432700b0d Add note for malformed package-lock in 1.6.0 2022-04-13 20:43:42 -07:00
Paperless-ngx Translation Bot [bot]
7b7534c952 New Crowdin updates (#699)
* New translations django.po (Polish)
[ci skip]

* New translations messages.xlf (Polish)
[ci skip]

* New translations django.po (Polish)
[ci skip]

* New translations messages.xlf (Danish)
[ci skip]
2022-04-13 20:33:15 -07:00
shamoon
b4570545ef Merge pull request #717 from paperless-ngx/fix-custom-theme-color-contrast
Fix custom theme color contrast
2022-04-13 13:31:24 -07:00
Michael Shamoon
6478db13e6 miscellaneous css fixes / reorganization 2022-04-13 13:30:02 -07:00
Michael Shamoon
1d7ddcc10d Remove unneeded imports since change to css vars 2022-04-13 08:43:35 -07:00
shamoon
30508c6c2c Merge pull request #702 from paperless-ngx/stalebot-unconfirmed
Chore: Only stale unconfirmed issues
2022-04-13 08:35:31 -07:00
Quinn Casey
18f43c5757 Merge pull request #722 from paperless-ngx/fix-gotenberg
Fix: use correct gotenberg image for sqlite-tika.arm.yml
2022-04-13 08:34:40 -07:00
shamoon
52498efd14 Merge pull request #723 from paperless-ngx/bugfix-remove-tag-match
Fix docker/metadata-action creation of latest tag
2022-04-13 08:28:44 -07:00
Trenton Holmes
40cb721d16 Removes the matching regex from the docker/metadata-action as it will create a new :latest even for release candidates 2022-04-13 08:20:30 -07:00
Michael Shamoon
1c2699b16e Refactor contrast to use luminance function 2022-04-13 08:18:10 -07:00
Michael Shamoon
d98a016087 Initial build of primary color contrast 2022-04-13 08:18:09 -07:00
Quinn Casey
bc5b6db031 Fix gotenberg image 2022-04-13 08:16:35 -07:00
Quinn Casey
4a4f252ad8 Merge branch 'main' into beta 2022-04-13 08:13:32 -07:00
Quinn Casey
c81dd1a478 Merge pull request #720 from alumpe/docs-typo-fixes
Corrects some spelling mistakes in docs
2022-04-13 07:11:36 -07:00
Adrian Lumpe
31016156be corrects some spelling mistakes in docs 2022-04-13 15:39:49 +02:00
shamoon
dad352f05e Update changelog.rst
[ci skip]
2022-04-13 03:14:43 -07:00
shamoon
95e94618d8 Merge pull request #270 from jonasc/dev
Allow setting more than one tag in mail rules
2022-04-13 03:11:38 -07:00
shamoon
045a401cd7 Merge pull request #705 from paperless-ngx/fix-startls
bugfix for imap using starttls
2022-04-12 18:51:46 -07:00
Quinn Casey
d5d7e2edbc Merge pull request #715 from paperless-ngx/nginx-proxy-config-variable
Add required PAPERLESS_URL to nginx proxy docs
2022-04-12 15:17:22 -07:00
Quinn Casey
64e1a6ec7e Merge pull request #713 from paperless-ngx/fix-1.7.0-rc1-tags-input-color
Fix: v1.7.0-rc1 Tags input should use body color
2022-04-12 15:11:05 -07:00
Quinn Casey
2221b425ad Add required PAPERLESS_URL to nginx proxy docs 2022-04-12 15:06:32 -07:00
Michael Shamoon
86b2ccae94 Tags input should use body color 2022-04-12 14:45:47 -07:00
shamoon
0bd67a54ab Merge pull request #704 from paperless-ngx/breaking-changes-changelog
Chore: Add Breaking Changes to release notes
2022-04-12 10:19:15 -07:00
Quinn Casey
306f254218 Add Breaking Changes 2022-04-12 07:37:49 -07:00
Quinn Casey
449add88a6 Bump header level 2022-04-12 07:37:02 -07:00
Quinn Casey
941ba8d689 Only stale unconfirmed issues 2022-04-12 07:31:14 -07:00
shamoon
813335f8eb Update changelog.rst
[ci skip]
2022-04-12 07:30:16 -07:00
shamoon
f0cef2f42f Update changelog.rst
[ci skip]
2022-04-12 07:29:07 -07:00
shamoon
e767eb38f4 Merge pull request #700 from paperless-ngx/fix-healthcheck
add "localhost" to ALLOWED_HOSTS
2022-04-12 07:25:09 -07:00
Florian Brandes
71cbef4c13 fixes #697
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-12 15:54:18 +02:00
jonasc
834ad1ef84 reformat migration with black 2022-04-12 15:06:38 +02:00
Florian Brandes
753e6661bc add "localhost" to ALLOWED_HOSTS
if PAPERLESS_URL is set and ALLOWED_HOSTS is NOT set

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-12 14:39:08 +02:00
jonasc
1ce19f5444 merge migrations 2022-04-12 10:51:19 +02:00
jonasc
0de1230a1a Reset related_name (was set to prevent duplicate) 2022-04-12 10:45:56 +02:00
jonasc
5ff304324d Add backwards data migration
The documents.tests.test_migration_mime_type test suite failes if no
backwards migration is provided. This simple backwards migration sets
the old assign_tag field with a tag if exactly one is set in
assign_tags.
2022-04-12 10:45:56 +02:00
jonasc
37f7ef41f2 Save MailRule and MailAccount objects in tests
This fixes the errors in the tests that the new many-to-many
assign_tags property cannot be accessed due to MailRule not having an
id. In one case it it necessary to give additional names to both objects
as several are created.
2022-04-12 10:45:52 +02:00
jonasc
4022284059 Allow setting more than one tag in mail rules
The three migrations do the following to preserve existing data in
assign_tag:
1. Add the new many-to-many field assign_tags.
2. Copy existing data from the assign_tag field to the assign_tags.
3. Delete the existing assign_tag field.
2022-04-12 10:41:08 +02:00
shamoon
dde6a2eb7d Merge branch 'main' into beta 2022-04-11 23:37:21 -07:00
Michael Shamoon
1083ed4e40 Update .pre-commit-config.yaml
[ci skip]
2022-04-11 23:32:37 -07:00
Michael Shamoon
c111825b1e Minor merge conflicts
[ci skip]
2022-04-11 23:31:20 -07:00
Michael Shamoon
e36c22d29a Update changelog.rst
[ci skip]
2022-04-11 23:05:16 -07:00
Michael Shamoon
c192931015 Update changelog.rst
[ci skip]
2022-04-11 22:58:08 -07:00
Michael Shamoon
301ad7e07d v1.7.0-rc1 2022-04-11 21:03:02 -07:00
Trenton Holmes
cc93616019 Merge pull request #691 from paperless-ngx/dependabot/pip/dev/django-4.0.4
Bump django from 4.0.3 to 4.0.4
2022-04-11 16:04:44 -07:00
dependabot[bot]
88066563d3 Bump django from 4.0.3 to 4.0.4
Bumps [django](https://github.com/django/django) from 4.0.3 to 4.0.4.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/4.0.3...4.0.4)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 20:37:09 +00:00
shamoon
9e3590352c Merge pull request #690 from paperless-ngx/fix-scanners-table
Fix: scanners table
2022-04-11 12:56:45 -07:00
Quinn Casey
86ad52639f Fix name 2022-04-11 12:34:37 -07:00
Quinn Casey
c00be946a5 Remove explicit "no" as was done in f303a1c 2022-04-11 12:32:32 -07:00
Quinn Casey
322aeeb552 Add 994d502 2022-04-11 12:23:27 -07:00
Quinn Casey
501d4cafa9 Add f303a1c 2022-04-11 12:21:52 -07:00
Quinn Casey
e556fb3e3a Add f2f7b71 2022-04-11 12:17:44 -07:00
Quinn Casey
bb930297d6 Reset table to b318c0a 2022-04-11 12:12:01 -07:00
shamoon
83f10167e5 Merge pull request #483 from stumpylog/check-if-file-busy
Adds wait for file before consuming
2022-04-11 11:56:05 -07:00
Quinn Casey
d47bb21389 Merge pull request #654 from paperless-ngx/fix-doc-detail-time
Fix: frontend document editing erases time data
2022-04-11 11:54:24 -07:00
Florian
4dedff00b8 Merge pull request #532 from paperless-ngx/feature-barcode-splitter
Feature barcode splitter
2022-04-11 08:51:48 +02:00
Trenton Holmes
2414dad656 Adds additional checking for both inotify and polling around document still being busy before consuming it 2022-04-10 12:21:34 -07:00
shamoon
8f98cb4860 Merge pull request #550 from stumpylog/feature-mail-consume-improve-docs
Feature mail consume improve docs
2022-04-10 08:46:45 -07:00
shamoon
6e96b7e00a Merge pull request #612 from stumpylog/bug-fix-filter-len
Increase length of SavedViewFilterRule
2022-04-10 08:46:25 -07:00
shamoon
00287b27ab Merge pull request #680 from paperless-ngx/bug-fix-fnmatch
[bug] - Fixes attachment filename matching during mail fetching
2022-04-08 13:59:22 -07:00
Trenton Holmes
8f18b7fd6c Fixes the matching of attachment files names to patterns 2022-04-08 13:42:42 -07:00
Felix E
dde7771dc6 Merge pull request #674 from paperless-ngx/feature-django4-csrf
Add `PAPERLESS_URL` env variable & CSRF var
2022-04-08 21:00:57 +02:00
Quinn Casey
4165184e42 Chore: Implement release-drafter action for Changelogs (#669)
* Add inital release-drafter config

* Replace release action

* Add collapse-after 3 to dependencies
2022-04-08 11:12:19 -07:00
Michael Shamoon
e4953a756a docs for PAPERLESS_URL + PAPERLESS_CSRF_TRUSTED_ORIGINS 2022-04-08 09:59:59 -07:00
Trenton Holmes
471ac63a3a Increases SavedViewFilterRule value to the maximum length 2022-04-08 08:55:58 -07:00
Trenton Holmes
f358eda5c5 Updates the mail db model to use the built-in enum capabilities and runs the migrations 2022-04-08 08:55:40 -07:00
Trenton Holmes
035130ecdc Updates the folder input text and adds docs note for how to figure out the folder separator value 2022-04-08 08:55:40 -07:00
Michael Shamoon
ca0e86757b add PAPERLESS_URL env variable for CSRF 2022-04-08 00:27:53 -07:00
Michael Shamoon
d4153607c9 reorganizing scss for clarity
[ci skip]
2022-04-07 23:23:28 -07:00
Michael Shamoon
99d0a0845d fix scss organization
[ci skip]
2022-04-07 23:15:27 -07:00
Florian Brandes
5fae5a9ee0 fix conditional in separate_pages
add additional test for separate_pages

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-08 08:09:48 +02:00
Michael Shamoon
b5a75be1db fix error case
[ci skip]
2022-04-07 23:06:46 -07:00
Trenton Holmes
eb5e0e0b9b Merge pull request #501 from stumpylog/configure-worker-retry
Adds settings for worker retry time
2022-04-07 15:24:53 -07:00
Trenton Holmes
dc90f58391 Merge pull request #641 from paperless-ngx/dependabot/pip/dev/pre-commit-2.18.1
Bump pre-commit from 2.17.0 to 2.18.1
2022-04-07 14:29:08 -07:00
Michael Shamoon
ca43c71cf5 fix some broken css vars 2022-04-07 14:27:49 -07:00
dependabot[bot]
931a311c48 Bump pre-commit from 2.17.0 to 2.18.1
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 2.17.0 to 2.18.1.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pre-commit/pre-commit/compare/v2.17.0...v2.18.1)

---
updated-dependencies:
- dependency-name: pre-commit
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-07 20:54:33 +00:00
Michael Shamoon
9f9d7da1ce minor css hover + focus state fixes
[ci skip]
2022-04-07 13:51:36 -07:00
Trenton Holmes
d00e8d3b0f Merge pull request #649 from paperless-ngx/dependabot/pip/dev/zipp-3.8.0
Bump zipp from 3.7.0 to 3.8.0
2022-04-07 13:49:50 -07:00
Trenton Holmes
d4124bae0c Merge pull request #653 from paperless-ngx/dependabot/pip/dev/tqdm-4.64.0
Bump tqdm from 4.63.1 to 4.64.0
2022-04-07 13:37:46 -07:00
shamoon
58eb2d6f63 Merge pull request #283 from paperless-ngx/feature-global-dragdrop
Feature: global drag'n'drop
2022-04-07 12:14:59 -07:00
Quinn Casey
01987f1b51 Merge pull request #667 from paperless-ngx/codeowners
Feature: Add CODEOWNERS
2022-04-07 08:31:48 -07:00
shamoon
0a35358e8d Merge pull request #666 from paperless-ngx/feature-update-base-image 2022-04-07 08:30:59 -07:00
Quinn Casey
5bacb85c33 Fix typo 2022-04-07 08:13:25 -07:00
Quinn Casey
6933ac523f Remove explicit team tagging from PR template 2022-04-07 08:13:12 -07:00
Quinn Casey
ba9120b417 Add CODEOWNERS 2022-04-07 08:12:05 -07:00
dependabot[bot]
3e71f5810f Bump tqdm from 4.63.1 to 4.64.0
Bumps [tqdm](https://github.com/tqdm/tqdm) from 4.63.1 to 4.64.0.
- [Release notes](https://github.com/tqdm/tqdm/releases)
- [Commits](https://github.com/tqdm/tqdm/compare/v4.63.1...v4.64.0)

---
updated-dependencies:
- dependency-name: tqdm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-07 15:02:57 +00:00
Trenton Holmes
296a0edae4 Updates the base image tag to use the :dev tag from the base image dev branch 2022-04-07 08:00:22 -07:00
Florian Brandes
cdf5602dfb update documentation
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-07 11:14:29 +02:00
Florian Brandes
e214f719c9 add more tests
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-07 11:14:29 +02:00
Florian Brandes
08fbcf5158 use imported List
fail test if non-existing dir exists

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-07 11:14:29 +02:00
Florian Brandes
10ca515ac5 addes tests:
- barcode-39
- barcode-128
- qr barcodes
- test for consumption

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-07 11:14:29 +02:00
Florian Brandes
e59a14852b code formatting
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-07 11:14:29 +02:00
Florian Brandes
c696b4f2f2 set barcode reader default to disabled
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-07 11:14:29 +02:00
Florian Brandes
553153ba92 put code under CONSUMER_ENABLE_BARCODES
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-07 11:14:29 +02:00
Florian Brandes
9d2bcf807e add more type hinting
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-07 11:14:29 +02:00
Florian Brandes
422ac9befe decode bytecode in string
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-07 11:14:29 +02:00
Florian Brandes
793f641af6 make list checks consistent
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-07 11:14:29 +02:00
Florian Brandes
0ea5f5d584 use append method for lists
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-07 11:14:29 +02:00
florian on nixos (Florian Brandes)
c024b846c3 add config options and documentation
Signed-off-by: florian on nixos (Florian Brandes) <florian.brandes@posteo.de>
2022-04-07 11:14:29 +02:00
florian on nixos (Florian Brandes)
37b3fde4e1 pre-commit hooks
Signed-off-by: florian on nixos (Florian Brandes) <florian.brandes@posteo.de>
2022-04-07 11:14:29 +02:00
florian on nixos (Florian Brandes)
e89ef5de25 renaming of documents to align with front end
Signed-off-by: florian on nixos (Florian Brandes) <florian.brandes@posteo.de>
2022-04-07 11:14:29 +02:00
florian on nixos (Florian Brandes)
06cac44d02 update ci.yml to include new dependency
Signed-off-by: florian on nixos (Florian Brandes) <florian.brandes@posteo.de>
2022-04-07 11:14:29 +02:00
florian on nixos (Florian Brandes)
488fe28ad3 flake8
Signed-off-by: florian on nixos (Florian Brandes) <florian.brandes@posteo.de>
2022-04-07 11:14:29 +02:00
florian on nixos (Florian Brandes)
50f474ae92 run black
Signed-off-by: florian on nixos (Florian Brandes) <florian.brandes@posteo.de>
2022-04-07 11:14:29 +02:00
florian on nixos (Florian Brandes)
78ca2ffaba add trailing commas
Signed-off-by: florian on nixos (Florian Brandes) <florian.brandes@posteo.de>
2022-04-07 11:14:29 +02:00
florian on nixos (Florian Brandes)
911f5bc78e reorder imports
Signed-off-by: florian on nixos (Florian Brandes) <florian.brandes@posteo.de>
2022-04-07 11:14:29 +02:00
Florian Brandes
b227427916 add split logic to consume_file
Signed-off-by: florian on nixos (Florian Brandes) <florian.brandes@posteo.de>
2022-04-07 11:14:17 +02:00
florian on nixos (Florian Brandes)
b5f77fd6e7 skip test if dir exists
Signed-off-by: florian on nixos (Florian Brandes) <florian.brandes@posteo.de>
2022-04-06 21:16:41 +02:00
florian on nixos (Florian Brandes)
4fe966f534 more work on barcode
Signed-off-by: florian on nixos (Florian Brandes) <florian.brandes@posteo.de>
2022-04-06 21:16:41 +02:00
florian on nixos (Florian Brandes)
bcce0838dd working split pages
Signed-off-by: florian on nixos (Florian Brandes) <florian.brandes@posteo.de>
2022-04-06 21:16:41 +02:00
florian on nixos (Florian Brandes)
76e43bcb89 add first tests for barcode reader
Signed-off-by: florian on nixos (Florian Brandes) <florian.brandes@posteo.de>
2022-04-06 21:16:41 +02:00
florian on nixos (Florian Brandes)
c666be32f4 add barcode packages
Signed-off-by: florian on nixos (Florian Brandes) <florian.brandes@posteo.de>
2022-04-06 21:16:41 +02:00
Trenton Holmes
2d850795d8 Merge pull request #642 from paperless-ngx/dependabot/pip/dev/ocrmypdf-13.4.2
Bump ocrmypdf from 13.4.1 to 13.4.2
2022-04-06 12:13:03 -07:00
Michael Shamoon
784982718e retain document time / tz in detail form 2022-04-05 22:11:09 -07:00
shamoon
2f8d263c9c Merge pull request #630 from paperless-ngx/fix-disableable-download-buttons
Fix: download buttons should disable while waiting
2022-04-05 19:44:43 -07:00
dependabot[bot]
b214163af3 Bump ocrmypdf from 13.4.1 to 13.4.2
Bumps [ocrmypdf](https://github.com/jbarlow83/ocrmypdf) from 13.4.1 to 13.4.2.
- [Release notes](https://github.com/jbarlow83/ocrmypdf/releases)
- [Changelog](https://github.com/ocrmypdf/OCRmyPDF/blob/master/docs/release_notes.rst)
- [Commits](https://github.com/jbarlow83/ocrmypdf/compare/v13.4.1...v13.4.2)

---
updated-dependencies:
- dependency-name: ocrmypdf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-06 02:04:09 +00:00
dependabot[bot]
a4fe1000c2 Bump zipp from 3.7.0 to 3.8.0
Bumps [zipp](https://github.com/jaraco/zipp) from 3.7.0 to 3.8.0.
- [Release notes](https://github.com/jaraco/zipp/releases)
- [Changelog](https://github.com/jaraco/zipp/blob/main/CHANGES.rst)
- [Commits](https://github.com/jaraco/zipp/compare/v3.7.0...v3.8.0)

---
updated-dependencies:
- dependency-name: zipp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-06 02:03:28 +00:00
Trenton Holmes
9a275fa4ed Merge pull request #619 from paperless-ngx/dependabot/pip/dev/pillow-9.1.0
Bump pillow from 9.0.1 to 9.1.0
2022-04-05 18:57:52 -07:00
Michael Shamoon
f2c83f51de Cleanup file upload susbcriptions 2022-04-05 13:33:24 -07:00
Michael Shamoon
fb76b72787 Delete upload-documents.service.spec.ts 2022-04-05 13:33:24 -07:00
Michael Shamoon
bec6c4511c Cleaner activation with Angular directives 2022-04-05 13:33:24 -07:00
Michael Shamoon
77b9988d05 Refactor uploads to service, working global dd 2022-04-05 13:33:24 -07:00
Michael Shamoon
3e49f93816 100vh body height, fix filter editor horizontal overflow 2022-04-05 13:33:24 -07:00
Michael Shamoon
32f6932faf fix overlay background color in dark mode 2022-04-05 13:16:13 -07:00
Michael Shamoon
db76e1d65f code formatting 2022-04-05 13:16:13 -07:00
Michael Shamoon
0136ba504b Delete upload-documents.service.spec.ts 2022-04-05 13:16:13 -07:00
Michael Shamoon
459e026f16 Add translation directive for upload message 2022-04-05 13:16:13 -07:00
Michael Shamoon
b03a723c3e Fix dark mode alert close button 2022-04-05 13:16:13 -07:00
Michael Shamoon
7562636151 Cleaner activation with Angular directives 2022-04-05 13:16:13 -07:00
Michael Shamoon
3acc65ca0d Fix broken toast animations & DOM removal 2022-04-05 13:16:13 -07:00
Michael Shamoon
fde0f4ca0a Add initiating toast 2022-04-05 13:16:13 -07:00
Michael Shamoon
73cab2af2d Refactor uploads to service, working global dd 2022-04-05 13:16:12 -07:00
dependabot[bot]
94d2198b30 Bump pillow from 9.0.1 to 9.1.0
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.0.1 to 9.1.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/9.0.1...9.1.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-05 18:20:14 +00:00
Trenton Holmes
88a67c8703 Merge pull request #618 from paperless-ngx/dependabot/pip/dev/pikepdf-5.1.1
Bump pikepdf from 5.1.0 to 5.1.1
2022-04-05 11:14:21 -07:00
Felix E
ccf9b1291e Merge pull request #591 from paperless-ngx/feature-version-checker
Feature: Update checker
2022-04-05 20:11:21 +02:00
Quinn Casey
47dae716ae Merge pull request #599 from stumpylog/minor-bug-fixes
Fixes downloaded filename, add more consumer ignore settings
2022-04-05 09:56:54 -07:00
Quinn Casey
ea26e1c72f Merge pull request #576 from fantasticle/dev
Update regex date match patterns
2022-04-05 09:52:27 -07:00
Quinn Casey
e6d79f0673 Update docs, examples with new ignore settings 2022-04-05 09:21:18 -07:00
Quinn Casey
bf7002d0ae Merge pull request #616 from paperless-ngx/fix-save-vew-modal-errors
fix some api error displaying
2022-04-05 09:10:15 -07:00
Quinn Casey
cbae145da5 Merge pull request #564 from paperless-ngx/feature-password-protected-pdfs
Feature: Show prompt on password-protected pdfs
2022-04-05 08:59:29 -07:00
Trenton Holmes
88bbfe5961 Merge pull request #594 from danielBreitlauch/dev
FIX BUG: case-sensitive matching was not possible
2022-04-04 09:24:59 -07:00
Trenton Holmes
d60569b6d6 Quiets the pytest output 2022-04-04 17:59:37 +02:00
Michael Shamoon
91165e80ba Remove unused default 2022-04-04 07:05:00 -07:00
dependabot[bot]
a15f9552eb Bump pikepdf from 5.1.0 to 5.1.1
Bumps [pikepdf](https://github.com/pikepdf/pikepdf) from 5.1.0 to 5.1.1.
- [Release notes](https://github.com/pikepdf/pikepdf/releases)
- [Changelog](https://github.com/pikepdf/pikepdf/blob/master/docs/release_notes.rst)
- [Commits](https://github.com/pikepdf/pikepdf/compare/v5.1.0...v5.1.1)

---
updated-dependencies:
- dependency-name: pikepdf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-03 22:20:33 +00:00
Trenton Holmes
501d225f93 Merge pull request #557 from paperless-ngx/dependabot/pip/dev/sphinx-4.5.0
Bump sphinx from 4.4.0 to 4.5.0
2022-04-03 15:08:38 -07:00
dependabot[bot]
4942f244da Bump sphinx from 4.4.0 to 4.5.0
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/4.x/CHANGES)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v4.4.0...v4.5.0)

---
updated-dependencies:
- dependency-name: sphinx
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-03 20:35:06 +00:00
Trenton Holmes
1be5c9af56 Merge pull request #554 from paperless-ngx/dependabot/pip/dev/black-22.3.0
Bump black from 22.1.0 to 22.3.0
2022-04-03 13:14:03 -07:00
fantasticle
818d383f2e Merge branch 'paperless-ngx:dev' into dev 2022-04-03 16:42:51 +02:00
shamoon
5fffa32630 disable download buttons while awaiting zip 2022-04-02 22:23:42 -07:00
Michael Shamoon
19d5feb483 Fix save view error for filter_rules
see #601
2022-04-02 19:49:58 -07:00
Michael Shamoon
199fc6be94 Properly display api errors on list filter & translate error message 2022-04-02 19:45:54 -07:00
Trenton Holmes
865729c033 Merge pull request #611 from stumpylog/bug-fix-install-script
Support docker-compose v2 in install
2022-04-02 15:36:52 -07:00
Trenton Holmes
6aa9071e24 Converts the docker compose check to use if statement 2022-04-02 14:34:19 -07:00
Trenton Holmes
6db3fc2eea Fixes an issue where the install script wouldn't recognize docker compose v2 command 2022-04-02 14:34:19 -07:00
shamoon
65ffaaa67c Merge pull request #623 from paperless-ngx/feature-fix-docker-tags
Fixes the Docker image tags
2022-04-02 13:46:23 -07:00
Michael Shamoon
440467e304 Allow notify user if update checking not explicitly set 2022-04-02 10:10:49 -07:00
Fantasticle
74422dd000 update name from master to main 2022-04-02 18:19:11 +02:00
Trenton Holmes
78d663bbb4 Fixes the Docker image tags 2022-04-02 08:48:58 -07:00
Fantasticle
db0a58ea04 fix link for post-consumption-example, 404d to jonas 2022-04-02 15:52:32 +02:00
fantasticle
eba1e69e64 Merge branch 'paperless-ngx:dev' into dev 2022-04-02 15:49:35 +02:00
shamoon
a4e7877033 Update docs/configuration.rst for consistency
Co-authored-by: Quinn Casey <quinn@quinncasey.com>
2022-04-02 01:37:37 -07:00
Michael Shamoon
c62260ab02 Use GH api URL
Update configuration.rst
2022-04-02 01:36:37 -07:00
Michael Shamoon
b58550bb79 refactor to update_available 2022-04-02 01:36:19 -07:00
Michael Shamoon
d02c7df75c json parse version string 2022-04-02 01:36:19 -07:00
Michael Shamoon
6dbebf4806 Fix version string regex 2022-04-02 01:33:51 -07:00
Michael Shamoon
1019660f6a Add config variable for update check 2022-04-02 01:33:51 -07:00
Michael Shamoon
bfd11060ec Add version check to app frame 2022-04-02 01:33:51 -07:00
Michael Shamoon
7b6dccf5ef RemoteVersionService 2022-04-02 01:33:51 -07:00
Michael Shamoon
d76eccad1c remote_version API endpoint 2022-04-02 01:33:51 -07:00
Michael Shamoon
6f0ac7ae45 Update bootstrap-icons.svg 2022-04-02 01:33:50 -07:00
dependabot[bot]
8f17ed1eb9 Bump black from 22.1.0 to 22.3.0
Bumps [black](https://github.com/psf/black) from 22.1.0 to 22.3.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/22.1.0...22.3.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-02 08:29:39 +00:00
shamoon
9737e4a24d Merge pull request #238 from schnuffle/feature-split-dockerimage
Feature split dockerimage
2022-04-02 01:24:15 -07:00
Quinn Casey
805c17565b Merge pull request #617 from paperless-ngx/fix-move-to-trash
uses shutil.move instead of rename
2022-04-02 15:17:43 +07:00
Florian Brandes
8e9d1cdd18 uses shutil.move instead of rename
fixes issues with cross-filesystem movement

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-04-02 07:23:31 +02:00
shamoon
1d3300fb34 Merge pull request #610 from paperless-ngx/fix-npm-deps-010222_2
Fix npm deps 01.02.22 2
2022-04-01 21:41:54 -07:00
Trenton Holmes
26d93cf3be Fixes the name and path of the built image so it doesn't duplicate 2022-04-01 16:17:22 -07:00
Michael Shamoon
4e3183ee65 remove unused ngx-infinite-scroll
see 9993381cda
2022-04-01 14:19:59 -07:00
Michael Shamoon
8370ec58c1 bump dirty-check-forms, ngx-infinite-scroll, typescript 2022-04-01 13:54:14 -07:00
shamoon
0d1bcd3c13 Merge pull request #600 from paperless-ngx/fix-npm-deps-010222
Fix npm dependencies 01.02.22
2022-04-01 13:44:10 -07:00
Michael Shamoon
a456b968af bump @types/node, ng2-pdf-viewer, cypress 2022-04-01 13:25:36 -07:00
Daniel Breitlauch
2b5562e376 adding case-sensitive tests 2022-04-01 21:15:30 +02:00
Michael Shamoon
3a242dc296 remove stubborn failing e2e settings test for now 2022-04-01 12:11:08 -07:00
Michael Shamoon
5aff9b6fdb bump angular deps & regenerate package-lock 2022-04-01 11:41:01 -07:00
Trenton Holmes
35b3216fee Fixes a couple of minor bugs in the downloading of documents and additional consumer ignore items 2022-04-01 11:12:18 -07:00
Michael Shamoon
fac6fe0c2e Squashed commit of the following:
commit 3709bf5d7602bb2e126465870e00fca35d4f99be
Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com>
Date:   Fri Apr 1 09:24:12 2022 -0700

    Attempt 2 to fix test failing on GHA
2022-04-01 09:28:47 -07:00
Daniel Breitlauch
6f8020e30d removing transformation to lowercase since it is not needed at all. 2022-04-01 18:26:01 +02:00
Michael Shamoon
efbc2a5715 Fix failing e2e settings test
[ci skip]
2022-04-01 09:09:02 -07:00
Daniel Breitlauch
0bee3901b6 Merge branch 'paperless-ngx:dev' into dev 2022-04-01 12:04:51 +02:00
Daniel Breitlauch
7106c68032 FIX BUG: case-sensitive matching was not possible 2022-04-01 12:03:05 +02:00
fantasticle
be707536bd Merge branch 'paperless-ngx:dev' into dev 2022-04-01 11:35:00 +02:00
Quinn Casey
d18eebf97d Merge pull request #588 from paperless-ngx/locale-belarusian
Add Belarusian localization
2022-04-01 11:51:02 +07:00
Paperless-ngx Translation Bot [bot]
60cc7afc72 New Crowdin updates (#538)
* New translations django.po (Spanish)
[ci skip]

* New translations messages.xlf (Spanish)
[ci skip]

* New translations django.po (Serbian (Latin))
[ci skip]

* New translations messages.xlf (Serbian (Latin))
[ci skip]

* New translations django.po (Serbian (Latin))
[ci skip]

* New translations messages.xlf (Serbian (Latin))
[ci skip]

* New translations django.po (Chinese Simplified)
[ci skip]

* New translations django.po (Chinese Simplified)
[ci skip]

* New translations messages.xlf (Chinese Simplified)
[ci skip]

* New translations django.po (Chinese Simplified)
[ci skip]

* New translations messages.xlf (Chinese Simplified)
[ci skip]

* New translations django.po (Russian)
[ci skip]

* New translations django.po (Russian)
[ci skip]

* New translations messages.xlf (Russian)
[ci skip]

* New translations messages.xlf (Russian)
[ci skip]

* New translations django.po (Belarusian)
[ci skip]

* New translations messages.xlf (Belarusian)
[ci skip]

* New translations django.po (Belarusian)
[ci skip]

* New translations django.po (Belarusian)
[ci skip]

* New translations messages.xlf (French)
[ci skip]

* New translations django.po (Russian)
[ci skip]

* New translations django.po (Belarusian)
[ci skip]

* New translations django.po (Finnish)
[ci skip]

* New translations messages.xlf (Finnish)
[ci skip]

* New translations django.po (Finnish)
[ci skip]

* New translations messages.xlf (Finnish)
[ci skip]

* New translations django.po (Finnish)
[ci skip]

* New translations django.po (Finnish)
[ci skip]

* New translations django.po (Belarusian)
[ci skip]

* New translations django.po (Belarusian)
[ci skip]

* New translations messages.xlf (Belarusian)
[ci skip]

* New translations messages.xlf (Belarusian)
[ci skip]

* New translations messages.xlf (Belarusian)
[ci skip]

* New translations messages.xlf (Russian)
[ci skip]

* New translations messages.xlf (Belarusian)
[ci skip]
2022-03-31 19:47:16 -07:00
Michael Shamoon
b7949d2e69 Add Belarusian localization 2022-03-31 19:42:08 -07:00
shamoon
48175d5b8e Merge pull request #580 from paperless-ngx/docs-frontend-tests-style
Add frontend tests to docs
2022-03-31 15:43:50 -07:00
Michael Shamoon
cb8fd6597d Merge changes from #583 from @fantasticle
5496412aec
2022-03-31 15:42:46 -07:00
Fantasticle
4754ac2bd1 remove unnecessary import 2022-03-31 21:25:58 +02:00
Fantasticle
3cca77e748 add more tests for regex date parser, remove duplicate name 2022-03-31 21:24:57 +02:00
Trenton Holmes
4ec1aaabe6 Adds settings for worker retry time, with what should be sensible default 2022-03-31 10:24:46 -07:00
Fantasticle
0baacbef98 update new regex pattern for second boundary 2022-03-31 09:37:15 +02:00
Michael Shamoon
70bc70ec97 Add frontend tests to docs 2022-03-30 19:09:07 -07:00
Alexey Zinchenko
be2b59431f Update troubleshooting.rst 2022-03-30 19:08:40 -07:00
shamoon
c43193b17d Add note for target branch
[ci skip]
2022-03-30 19:08:40 -07:00
Storm Heg
2147af0e6a Fix typo in api.rst 2022-03-30 19:08:30 -07:00
fantasticle
d8261b3359 add test for new regex 2022-03-30 23:18:03 +02:00
Trenton Holmes
2666e70706 Removes the filtering of on:pull_request event types 2022-03-30 10:10:36 -07:00
Trenton Holmes
19cf66be0f Updates the Dockerfile to utilize our new base image 1.0 which provides the pre-compiled wheels for certain dependencies and most base packages 2022-03-30 09:09:50 -07:00
fantasticle
1ecb26a3fb Update regex date match patterns 2022-03-30 12:19:30 +02:00
Henning Häcker
8b26ddcd2c add trailing comma 2022-03-30 09:23:45 +02:00
Henning Häcker
47786dcb8c use double quotes 2022-03-30 09:23:45 +02:00
Henning Häcker
5d91d6a885 fix default value for OCR_MAX_IMAGE_PIXELS 2022-03-30 09:23:45 +02:00
Henning Häcker
559f7c2683 elaborate PAPERLESS_OCR_MAX_IMAGE_PIXELS docs 2022-03-30 09:23:45 +02:00
Henning Häcker
3b4da70c85 extract OCR_MAX_IMAGE_PIXELS into settings.py 2022-03-30 09:23:45 +02:00
Henning Häcker
95199bd325 formatting according to black 2022-03-30 09:23:45 +02:00
Henning Häcker
a8887b211e implement PAPERLESS_OCR_MAX_IMAGE_PIXELS 2022-03-30 09:23:45 +02:00
Michael Shamoon
9a758fc3dc fix management e2e tests title
[ci skip]
2022-03-29 23:30:05 -07:00
shamoon
edc9c3f01c Merge pull request #565 from paperless-ngx/more-e2e-tests
Add some more e2e tests
2022-03-29 23:24:45 -07:00
Michael Shamoon
83d769251d document-detail e2e tests
[ci skip]
2022-03-29 23:12:19 -07:00
Michael Shamoon
bd66333147 test changing pdf viewer 2022-03-29 20:20:46 -07:00
Michael Shamoon
2228678520 Fix settings tests failing because of loading time 2022-03-29 20:02:19 -07:00
Michael Shamoon
9a042118f9 Fix fixture organization
[ci skip]
2022-03-29 20:02:19 -07:00
Michael Shamoon
787ee454ff Mock some API methods in settings spec 2022-03-29 20:02:19 -07:00
Michael Shamoon
32a4587bd3 Mock some API methods 2022-03-29 20:02:19 -07:00
Michael Shamoon
474050ba6b Multiple documents, filtering, view changes, in document list e2e testing 2022-03-29 20:02:19 -07:00
Michael Shamoon
34657fd675 Some document list bulk editor e2e tests 2022-03-29 20:02:19 -07:00
Michael Shamoon
18747db17f Settings e2e tests 2022-03-29 20:02:19 -07:00
Michael Shamoon
dccea9434a Management e2e tests 2022-03-29 20:02:19 -07:00
Michael Shamoon
85bf92ad2f Show prompt on password-protected pdfs 2022-03-29 15:38:09 -07:00
Michael Shamoon
40b07572a9 fix index js warning 2022-03-29 15:28:55 -07:00
Trenton Holmes
9147e3a0bd Merge pull request #552 from stumpylog/bugfix-black
Bump version of black in CI/pre-commit
2022-03-29 06:14:12 -07:00
Trenton Holmes
ed25212654 Updates black version to fix issues 2022-03-28 12:23:25 -07:00
shamoon
ce5fe61e67 Merge pull request #540 from paperless-ngx/filtering-query-params
Feature: Filtering query params aka browser navigation for filtering
2022-03-28 00:07:46 -07:00
Michael Shamoon
9e9266b92a Remove unused var 2022-03-28 00:06:42 -07:00
Michael Shamoon
e329d72e8b Clarify query var transformation code 2022-03-27 23:47:53 -07:00
Michael Shamoon
92ec3fc060 Clear all subscriptions, switchMap 2022-03-27 23:41:29 -07:00
Michael Shamoon
3afb3a905c fix ci.yml comment
[ci skip]
2022-03-27 14:44:39 -07:00
Michael Shamoon
b3e6f04b30 move const 2022-03-27 00:25:27 -07:00
Michael Shamoon
0a29f51862 Fix quick filtering 2022-03-27 00:09:09 -07:00
Michael Shamoon
7149d407cd Allow filtering by document metadata 2022-03-27 00:08:08 -07:00
Michael Shamoon
fbb17df916 Remove exact document router link matching 2022-03-26 23:30:01 -07:00
Michael Shamoon
34b317da7a Query vars for filtering 2022-03-26 23:18:12 -07:00
Quinn Casey
c161829803 Merge pull request #536 from paperless-ngx/locale-turkish
Add Turkish localization
2022-03-27 07:04:16 +07:00
Michael Shamoon
7c2ae129d7 rxjs compatibility 2022-03-26 14:18:16 -07:00
Paperless-ngx Translation Bot [bot]
c49afa7caa New Crowdin updates (#517)
* New translations messages.xlf (Slovenian)
[ci skip]

* New translations django.po (Turkish)
[ci skip]

* New translations messages.xlf (Turkish)
[ci skip]

* New translations django.po (Turkish)
[ci skip]

* New translations django.po (Turkish)
[ci skip]

* New translations django.po (Russian)
[ci skip]

* New translations messages.xlf (Russian)
[ci skip]

* New translations django.po (Turkish)
[ci skip]

* New translations django.po (Turkish)
[ci skip]

* New translations django.po (Turkish)
[ci skip]

* New translations messages.xlf (Turkish)
[ci skip]

* New translations messages.xlf (Turkish)
[ci skip]

* New translations messages.xlf (Turkish)
[ci skip]

* New translations messages.xlf (Turkish)
[ci skip]

* New translations messages.xlf (Turkish)
[ci skip]

* New translations messages.xlf (Turkish)
[ci skip]

* New translations messages.xlf (Turkish)
[ci skip]
2022-03-26 13:53:04 -07:00
Michael Shamoon
534c157809 Add Turkish localization 2022-03-26 13:52:15 -07:00
shamoon
cae4d3fae3 Merge pull request #497 from stumpylog/update-dependencies
Bumps dependencies
2022-03-26 08:33:05 -07:00
Michael Shamoon
f59500c809 pipe typo
[ci skip]
2022-03-25 01:50:04 -07:00
Quinn Casey
b75bf255ba Merge pull request #527 from paperless-ngx/reorg-frontend-ci
Realign frontend ci pipeline
2022-03-25 15:29:20 +07:00
Michael Shamoon
1588242876 realign frontend ci pipeline 2022-03-25 00:49:55 -07:00
shamoon
00eff651e6 Merge pull request #526 from FrankStrieter/fix/cypress-on-arm
fix: exclude cypress from build in Dockerfile
2022-03-24 23:49:41 -07:00
Frank Strieter
a83d6a691a fix: exclude cypress from build in Dockerfile 2022-03-25 07:26:15 +01:00
Jan-Hendrik Ewers
5065f2cb80 Add arm64 compatible docker-compose for sqlite-tika - resubmission of #27 (#479)
* Create arm variant for sqlite-tika as apache/tika does not support arm64 arch right now

https://github.com/jonaswinkler/paperless-ng/discussions/1256

* Update documentation to explain why there is a seemingly duplicated docker-compose file

* Add caveat about arm arch

* Update docs to encourage use of the new docker-compose

* Remove whitespace

https://github.com/jonaswinkler/paperless-ng/pull/1354/checks?check_run_id=3756807426

* Update docker container to use official ngx

Co-authored-by: Quinn Casey <quinn@quinncasey.com>

* doesn -> does not

* Update docker/compose/docker-compose.postgres-tika.yml

Co-authored-by: Jan-Hendrik Ewers <jh.ewers@gmail.com>

* Update docker/compose/docker-compose.sqlite-tika.arm.yml

Co-authored-by: Jan-Hendrik Ewers <jh.ewers@gmail.com>

* Update docker/compose/docker-compose.sqlite-tika.yml

Co-authored-by: Jan-Hendrik Ewers <jh.ewers@gmail.com>

* Update docker/compose/docker-compose.sqlite-tika.arm.yml

* Update docker-compose.sqlite-tika.arm.yml

* Update docker/compose/docker-compose.sqlite-tika.arm.yml

Co-authored-by: Jan-Hendrik Ewers <jh.ewers@gmail.com>

* Add redisdata to volumes

Co-authored-by: Quinn Casey <quinn@quinncasey.com>
2022-03-25 06:32:16 +07:00
shamoon
a4b36b041a Merge pull request #515 from paperless-ngx/clickable-dashboard-widget-tags
Clickable tags in dashboard widgets
2022-03-24 14:36:32 -07:00
Michael Shamoon
c360d9fa18 Remove text interpolation from doc routerLink 2022-03-24 08:09:41 -07:00
Trenton Holmes
78258eb9cb Bumps django to 4.0 and fixes associated issues 2022-03-24 07:39:11 -07:00
Trenton Holmes
71e5b5cf72 Bumps pikepdf to ~5.1, dateparser to ~1.1 and other updates as possible/needed 2022-03-24 07:39:07 -07:00
shamoon
4b0229584e Merge pull request #514 from paperless-ngx/unified-management-component
Unify management lists with single template
2022-03-24 07:09:13 -07:00
Florian
b2df8297e1 Merge pull request #520 from gador/revert-pdfminer-six
Revert "Bump pdfminer-six from 20211012 to 20220319"
2022-03-24 15:06:49 +01:00
florian on nixos (Florian Brandes)
95048b14fd Revert "Bump pdfminer-six from 20211012 to 20220319"
ocrmypdf requires pdfminer-six <=20211012

This reverts commit 0932f095e1.
2022-03-24 14:28:32 +01:00
Michael Shamoon
3360791a31 Clickable tags in dashboard widgets 2022-03-23 22:08:00 -07:00
Michael Shamoon
4c65ecbe89 Unify management lists with single template 2022-03-23 13:31:00 -07:00
shamoon
65a56a1da0 Merge pull request #454 from schnuffle/pre-commit
Corrections to pass pre-commit hooks
2022-03-23 11:58:02 -07:00
shamoon
645f9b2ee2 Merge pull request #503 from paperless-ngx/testing
Add unit- & end to end test setup in frontend
2022-03-23 07:25:31 -07:00
Michael Shamoon
117157f02c Merge branch 'main' into testing 2022-03-23 07:22:52 -07:00
Frank Strieter
ccee85a05e fix code style issues
solve merge conflicts

format code

format code

format code
2022-03-23 09:39:55 +01:00
Frank Strieter
a27fb173dd solve merge conflicts 2022-03-23 09:24:07 +01:00
Frank Strieter
e4885badfc chore: update package.lock 2022-03-23 09:24:07 +01:00
Frank Strieter
62c488aff6 test: run tests in ci 2022-03-23 09:24:07 +01:00
Frank Strieter
afcb5fe3cf test: add cypress test for documents list 2022-03-23 09:24:07 +01:00
Frank Strieter
d38bed1334 test: remove most of the boilerplate tests 2022-03-23 09:24:07 +01:00
Frank Strieter
f6a9d5b038 chore: replace karma with jest 2022-03-23 09:23:59 +01:00
Frank Strieter
863258f23d chore: replace protractor with cypress 2022-03-23 09:22:40 +01:00
shamoon
3b76fa3f92 Fix pre-commit link
[ci skip]
2022-03-23 09:22:40 +01:00
shamoon
023a42fa07 Project actions on dev too
[ci skip]
2022-03-23 09:22:40 +01:00
Quinn Casey
537515432c Merge pull request #504 from paperless-ngx/locale-serbian
Add Serbian localization
2022-03-23 13:53:38 +07:00
shamoon
f93783052b Merge pull request #372 from paperless-ngx/feature-bottom-pagination
Feature: Add bottom pagination
2022-03-22 22:58:58 -07:00
Michael Shamoon
991bc1a1ce Add Serbian localization 2022-03-22 22:26:59 -07:00
Paperless-ngx Translation Bot [bot]
1b5c557c44 New Crowdin updates (#493)
* New translations django.po (Serbian (Latin))
* New translations messages.xlf (Serbian (Latin))
[ci skip]
2022-03-22 22:17:16 -07:00
shamoon
5794faef6c Merge pull request #313 from paperless-ngx/fix-issue-311
Fix #311 unable to click checkboxes in document list
2022-03-22 14:59:34 -07:00
Trenton Holmes
ec01c436ea Merge pull request #474 from paperless-ngx/dependabot/pip/dev/pdfminer-six-20220319
Bump pdfminer-six from 20211012 to 20220319
2022-03-22 07:44:39 -07:00
Trenton Holmes
9bb5568d8e Un-pickle and re-pickle the test models to resolve the version difference warning 2022-03-22 09:37:17 +01:00
dependabot[bot]
1cd5de697e Bump @angular/core from 13.2.5 to 13.3.0 in /src-ui (#488)
Bumps [@angular/core](https://github.com/angular/angular/tree/HEAD/packages/core) from 13.2.5 to 13.3.0.
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/master/docs/RELEASE_SCHEDULE.md)
- [Commits](https://github.com/angular/angular/commits/13.3.0/packages/core)

---
updated-dependencies:
- dependency-name: "@angular/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-22 00:23:38 -07:00
dependabot[bot]
ce8c812669 Bump @ng-bootstrap/ng-bootstrap from 12.0.0 to 12.0.1 in /src-ui (#486)
Bumps [@ng-bootstrap/ng-bootstrap](https://github.com/ng-bootstrap/ng-bootstrap) from 12.0.0 to 12.0.1.
- [Release notes](https://github.com/ng-bootstrap/ng-bootstrap/releases)
- [Changelog](https://github.com/ng-bootstrap/ng-bootstrap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ng-bootstrap/ng-bootstrap/compare/12.0.0...12.0.1)

---
updated-dependencies:
- dependency-name: "@ng-bootstrap/ng-bootstrap"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-22 00:17:23 -07:00
dependabot[bot]
2c3ac053d8 Bump @angular/compiler from 13.2.5 to 13.3.0 in /src-ui (#487)
Bumps [@angular/compiler](https://github.com/angular/angular/tree/HEAD/packages/compiler) from 13.2.5 to 13.3.0.
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/master/docs/RELEASE_SCHEDULE.md)
- [Commits](https://github.com/angular/angular/commits/13.3.0/packages/compiler)

---
updated-dependencies:
- dependency-name: "@angular/compiler"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-22 00:16:15 -07:00
dependabot[bot]
ca3bb6a540 Bump @types/jasmine from 3.10.3 to 4.0.0 in /src-ui (#485)
Bumps [@types/jasmine](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jasmine) from 3.10.3 to 4.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jasmine)

---
updated-dependencies:
- dependency-name: "@types/jasmine"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-22 00:11:15 -07:00
dependabot[bot]
0932f095e1 Bump pdfminer-six from 20211012 to 20220319
Bumps [pdfminer-six](https://github.com/pdfminer/pdfminer.six) from 20211012 to 20220319.
- [Release notes](https://github.com/pdfminer/pdfminer.six/releases)
- [Changelog](https://github.com/pdfminer/pdfminer.six/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pdfminer/pdfminer.six/commits)

---
updated-dependencies:
- dependency-name: pdfminer-six
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-22 03:47:06 +00:00
dependabot[bot]
1c4e74920a Bump @types/node from 17.0.21 to 17.0.22 in /src-ui (#472)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.21 to 17.0.22.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-21 13:38:47 -07:00
dependabot[bot]
e6efff426a Bump @angular-devkit/build-angular from 13.2.6 to 13.3.0 in /src-ui (#471)
Bumps [@angular-devkit/build-angular](https://github.com/angular/angular-cli) from 13.2.6 to 13.3.0.
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Changelog](https://github.com/angular/angular-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/angular/angular-cli/compare/13.2.6...13.3.0)

---
updated-dependencies:
- dependency-name: "@angular-devkit/build-angular"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-21 13:36:46 -07:00
dependabot[bot]
cacf60fdd9 Bump @angular/platform-browser-dynamic from 13.2.5 to 13.3.0 in /src-ui (#470)
Bumps [@angular/platform-browser-dynamic](https://github.com/angular/angular/tree/HEAD/packages/platform-browser-dynamic) from 13.2.5 to 13.3.0.
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/master/docs/RELEASE_SCHEDULE.md)
- [Commits](https://github.com/angular/angular/commits/13.3.0/packages/platform-browser-dynamic)

---
updated-dependencies:
- dependency-name: "@angular/platform-browser-dynamic"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-21 13:33:59 -07:00
dependabot[bot]
352f94ff2b Bump @angular/platform-browser from 13.2.5 to 13.3.0 in /src-ui (#468)
Bumps [@angular/platform-browser](https://github.com/angular/angular/tree/HEAD/packages/platform-browser) from 13.2.5 to 13.3.0.
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/master/docs/RELEASE_SCHEDULE.md)
- [Commits](https://github.com/angular/angular/commits/13.3.0/packages/platform-browser)

---
updated-dependencies:
- dependency-name: "@angular/platform-browser"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-21 13:30:16 -07:00
Trenton Holmes
47530d274f Merge pull request #467 from paperless-ngx/dependabot/pip/dev/scikit-learn-1.0.2
Fix failing test after updating model format version
2022-03-21 13:28:28 -07:00
dependabot[bot]
be13ec822f Bump @angular/cli from 13.2.6 to 13.3.0 in /src-ui (#469)
Bumps [@angular/cli](https://github.com/angular/angular-cli) from 13.2.6 to 13.3.0.
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Changelog](https://github.com/angular/angular-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/angular/angular-cli/compare/13.2.6...13.3.0)

---
updated-dependencies:
- dependency-name: "@angular/cli"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-21 13:28:09 -07:00
Marc Schaefer
c6da0cc9a2 Merge branch 'pre-commit' of github.com:schnuffle/paperless-ngx into pre-commit 2022-03-21 19:46:19 +01:00
Marc Schaefer
07623f9883 Removed nested quotes 2022-03-21 19:45:46 +01:00
Schnuffle
6e0d334a0c Indentation corrections 2022-03-21 19:38:44 +01:00
Johann Bauer
cffdaefe2f Fix model test 2022-03-21 18:53:53 +01:00
Johann Bauer
9de4ca61e8 Increase FORMAT_VERSION to force model re-creation 2022-03-21 18:11:18 +01:00
dependabot[bot]
d7919c45a3 Bump scikit-learn from 0.24.0 to 1.0.2
Bumps [scikit-learn](https://github.com/scikit-learn/scikit-learn) from 0.24.0 to 1.0.2.
- [Release notes](https://github.com/scikit-learn/scikit-learn/releases)
- [Commits](https://github.com/scikit-learn/scikit-learn/compare/0.24.0...1.0.2)

---
updated-dependencies:
- dependency-name: scikit-learn
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 18:11:18 +01:00
Michael Shamoon
3dfadcc397 prettier 2022-03-21 08:38:01 -07:00
Michael Shamoon
98d677dc0b Merge branch 'main' into dev 2022-03-21 08:36:44 -07:00
Paperless Translation Bot
682f3fdc3e New Crowdin updates (#423)
* New translations messages.xlf (French)
[ci skip]

* New translations django.po (Luxembourgish)
[ci skip]

* New translations messages.xlf (Portuguese, Brazilian)
[ci skip]

* New translations django.po (Portuguese, Brazilian)
[ci skip]
2022-03-20 21:09:25 -07:00
Trenton Holmes
ea7a1012b9 Uses a change file action to filter only changed src/ files 2022-03-20 21:50:54 +01:00
Trenton Holmes
f24373699e Disables coveralls step for dependabot branches/pulls 2022-03-20 21:50:54 +01:00
shamoon
f74e15840d Merge pull request #393 from stumpylog/fix-imap-tools-bug
Fix imap tools bug
2022-03-20 13:37:17 -07:00
Schnuffle
c2c8a27545 Corrections to pass pre-commit hooks 2022-03-20 15:58:37 +01:00
shamoon
6f2fd1e2da Merge pull request #449 from paperless-ngx/marbar1-fix-typo
Fix typo: paperles(s)
2022-03-19 11:58:57 -07:00
marbar1
597effc856 Fix typo: paperles(s) 2022-03-19 19:37:52 +01:00
shamoon
0388ce3e5b Merge pull request #298 from paperless-ngx/feature-loading-screen
Feature: App loading screen
2022-03-19 07:38:21 -07:00
Quinn Casey
1ea6a14437 Merge pull request #443 from paperless-ngx/doc-unraid-template
Update documentation on how to install paperless on Unraid
2022-03-19 17:34:22 +07:00
Felix E
e8a073d538 Merge pull request #440 from addich/fix-374
Allow USERMAP_UID to re-use existing UIDs
2022-03-19 11:04:36 +01:00
Felix E
c8ac686b22 Merge pull request #35 from Tooa/1250-gotenberg-follow-up
fix(gotenberg): use command flags
2022-03-19 11:03:32 +01:00
Felix E
81cfd13b4a Merge pull request #442 from paperless-ngx/fix-allow-shorter-search
Allow shorter search strings with Enter key
2022-03-19 10:24:14 +01:00
Uli
73a3abe535 docs: use link for Unraid store 2022-03-19 09:19:31 +01:00
Uli
9006dd12f3 docs: update Unraid FAQ section 2022-03-19 09:01:53 +01:00
shamoon
2bcbb89175 Merge pull request #419 from paperless-ngx/fix-missing-migration
Add missing migration for savedviewfilterrule
2022-03-18 23:36:14 -07:00
Michael Shamoon
39daddef34 Allow shorter search strings with Enter key 2022-03-18 23:30:26 -07:00
Michael Shamoon
ff4538612e Codestyle cleanup 2022-03-18 21:37:38 -07:00
addi
1782d00cc5 fix issue 374 2022-03-18 23:26:04 +01:00
shamoon
d4f468208e Merge pull request #415 from paperless-ngx/feature-improved-delay-button
Use progress bar for delayed buttons
2022-03-18 08:51:36 -07:00
Quinn Casey
c60b708b9c Merge pull request #324 from stumpylog/more-ci-checks
Align CI checks with pre-commit (mostly)
2022-03-18 18:01:06 +07:00
Michael Shamoon
3dee012415 Use progress bar for button delay 2022-03-17 14:37:21 -07:00
Felix Eckhofer
a1d1fb962b Add missing migration for savedviewfilterrule
Change introduced in d7cefabe98.
2022-03-17 13:19:26 +01:00
shamoon
24e02a6c5f Merge pull request #401 from paperless-ngx/fix-issue-288
Add minimum length for documents text filter
2022-03-17 03:22:19 -07:00
Michael Shamoon
4f352391ae Add minimum length to text filter 2022-03-16 08:46:07 -07:00
Paperless Translation Bot
4667e0bf88 New Crowdin updates (#342)
* New translations django.po (Romanian)
[ci skip]

* New translations django.po (Dutch)
[ci skip]

* New translations messages.xlf (Romanian)
[ci skip]

* New translations messages.xlf (Dutch)
[ci skip]

* New translations messages.xlf (Chinese Simplified)
[ci skip]

* New translations messages.xlf (Slovenian)
[ci skip]

* New translations django.po (Slovenian)
[ci skip]

* New translations messages.xlf (Slovenian)
[ci skip]

* New translations django.po (Polish)
[ci skip]

* New translations messages.xlf (Chinese Simplified)
[ci skip]
2022-03-15 20:58:44 -07:00
Trenton Holmes
9544e6c757 Improves the mail handling testing to use more of the imap_tools library types instead of internal types 2022-03-15 16:25:51 -07:00
shamoon
83b5e1a49d Merge pull request #388 from paperless-ngx/update-dirty-check-forms
Update @ngneat/dirty-check-forms to 2.0.0
2022-03-15 15:34:33 -07:00
Trenton Holmes
4f287b5ecd Fixes the EmailAddress which was a dict and is now a class 2022-03-15 14:00:01 -07:00
Michael Shamoon
4c346be367 Update @ngneat/dirty-check-forms to 2.0.0 2022-03-15 13:49:43 -07:00
Michael Shamoon
c87ac6f1ad Add bottom pagination for management lists 2022-03-15 10:17:19 -07:00
shamoon
02dc395880 Merge pull request #366 from paperless-ngx/fix-issue-365
Fix filterable dropdown buttons arent translated
2022-03-15 08:25:09 -07:00
Trenton Holmes
63a3e0b325 Merge pull request #330 from paperless-ngx/dependabot/pip/dev/sphinx-4.4.0
Bump sphinx from 3.4.3 to 4.4.0
2022-03-15 07:45:37 -07:00
Michael Shamoon
01ae5688d7 Add bottom pagination 2022-03-15 00:58:58 -07:00
Michael Shamoon
ec8b10c85b Fix filterable dropdown buttons arent translated 2022-03-14 22:40:45 -07:00
shamoon
a440b712de Merge pull request #355 from paperless-ngx/dependabot/npm_and_yarn/src-ui/dev/rxjs-7.5.5
Bump rxjs from 6.6.7 to 7.5.5 in /src-ui
2022-03-14 16:24:26 -07:00
Michael Shamoon
3653045922 rxjs7 compatibility 2022-03-14 16:23:14 -07:00
dependabot[bot]
0d7438e398 Bump rxjs from 6.6.7 to 7.5.5 in /src-ui
Bumps [rxjs](https://github.com/reactivex/rxjs) from 6.6.7 to 7.5.5.
- [Release notes](https://github.com/reactivex/rxjs/releases)
- [Changelog](https://github.com/ReactiveX/rxjs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/reactivex/rxjs/compare/6.6.7...7.5.5)

---
updated-dependencies:
- dependency-name: rxjs
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 23:07:51 +00:00
shamoon
81b17bec69 Merge pull request #353 from paperless-ngx/dependabot/npm_and_yarn/src-ui/dev/angular/cli-13.2.6
Bump @angular/cli from 13.2.5 to 13.2.6 in /src-ui
2022-03-14 16:06:53 -07:00
dependabot[bot]
e43c446c38 Bump @angular/cli from 13.2.5 to 13.2.6 in /src-ui
Bumps [@angular/cli](https://github.com/angular/angular-cli) from 13.2.5 to 13.2.6.
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Changelog](https://github.com/angular/angular-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/angular/angular-cli/compare/13.2.5...13.2.6)

---
updated-dependencies:
- dependency-name: "@angular/cli"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 23:03:13 +00:00
shamoon
0cb442c6e0 Merge pull request #354 from paperless-ngx/dependabot/npm_and_yarn/src-ui/dev/angular/animations-13.2.6
Bump @angular/animations from 13.2.5 to 13.2.6 in /src-ui
2022-03-14 16:02:20 -07:00
dependabot[bot]
17ea079fcd Bump @angular/animations from 13.2.5 to 13.2.6 in /src-ui
Bumps [@angular/animations](https://github.com/angular/angular/tree/HEAD/packages/animations) from 13.2.5 to 13.2.6.
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/master/docs/RELEASE_SCHEDULE.md)
- [Commits](https://github.com/angular/angular/commits/13.2.6/packages/animations)

---
updated-dependencies:
- dependency-name: "@angular/animations"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 22:58:58 +00:00
shamoon
2270aefdee Merge pull request #352 from paperless-ngx/dependabot/npm_and_yarn/src-ui/dev/angular/common-13.2.6
Bump @angular/common from 13.2.5 to 13.2.6 in /src-ui
2022-03-14 15:58:03 -07:00
shamoon
30828bcbe0 Merge pull request #356 from paperless-ngx/dependabot/npm_and_yarn/src-ui/dev/popperjs/core-2.11.4
Bump @popperjs/core from 2.11.2 to 2.11.4 in /src-ui
2022-03-14 15:50:13 -07:00
dependabot[bot]
4667adc64d Bump sphinx from 3.4.3 to 4.4.0
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 3.4.3 to 4.4.0.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/4.x/CHANGES)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v3.4.3...v4.4.0)

---
updated-dependencies:
- dependency-name: sphinx
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 22:29:17 +00:00
dependabot[bot]
de779d453c Bump imap-tools from 0.52.0 to 0.53.0
Bumps [imap-tools](https://github.com/ikvk/imap_tools) from 0.52.0 to 0.53.0.
- [Release notes](https://github.com/ikvk/imap_tools/releases)
- [Changelog](https://github.com/ikvk/imap_tools/blob/master/docs/release_notes.rst)
- [Commits](https://github.com/ikvk/imap_tools/compare/v0.52.0...v0.53.0)

---
updated-dependencies:
- dependency-name: imap-tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 23:23:12 +01:00
dependabot[bot]
fe959b30c6 Bump pytest from 7.0.1 to 7.1.0
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.0.1 to 7.1.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.0.1...7.1.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 23:22:39 +01:00
dependabot[bot]
3fcbb17a15 Bump @popperjs/core from 2.11.2 to 2.11.4 in /src-ui
Bumps [@popperjs/core](https://github.com/popperjs/popper-core) from 2.11.2 to 2.11.4.
- [Release notes](https://github.com/popperjs/popper-core/releases)
- [Commits](https://github.com/popperjs/popper-core/compare/v2.11.2...v2.11.4)

---
updated-dependencies:
- dependency-name: "@popperjs/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 20:21:40 +00:00
dependabot[bot]
cdfde1d91f Bump @angular/common from 13.2.5 to 13.2.6 in /src-ui
Bumps [@angular/common](https://github.com/angular/angular/tree/HEAD/packages/common) from 13.2.5 to 13.2.6.
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/master/docs/RELEASE_SCHEDULE.md)
- [Commits](https://github.com/angular/angular/commits/13.2.6/packages/common)

---
updated-dependencies:
- dependency-name: "@angular/common"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 20:19:28 +00:00
dependabot[bot]
64a5b24e12 Bump ocrmypdf from 13.4.0 to 13.4.1
Bumps [ocrmypdf](https://github.com/jbarlow83/ocrmypdf) from 13.4.0 to 13.4.1.
- [Release notes](https://github.com/jbarlow83/ocrmypdf/releases)
- [Changelog](https://github.com/ocrmypdf/OCRmyPDF/blob/master/docs/release_notes.rst)
- [Commits](https://github.com/jbarlow83/ocrmypdf/compare/v13.4.0...v13.4.1)

---
updated-dependencies:
- dependency-name: ocrmypdf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 19:39:06 +01:00
Trenton Holmes
7d29bd216d Adds back certain dependencies under certain Python versions to fix dependabot 2022-03-14 19:08:11 +01:00
Simon Siebert
1abd7cc2a0 Fixing Test 2022-03-14 19:03:09 +01:00
Simon Siebert
78608d92b4 Fixing code formating 2022-03-14 19:03:09 +01:00
Simon Siebert
54cbacf4f4 Update parsers.py and test_consumer.py 2022-03-14 19:03:09 +01:00
shamoon
b43aae84ab Merge pull request #247 from paperless-ngx/locale-chinese-simplified
Add Chinese localization
2022-03-14 07:22:28 -07:00
shamoon
9d9789953b Merge pull request #322 from paperless-ngx/fix-sphinx-errors
Fix minor sphinx errors
2022-03-14 06:49:25 -07:00
Paperless Translation Bot
614eb930d3 New Crowdin updates (#308)
* New translations messages.xlf (Slovenian)
[ci skip]

* New translations django.po (Polish)
[ci skip]

* New translations messages.xlf (Polish)
[ci skip]

* New translations django.po (Polish)
[ci skip]

* New translations messages.xlf (Polish)
[ci skip]
2022-03-13 21:18:34 -07:00
dependabot[bot]
62094a2098 Bump @angular-devkit/build-angular from 13.2.5 to 13.2.6 in /src-ui (#329)
Bumps [@angular-devkit/build-angular](https://github.com/angular/angular-cli) from 13.2.5 to 13.2.6.
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Changelog](https://github.com/angular/angular-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/angular/angular-cli/compare/13.2.5...13.2.6)

---
updated-dependencies:
- dependency-name: "@angular-devkit/build-angular"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-13 21:17:43 -07:00
dependabot[bot]
84ed805fd7 Bump karma-chrome-launcher from 3.1.0 to 3.1.1 in /src-ui (#328)
Bumps [karma-chrome-launcher](https://github.com/karma-runner/karma-chrome-launcher) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/karma-runner/karma-chrome-launcher/releases)
- [Changelog](https://github.com/karma-runner/karma-chrome-launcher/blob/master/CHANGELOG.md)
- [Commits](https://github.com/karma-runner/karma-chrome-launcher/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: karma-chrome-launcher
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-13 21:14:49 -07:00
dependabot[bot]
82a158e803 Bump @angular/localize from 13.2.5 to 13.2.6 in /src-ui (#327)
Bumps [@angular/localize](https://github.com/angular/angular) from 13.2.5 to 13.2.6.
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/master/docs/RELEASE_SCHEDULE.md)
- [Commits](https://github.com/angular/angular/compare/13.2.5...13.2.6)

---
updated-dependencies:
- dependency-name: "@angular/localize"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-13 21:11:11 -07:00
dependabot[bot]
1527ae1472 Bump @angular/router from 13.2.5 to 13.2.6 in /src-ui (#326)
Bumps [@angular/router](https://github.com/angular/angular/tree/HEAD/packages/router) from 13.2.5 to 13.2.6.
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/master/docs/RELEASE_SCHEDULE.md)
- [Commits](https://github.com/angular/angular/commits/13.2.6/packages/router)

---
updated-dependencies:
- dependency-name: "@angular/router"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-13 21:03:27 -07:00
dependabot[bot]
5d1e86fdc3 Bump @angular/forms from 13.2.5 to 13.2.6 in /src-ui (#325)
Bumps [@angular/forms](https://github.com/angular/angular/tree/HEAD/packages/forms) from 13.2.5 to 13.2.6.
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/master/docs/RELEASE_SCHEDULE.md)
- [Commits](https://github.com/angular/angular/commits/13.2.6/packages/forms)

---
updated-dependencies:
- dependency-name: "@angular/forms"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-13 21:00:13 -07:00
Michael Shamoon
a47ec7c77d Add timeout warning 2022-03-13 20:45:14 -07:00
Trenton Holmes
ee1404d99e Adds additional CI checks for the backend and frontend, to complement pre-commit hooks which should already be run 2022-03-13 19:37:34 -07:00
shamoon
2caba558d7 Revert "Bump sphinx from 3.4.3 to 4.4.0" (#323) 2022-03-13 19:27:02 -07:00
shamoon
5e4119f6a9 Merge pull request #183 from paperless-ngx/dependabot/pip/dev/sphinx-4.4.0
Bump sphinx from 3.4.3 to 4.4.0
2022-03-13 19:06:42 -07:00
Michael Shamoon
6b46b43367 Fix minor sphinx errors 2022-03-13 17:48:17 -07:00
shamoon
460f10f46a Merge pull request #314 from paperless-ngx/fix-issue-312
Fix page links hidden
2022-03-13 16:31:57 -07:00
Michael Shamoon
37c6201a5a Add Chinese localization
Addresses https://github.com/paperless-ngx/paperless-ngx/issues/134#issuecomment-1062950795
2022-03-13 14:26:52 -07:00
shamoon
4184988c0c Merge pull request #315 from paperless-ngx/locale-slovenian
Add Slovenian language for frontend
2022-03-13 14:24:59 -07:00
Trenton Holmes
3264015dac Merge pull request #296 from stumpylog/ci-cache-venv
Updates actions to use GHA Python pipenv caching
2022-03-13 14:00:23 -07:00
Michael Shamoon
d1c785d1d0 Add Slovenian language for frontend
See #303
2022-03-13 09:15:42 -07:00
Michael Shamoon
abd63df75b Fix page links hidden
Closes #312
2022-03-13 09:05:29 -07:00
Michael Shamoon
57f35292d5 Fix dark mode selected table row background color 2022-03-13 08:45:39 -07:00
Michael Shamoon
7bd6f4a4ea Prevent event collision 2022-03-13 08:41:36 -07:00
Trenton Holmes
35de8e6ad5 Changes the pipenv install to be a sync 2022-03-13 08:20:40 -07:00
Trenton Holmes
1549edfd55 Changes codestyle and documentation steps to use cache as well 2022-03-13 08:07:28 -07:00
Trenton Holmes
f33cf6cc2e Fixes coveralls not running 2022-03-13 08:07:28 -07:00
Trenton Holmes
3a8cffe3ce Removes duplicated install of pipenv, changes to use pipx as per the official example 2022-03-13 08:07:28 -07:00
Trenton Holmes
58066443de Updates GHA to use the setup-python pipenv caching 2022-03-13 08:07:28 -07:00
Paperless Translation Bot
594445f6dd New Crowdin updates (#305)
* New translations django.po (Slovenian)
[ci skip]

* New translations messages.xlf (Slovenian)
[ci skip]
2022-03-13 03:20:56 -07:00
shamoon
c3e86f0f21 Merge pull request #306 from lippoliv/feature-ignore-vscode-folder
ignore vscode folder
2022-03-13 01:22:34 -08:00
Oliver Lippert
d80102a7a4 ignore .vscode folder
Signed-off-by: Oliver Lippert <oliver@allesit.de>
2022-03-13 10:17:42 +01:00
Paperless Translation Bot
e886c38b45 New translations messages.xlf (Slovenian) (#303)
[ci skip]
2022-03-13 01:16:46 -08:00
Tooa
6fb856ee70 fix(gotenberg): use command flags
Gotenberg v7 does not use environment variables anymore, but command's flags.

See: https://gotenberg.dev/docs/get-started/docker-compose#modules-properties
2022-03-13 07:40:31 +01:00
Paperless Translation Bot
3922588716 New Crowdin updates (#292)
* New translations messages.xlf (Chinese Simplified)
[ci skip]

* New translations django.po (Slovak)
[ci skip]

* New translations messages.xlf (Slovak)
[ci skip]

* New translations django.po (Slovak)
[ci skip]

* New translations messages.xlf (Portuguese)
[ci skip]

* New translations messages.xlf (Portuguese)
[ci skip]
2022-03-12 20:24:22 -08:00
shamoon
940b12a908 Merge pull request #297 from stumpylog/dependabot-gha-updates
Enable dependabot GHA updates
2022-03-12 20:12:28 -08:00
Michael Shamoon
db5349881d App loading screen 2022-03-12 20:09:16 -08:00
Trenton Holmes
0edfe83a23 Enables dependabot for Github Action versions 2022-03-12 18:03:39 -08:00
Oliver Lippert
7abc6440f6 add link to setup instructions for bare metal (#221) 2022-03-12 08:43:12 -08:00
Quinn Casey
168ce2111d Merge pull request #278 from stumpylog/pre-commit-python-changes
Python Cleanup from pre-commit
2022-03-12 08:09:13 -08:00
Paperless Translation Bot
617d0bfee7 New translations messages.xlf (Portuguese, Brazilian) (#286)
[ci skip]
2022-03-12 03:10:58 -08:00
Trenton Holmes
dc657f2eb0 Maybe make CodeQL happy about this exception handling 2022-03-11 12:39:40 -08:00
shamoon
ef2b4a7536 Merge pull request #276 from paperless-ngx/prettier-cleanup-ts-js-md
Prettier cleanup for .ts .js and .md files
2022-03-11 12:31:21 -08:00
Michael Shamoon
e41d75c374 Prettier code cleanup for PR #273 2022-03-11 12:00:31 -08:00
Michael Shamoon
eb55f5655f Prettier code cleanup for .md files 2022-03-11 11:58:19 -08:00
Michael Shamoon
9f72bf7745 Prettier code cleanup for .js files
See #182
2022-03-11 11:58:19 -08:00
Michael Shamoon
f34202a82a Prettier code cleanup for .ts files
See #182
2022-03-11 11:58:19 -08:00
shamoon
f8c8161a3e Merge pull request #273 from GruberViktor/dev
Added nav buttons in the document detail view
2022-03-11 11:57:03 -08:00
GruberViktor
63aafd3133 remove automatic focus on title in document-detail view
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2022-03-11 20:54:24 +01:00
Trenton Holmes
e2303235cd Fixes what looks like a conflict between black and flake8 2022-03-11 11:34:32 -08:00
Trenton Holmes
1771d18a21 Runs the pre-commit hooks over all the Python files 2022-03-11 11:34:28 -08:00
GruberViktor
d02a0b2213 remove text from close-button in the document-detail view
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2022-03-11 20:22:39 +01:00
GruberViktor
6cbbd0c515 Apply suggestions from code review
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2022-03-11 20:16:53 +01:00
dependabot[bot]
f328d1461f Bump sphinx from 3.4.3 to 4.4.0
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 3.4.3 to 4.4.0.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/4.x/CHANGES)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v3.4.3...v4.4.0)

---
updated-dependencies:
- dependency-name: sphinx
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-11 18:56:10 +00:00
Quinn Casey
d3e9799279 Merge pull request #182 from stumpylog/pre-commit-hooks
Adds pre-commit hooks for linting and formatting
2022-03-11 10:50:04 -08:00
Paperless Translation Bot
14eefe1f5d New Crowdin updates (#265)
* New translations django.po (Portuguese)
[ci skip]

* New translations messages.xlf (Portuguese)
[ci skip]

* New translations django.po (German)
[ci skip]

* New translations messages.xlf (Portuguese)
[ci skip]
2022-03-11 10:49:59 -08:00
Trenton Holmes
6c2cc4cf50 Configures prettier formatting further 2022-03-11 10:32:25 -08:00
shamoon
440f4729ac Merge pull request #253 from paperless-ngx/feature-better-date-keyboard-input
Improve date keyboard input
2022-03-11 10:27:56 -08:00
Trenton Holmes
8a5176e593 Updates the documentation to include installation of the pre-commit hooks 2022-03-11 09:26:41 -08:00
Viktor
1259911275 Added nav buttons in the document detail view
Sometimes, when you are looking for a document, you need to go into the document-detail view
to read the pdf. To view the next document in the detail view, normally you would go back and
then click on the next.

Here I added two buttons to the toolbar to traverse throught the documents easily.
2022-03-11 17:35:38 +01:00
Michael Shamoon
4e4035a867 Fix enter key was prevented 2022-03-11 08:11:35 -08:00
shamoon
9bd87e78dc Merge pull request #263 from paperless-ngx/fix-dropdown-count
Fix: Include excluded items in dropdown count
2022-03-11 08:08:54 -08:00
Trenton Holmes
12a1c4ccbf Ensures Pipfile and requirements are up to date 2022-03-11 07:07:28 -08:00
Trenton Holmes
888e17cb91 Removes flake8 ignored warnings and errors, as black formatting will take care of almost all of these 2022-03-11 07:07:28 -08:00
Trenton Holmes
0fa48cea2a Updates the beautysh hook to use tabs, as this reduces the diff of the output. Updates .editorconfig to use spaces in Markdown files to match prettier formatting 2022-03-11 07:07:27 -08:00
Trenton Holmes
9b7d393d5d Removes migrations exclusion from black formatting 2022-03-11 07:07:27 -08:00
Trenton Holmes
cc702cbdfa Adds commenting and a little organization to the hook configuration 2022-03-11 07:07:26 -08:00
Trenton Holmes
e8ddb0c427 Removes tslint which doesn't work. Adds exclusions of the migrations folder to Python related hooks 2022-03-11 07:07:26 -08:00
Trenton Holmes
feb677e656 Adds and configures pre-commit hooks for linting and formatting during development 2022-03-11 07:07:25 -08:00
Quinn Casey
c19dd81ecf Merge pull request #242 from stumpylog/resolve-test-warnings
Reduce warnings in test suite
2022-03-11 05:54:19 -08:00
shamoon
01a50a3a98 Merge pull request #262 from kpj/fix-install_url
Fix install url in docs
2022-03-11 01:27:18 -08:00
Michael Shamoon
8920a32c75 Include excluded items in dropdown count 2022-03-11 01:17:19 -08:00
Michael Shamoon
4773d0bb7f semicolons 2022-03-11 01:03:43 -08:00
Michael Shamoon
20a6c5e7b7 more code cleanup 2022-03-11 00:52:32 -08:00
Michael Shamoon
0826e0f96b code cleanup 2022-03-11 00:48:06 -08:00
Kim
bd374f4c36 Also update other occurrences of master branch to main 2022-03-11 09:45:44 +01:00
Kim
bac8849f2d Use main instead of master branch in install URL 2022-03-11 09:39:01 +01:00
Michael Shamoon
ad87c3c87d Fix dropdown inputs 2022-03-11 00:29:59 -08:00
Michael Shamoon
4c7eb34290 Move padding into date formatter 2022-03-11 00:28:06 -08:00
Michael Shamoon
a1fd9f7310 Limit date input field chars and length 2022-03-11 00:11:59 -08:00
shamoon
8f1c4cd9c4 Merge pull request #243 from paperless-ngx/css-variables
Custom color theming
2022-03-10 19:26:15 -08:00
Trenton Holmes
85b210ebf6 Reduces number of warnings from testing from 165 to 128. In doing so, fixes a few minor things in the decrypt and export commands 2022-03-10 18:12:48 -08:00
Michael Shamoon
af7ffa3878 Allow date dropdowns to use new formatter 2022-03-10 16:48:03 -08:00
Michael Shamoon
96a84d16a6 Merge branch 'main' into dev 2022-03-10 16:40:38 -08:00
Michael Shamoon
0737ea30e8 fix comment 2022-03-10 15:27:02 -08:00
Michael Shamoon
1807811903 Allow formatting non-padded dates 2022-03-10 15:17:32 -08:00
Michael Shamoon
a33dce1948 Code formatting 2022-03-10 15:17:32 -08:00
Michael Shamoon
ef4dc1b49e strip all delimiters 2022-03-10 15:17:31 -08:00
Michael Shamoon
0f886be109 semicolon 2022-03-10 15:17:31 -08:00
shamoon
73a597855f Merge pull request #250 from GruberViktor/date_parser
Parse dates when entered without separators
2022-03-10 15:16:50 -08:00
Quinn Casey
21ec2dfa68 Merge pull request #251 from paperless-ngx/dependabot-label-fix
Make dependabot labels consistent
2022-03-10 14:06:28 -08:00
Quinn Casey
296d1d1b61 Make dependabot labels consistent 2022-03-10 14:01:58 -08:00
Michael Shamoon
af536dfefb Fix outline buttons become invisible in light mode 2022-03-10 13:59:31 -08:00
Michael Shamoon
7d7c5207d7 Fix changing theme incorrectly affects dark mode settings 2022-03-10 13:56:22 -08:00
Viktor
52f0a3dfb9 Parse dates when entered without separators
This adds date dividers if none are entered.
It also adds the current year if it wasn't entered.

This allows users to just enter 1003, 100322, 10032022 and
have it expanded to 10.03.2022, in the case of the German format.
(All other formats are also supported)

It also replaces commas with the date divider.
This allows quick entry of the date on the numpad.
2022-03-10 21:31:54 +01:00
Ingo Sigmund
081f11af40 Merge pull request #214 from isigmund/dev 2022-03-10 15:09:33 +01:00
Ingo Sigmund
9f0f458a02 Merge pull request #23 from flofeld/patch-1 2022-03-10 15:06:12 +01:00
Paperless Translation Bot
e74c716588 New Crowdin updates (#244)
* New translations django.po (Italian)
[ci skip]

* New translations messages.xlf (Italian)
[ci skip]

* New translations messages.xlf (Slovenian)
[ci skip]

* New translations messages.xlf (Italian)
[ci skip]

* New translations messages.xlf (Slovenian)
[ci skip]

* New translations messages.xlf (Slovenian)
[ci skip]

* New translations django.po (Chinese Simplified)
[ci skip]

* New translations messages.xlf (Chinese Simplified)
[ci skip]

* New translations messages.xlf (Slovenian)
[ci skip]

* New translations messages.xlf (Slovenian)
[ci skip]

* New translations messages.xlf (Chinese Simplified)
[ci skip]

* New translations messages.xlf (Chinese Simplified)
[ci skip]

* New translations messages.xlf (Slovenian)
[ci skip]

* New translations messages.xlf (Chinese Simplified)
[ci skip]

* New translations messages.xlf (Chinese Simplified)
[ci skip]

* New translations django.po (Chinese Simplified)
[ci skip]

* New translations messages.xlf (Chinese Simplified)
[ci skip]
2022-03-09 16:21:06 -08:00
Florian Feldmann
89bd0791dc Apply suggestions from code review
Co-authored-by: Ingo Sigmund <Ingo.sigmund@web.de>
2022-03-10 01:11:23 +01:00
Michael Shamoon
a591614a39 Component methods arent really private 2022-03-09 15:43:06 -08:00
Michael Shamoon
0085c8351e Prevent overriding other settings 2022-03-09 15:40:04 -08:00
Michael Shamoon
4df7f92a56 Working conversion 2022-03-09 15:34:26 -08:00
Michael Shamoon
1841cefbd8 Converting colors experiment 2022-03-09 15:19:42 -08:00
Michael Shamoon
f13ae930a5 Allow non-hex color modes from color component 2022-03-09 14:12:39 -08:00
Michael Shamoon
dbe233f0ae Skeleton implementation of color setting 2022-03-09 14:12:28 -08:00
Michael Shamoon
17e5f6d76b refactor variable names 2022-03-09 11:13:58 -08:00
Michael Shamoon
f52d167da3 fix some missed focus styles 2022-03-09 11:10:26 -08:00
Michael Shamoon
63aa7128a7 Increase contrast for dark mode colored buttons 2022-03-08 16:48:31 -08:00
Michael Shamoon
d30a652fc1 Make correspondent links on cards buttons 2022-03-08 16:45:36 -08:00
Michael Shamoon
1cd0684f62 tweak dark mode bg coloring 2022-03-08 16:41:56 -08:00
Michael Shamoon
bc97a13a62 fix logo coloring, saved view widget link, card coloring 2022-03-08 16:41:49 -08:00
Michael Shamoon
db98eed392 fix some light mode stuff due to specificity 2022-03-08 16:28:58 -08:00
Michael Shamoon
76115d6a81 checkbox focus color 2022-03-08 16:05:21 -08:00
Michael Shamoon
9e2fd52434 tab switching styling 2022-03-08 16:03:32 -08:00
Michael Shamoon
7ca12c3dc4 toasts 2022-03-08 16:02:16 -08:00
Michael Shamoon
3dffa09977 fix some focus styling 2022-03-08 15:50:10 -08:00
Michael Shamoon
7c313eed33 unify some button colors 2022-03-08 15:38:16 -08:00
Michael Shamoon
383cf7f4d5 fix some buttons, focus shadow 2022-03-08 15:22:17 -08:00
Michael Shamoon
4babf0d102 Initial conversion to css variables 2022-03-08 14:49:40 -08:00
Quinn Casey
df4567f9e4 Merge pull request #236 from stumpylog/minimal-pipfile
Remove non-direct dependencies from Pipfile
2022-03-08 06:25:58 -08:00
Trenton Holmes
f4d09d46f4 Removes certain packages from the Pipfile 2022-03-07 12:15:16 -08:00
Ingo Sigmund
9d3242c13e Merge branch 'dev' of https://github.com/isigmund/paperless-ngx into dev 2022-03-06 18:03:24 +01:00
Ingo Sigmund
08c6a21bbb Revert "remove logic to delete dangling volumes: node"
This reverts commit c2da0ce521.
2022-03-06 18:03:19 +01:00
Ingo Sigmund
7d18be9928 Merge branch 'paperless-ngx:dev' into dev 2022-03-06 17:43:57 +01:00
shamoon
c52070d554 Merge pull request #212 from paperless-ngx/l10n_dev
New Crowdin updates
2022-03-05 20:10:52 -08:00
Paperless Translation Bot
23d6589a73 New translations messages.xlf (Spanish)
[ci skip]
2022-03-05 08:50:51 -08:00
Ingo Sigmund
3ae73e7df5 Merge branch 'paperless-ngx:dev' into dev 2022-03-05 12:12:42 +01:00
Paperless Translation Bot
8f3f60d249 New translations messages.xlf (Spanish)
[ci skip]
2022-03-05 03:09:56 -08:00
Ingo Sigmund
16664789d2 remove volume: if no named volumes are used 2022-03-05 12:07:52 +01:00
Paperless Translation Bot
f97aae1fd8 New translations django.po (Luxembourgish)
[ci skip]
2022-03-04 15:16:09 -08:00
Paperless Translation Bot
7e1bbecc9f New translations django.po (German)
[ci skip]
2022-03-04 15:16:08 -08:00
Paperless Translation Bot
376a56df26 New translations django.po (Luxembourgish)
[ci skip]
2022-03-04 14:17:33 -08:00
Ingo Sigmund
e75ea257e8 Correct install script (stop creating unused named volumes) 2022-03-03 15:17:54 +01:00
Florian Feldmann
7680bf7c0d Added a sentence about python-dotenv format
Something like this would have helped me to get the configuration right without debugging
2021-08-09 12:15:01 +02:00
470 changed files with 73996 additions and 24600 deletions

9
.build-config.json Normal file
View File

@@ -0,0 +1,9 @@
{
"qpdf": {
"version": "10.6.3"
},
"jbig2enc": {
"version": "0.29",
"git_tag": "0.29"
}
}

View File

@@ -17,3 +17,5 @@
**/htmlcov **/htmlcov
/src/.pytest_cache /src/.pytest_cache
.idea .idea
.venv/
.vscode/

View File

@@ -18,14 +18,20 @@ max_line_length = off
indent_size = 4 indent_size = 4
indent_style = space indent_style = space
[*.yml] [*.{yml,yaml}]
indent_style = space indent_style = space
[*.rst] [*.rst]
indent_style = space indent_style = space
[*.md]
indent_style = space
# Tests don't get a line width restriction. It's still a good idea to follow # Tests don't get a line width restriction. It's still a good idea to follow
# the 79 character rule, but in the interests of clarity, tests often need to # the 79 character rule, but in the interests of clarity, tests often need to
# violate it. # violate it.
[**/test_*.py] [**/test_*.py]
max_line_length = off max_line_length = off
[Dockerfile*]
indent_style = space

2
.env
View File

@@ -1,2 +1,2 @@
COMPOSE_PROJECT_NAME=paperless COMPOSE_PROJECT_NAME=paperless
export PROMPT="(pipenv-projectname)$P$G" export PROMPT="(pipenv-projectname)$P$G"

View File

@@ -7,34 +7,34 @@ body:
attributes: attributes:
value: | value: |
Have a question? 👉 [Start a new discussion](https://github.com/paperless-ngx/paperless-ngx/discussions/new) or [ask in chat](https://matrix.to/#/#paperless:adnidor.de). Have a question? 👉 [Start a new discussion](https://github.com/paperless-ngx/paperless-ngx/discussions/new) or [ask in chat](https://matrix.to/#/#paperless:adnidor.de).
Before opening an issue, please check [the documentation](https://paperless-ngx.readthedocs.io/en/latest/troubleshooting.html) and see if it helps you resolve your issue. Please also make sure that you followed the installation instructions. Before opening an issue, please double check:
If you encounter issues while installing or configuring Paperless-ngx, please post in the ["Support" section of the discussions](https://github.com/paperless-ngx/paperless-ngx/discussions/new?category=support). Remember that Paperless successfully runs on a variety of different systems. If Paperless-ngx does not start, it's likely an issue with your system, not an issue of Paperless-ngx. - [The troubleshooting documentation](https://paperless-ngx.readthedocs.io/en/latest/troubleshooting.html).
- [The installation instructions](https://paperless-ngx.readthedocs.io/en/latest/setup.html#installation).
Finally, please search issues and discussions before opening a new bug report. - [Existing issues and discussions](https://github.com/paperless-ngx/paperless-ngx/search?q=&type=issues).
If you encounter issues while installing or configuring Paperless-ngx, please post in the ["Support" section of the discussions](https://github.com/paperless-ngx/paperless-ngx/discussions/new?category=support).
- type: textarea - type: textarea
id: description id: description
attributes: attributes:
label: Description label: Description
description: A clear and concise description of what the bug is. description: A clear and concise description of what the bug is. If applicable, add screenshots to help explain your problem.
placeholder: Currently... placeholder: |
validations: Currently Paperless does not work when...
required: true
- type: textarea [Screenshot if applicable]
id: expected-behavior
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
placeholder: In this situation...
validations: validations:
required: true required: true
- type: textarea - type: textarea
id: reproduction id: reproduction
attributes: attributes:
label: Steps to reproduce label: Steps to reproduce
description: Steps to reproduce the behavior description: Steps to reproduce the behavior.
placeholder: "1. Go to '...', 2. Click on '....', 3. See error" placeholder: |
1. Go to '...'
2. Click on '....'
3. See error
validations: validations:
required: true required: true
- type: textarea - type: textarea
@@ -43,11 +43,6 @@ body:
label: Webserver logs label: Webserver logs
description: If available, post any logs from the web server related to your issue. description: If available, post any logs from the web server related to your issue.
render: bash render: bash
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
- type: input - type: input
id: version id: version
attributes: attributes:
@@ -59,8 +54,8 @@ body:
id: host-os id: host-os
attributes: attributes:
label: Host OS label: Host OS
description: Host OS of the machine running paperless-ngx description: Host OS of the machine running paperless-ngx. Please add the architecture (uname -m) if applicable.
placeholder: e.g. Archlinux / Ubuntu 20.04 placeholder: e.g. Archlinux / Ubuntu 20.04 / Raspberry Pi `arm64`
validations: validations:
required: true required: true
- type: dropdown - type: dropdown
@@ -77,7 +72,7 @@ body:
id: browser id: browser
attributes: attributes:
label: Browser label: Browser
description: Which browser you are using, if relevant description: Which browser you are using, if relevant.
placeholder: e.g. Chrome, Safari placeholder: e.g. Chrome, Safari
- type: input - type: input
id: config-changes id: config-changes
@@ -88,4 +83,4 @@ body:
id: other id: other
attributes: attributes:
label: Other label: Other
description: Any other relevant details description: Any other relevant details.

View File

@@ -6,11 +6,14 @@ updates:
# Enable version updates for npm # Enable version updates for npm
- package-ecosystem: "npm" - package-ecosystem: "npm"
target-branch: "dev" target-branch: "dev"
# Look for `package.json` and `lock` files in the `root` directory # Look for `package.json` and `lock` files in the `/src-ui` directory
directory: "/src-ui" directory: "/src-ui"
# Check the npm registry for updates every week # Check the npm registry for updates every month
schedule: schedule:
interval: "monthly" interval: "monthly"
labels:
- "frontend"
- "dependencies"
# Add reviewers # Add reviewers
reviewers: reviewers:
- "paperless-ngx/frontend" - "paperless-ngx/frontend"
@@ -23,6 +26,23 @@ updates:
# Check for updates once a week # Check for updates once a week
schedule: schedule:
interval: "weekly" interval: "weekly"
labels:
- "backend"
- "dependencies"
# Add reviewers # Add reviewers
reviewers: reviewers:
- "paperless-ngx/backend" - "paperless-ngx/backend"
# Enable updates for Github Actions
- package-ecosystem: "github-actions"
target-branch: "dev"
directory: "/"
schedule:
# Check for updates to GitHub Actions every month
interval: "monthly"
labels:
- "ci-cd"
- "dependencies"
# Add reviewers
reviewers:
- "paperless-ngx/ci-cd"

View File

@@ -1,4 +1,7 @@
categories: categories:
- title: 'Breaking Changes'
labels:
- 'breaking-change'
- title: 'Features' - title: 'Features'
labels: labels:
- 'enhancement' - 'enhancement'
@@ -27,8 +30,7 @@ replacers: # Changes "Feature: Update checker" to "Update checker"
replace: '' replace: ''
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&#@' change-title-escapes: '\<*_&#@'
tag-prefix: "ngx-"
template: | template: |
## Changelog # Changelog
$CHANGES $CHANGES

27
.github/scripts/common.py vendored Normal file
View File

@@ -0,0 +1,27 @@
#!/usr/bin/env python3
def get_image_tag(
repo_name: str,
pkg_name: str,
pkg_version: str,
) -> str:
"""
Returns a string representing the normal image for a given package
"""
return f"ghcr.io/{repo_name}/builder/{pkg_name}:{pkg_version}"
def get_cache_image_tag(
repo_name: str,
pkg_name: str,
pkg_version: str,
branch_name: str,
) -> str:
"""
Returns a string representing the expected image cache tag for a given package
Registry type caching is utilized for the builder images, to allow fast
rebuilds, generally almost instant for the same version
"""
return f"ghcr.io/{repo_name}/builder/cache/{pkg_name}:{pkg_version}"

102
.github/scripts/get-build-json.py vendored Executable file
View File

@@ -0,0 +1,102 @@
#!/usr/bin/env python3
"""
This is a helper script for the mutli-stage Docker image builder.
It provides a single point of configuration for package version control.
The output JSON object is used by the CI workflow to determine what versions
to build and pull into the final Docker image.
Python package information is obtained from the Pipfile.lock. As this is
kept updated by dependabot, it usually will need no further configuration.
The sole exception currently is pikepdf, which has a dependency on qpdf,
and is configured here to use the latest version of qpdf built by the workflow.
Other package version information is configured directly below, generally by
setting the version and Git information, if any.
"""
import argparse
import json
import os
from pathlib import Path
from typing import Final
from common import get_cache_image_tag
from common import get_image_tag
def _main():
parser = argparse.ArgumentParser(
description="Generate a JSON object of information required to build the given package, based on the Pipfile.lock",
)
parser.add_argument(
"package",
help="The name of the package to generate JSON for",
)
PIPFILE_LOCK_PATH: Final[Path] = Path("Pipfile.lock")
BUILD_CONFIG_PATH: Final[Path] = Path(".build-config.json")
# Read the main config file
build_json: Final = json.loads(BUILD_CONFIG_PATH.read_text())
# Read Pipfile.lock file
pipfile_data: Final = json.loads(PIPFILE_LOCK_PATH.read_text())
args: Final = parser.parse_args()
# Read from environment variables set by GitHub Actions
repo_name: Final[str] = os.environ["GITHUB_REPOSITORY"]
branch_name: Final[str] = os.environ["GITHUB_REF_NAME"]
# Default output values
version = None
git_tag = None
extra_config = {}
if args.package in pipfile_data["default"]:
# Read the version from Pipfile.lock
pkg_data = pipfile_data["default"][args.package]
pkg_version = pkg_data["version"].split("==")[-1]
version = pkg_version
# Based on the package, generate the expected Git tag name
if args.package == "pikepdf":
git_tag = f"v{pkg_version}"
elif args.package == "psycopg2":
git_tag = pkg_version.replace(".", "_")
# Any extra/special values needed
if args.package == "pikepdf":
extra_config["qpdf_version"] = build_json["qpdf"]["version"]
elif args.package in build_json:
version = build_json[args.package]["version"]
if "git_tag" in build_json[args.package]:
git_tag = build_json[args.package]["git_tag"]
else:
raise NotImplementedError(args.package)
# The JSON object we'll output
output = {
"name": args.package,
"version": version,
"git_tag": git_tag,
"image_tag": get_image_tag(repo_name, args.package, version),
"cache_tag": get_cache_image_tag(
repo_name,
args.package,
version,
branch_name,
),
}
# Add anything special a package may need
output.update(extra_config)
# Output the JSON info to stdout
print(json.dumps(output))
if __name__ == "__main__":
_main()

7
.github/stale.yml vendored
View File

@@ -2,11 +2,8 @@
daysUntilStale: 30 daysUntilStale: 30
# Number of days of inactivity before a stale issue is closed # Number of days of inactivity before a stale issue is closed
daysUntilClose: 7 daysUntilClose: 7
# Issues with these labels will never be considered stale onlyLabels:
exemptLabels: - unconfirmed
- pinned
- security
- fixpending
# Label to use when marking an issue as stale # Label to use when marking an issue as stale
staleLabel: stale staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable # Comment to post when marking an issue as stale. Set to `false` to disable

View File

@@ -3,8 +3,10 @@ name: ci
on: on:
push: push:
tags: tags:
- ngx-* # https://semver.org/#spec-item-2
- beta-* - 'v[0-9]+.[0-9]+.[0-9]+'
# https://semver.org/#spec-item-9
- 'v[0-9]+.[0-9]+.[0-9]+-beta.rc[0-9]+'
branches-ignore: branches-ignore:
- 'translations**' - 'translations**'
pull_request: pull_request:
@@ -13,165 +15,199 @@ on:
jobs: jobs:
documentation: documentation:
name: "Build Documentation"
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
-
name: Install pipenv
run: pipx install pipenv
- -
name: Set up Python name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v3
with: with:
python-version: 3.9 python-version: 3.9
- cache: "pipenv"
name: Get pip cache dir cache-dependency-path: 'Pipfile.lock'
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
-
name: Persistent Github pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip3.8}
- -
name: Install dependencies name: Install dependencies
run: | run: |
pip install --upgrade pipenv pipenv sync --dev
pipenv install --system --dev --ignore-pipfile
- -
name: Make documentation name: Make documentation
run: | run: |
cd docs/ cd docs/
make html pipenv run make html
- -
name: Upload artifact name: Upload artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: documentation name: documentation
path: docs/_build/html/ path: docs/_build/html/
codestyle: ci-backend:
runs-on: ubuntu-20.04 uses: ./.github/workflows/reusable-ci-backend.yml
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
-
name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
-
name: Persistent Github pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip${{ matrix.python-version }}
-
name: Install dependencies
run: |
pip install --upgrade pipenv
pipenv install --system --dev --ignore-pipfile
-
name: Codestyle
run: |
cd src/
pycodestyle --max-line-length=88 --ignore=E121,E123,E126,E226,E24,E704,W503,W504,E203
codeformatting:
runs-on: ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Run black
uses: psf/black@stable
with:
options: "--check --diff"
version: "22.3.0"
tests: ci-frontend:
uses: ./.github/workflows/reusable-ci-frontend.yml
prepare-docker-build:
name: Prepare Docker Pipeline Data
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/feature-') || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/beta' || contains(github.ref, 'beta.rc') || startsWith(github.ref, 'refs/tags/v'))
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
strategy: needs:
matrix: - documentation
python-version: ['3.8', '3.9'] - ci-backend
fail-fast: false - ci-frontend
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- -
name: Set up Python name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v3
with: with:
python-version: "${{ matrix.python-version }}" python-version: "3.9"
- -
name: Get pip cache dir name: Setup qpdf image
id: pip-cache id: qpdf-setup
run: | run: |
echo "::set-output name=dir::$(pip cache dir)" build_json=$(python ${GITHUB_WORKSPACE}/.github/scripts/get-build-json.py qpdf)
echo ${build_json}
echo ::set-output name=qpdf-json::${build_json}
- -
name: Persistent Github pip cache name: Setup psycopg2 image
uses: actions/cache@v2 id: psycopg2-setup
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip${{ matrix.python-version }}
-
name: Install dependencies
run: | run: |
sudo apt-get update -qq build_json=$(python ${GITHUB_WORKSPACE}/.github/scripts/get-build-json.py psycopg2)
sudo apt-get install -qq --no-install-recommends unpaper tesseract-ocr imagemagick ghostscript optipng
pip install --upgrade pipenv echo ${build_json}
pipenv install --system --dev --ignore-pipfile
echo ::set-output name=psycopg2-json::${build_json}
- -
name: Tests name: Setup pikepdf image
id: pikepdf-setup
run: | run: |
cd src/ build_json=$(python ${GITHUB_WORKSPACE}/.github/scripts/get-build-json.py pikepdf)
pytest
echo ${build_json}
echo ::set-output name=pikepdf-json::${build_json}
- -
name: Publish coverage results name: Setup jbig2enc image
if: matrix.python-version == '3.9' id: jbig2enc-setup
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/coveralls-clients/coveralls-python/issues/251
run: | run: |
cd src/ build_json=$(python ${GITHUB_WORKSPACE}/.github/scripts/get-build-json.py jbig2enc)
coveralls --service=github
echo ${build_json}
echo ::set-output name=jbig2enc-json::${build_json}
outputs:
qpdf-json: ${{ steps.qpdf-setup.outputs.qpdf-json }}
pikepdf-json: ${{ steps.pikepdf-setup.outputs.pikepdf-json }}
psycopg2-json: ${{ steps.psycopg2-setup.outputs.psycopg2-json }}
jbig2enc-json: ${{ steps.jbig2enc-setup.outputs.jbig2enc-json}}
build-qpdf-debs:
name: qpdf
needs:
- prepare-docker-build
uses: ./.github/workflows/reusable-workflow-builder.yml
with:
dockerfile: ./docker-builders/Dockerfile.qpdf
build-json: ${{ needs.prepare-docker-build.outputs.qpdf-json }}
build-args: |
QPDF_VERSION=${{ fromJSON(needs.prepare-docker-build.outputs.qpdf-json).version }}
build-jbig2enc:
name: jbig2enc
needs:
- prepare-docker-build
uses: ./.github/workflows/reusable-workflow-builder.yml
with:
dockerfile: ./docker-builders/Dockerfile.jbig2enc
build-json: ${{ needs.prepare-docker-build.outputs.jbig2enc-json }}
build-args: |
JBIG2ENC_VERSION=${{ fromJSON(needs.prepare-docker-build.outputs.jbig2enc-json).version }}
build-psycopg2-wheel:
name: psycopg2
needs:
- prepare-docker-build
uses: ./.github/workflows/reusable-workflow-builder.yml
with:
dockerfile: ./docker-builders/Dockerfile.psycopg2
build-json: ${{ needs.prepare-docker-build.outputs.psycopg2-json }}
build-args: |
PSYCOPG2_GIT_TAG=${{ fromJSON(needs.prepare-docker-build.outputs.psycopg2-json).git_tag }}
PSYCOPG2_VERSION=${{ fromJSON(needs.prepare-docker-build.outputs.psycopg2-json).version }}
build-pikepdf-wheel:
name: pikepdf
needs:
- prepare-docker-build
- build-qpdf-debs
uses: ./.github/workflows/reusable-workflow-builder.yml
with:
dockerfile: ./docker-builders/Dockerfile.pikepdf
build-json: ${{ needs.prepare-docker-build.outputs.pikepdf-json }}
build-args: |
REPO=${{ github.repository }}
QPDF_VERSION=${{ fromJSON(needs.prepare-docker-build.outputs.qpdf-json).version }}
PIKEPDF_GIT_TAG=${{ fromJSON(needs.prepare-docker-build.outputs.pikepdf-json).git_tag }}
PIKEPDF_VERSION=${{ fromJSON(needs.prepare-docker-build.outputs.pikepdf-json).version }}
# build and push image to docker hub. # build and push image to docker hub.
build-docker-image: build-docker-image:
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/feature-') || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/beta' || startsWith(github.ref, 'refs/tags/ngx-') || startsWith(github.ref, 'refs/tags/beta-')) runs-on: ubuntu-20.04
runs-on: ubuntu-latest concurrency:
needs: [tests, codeformatting, codestyle] group: ${{ github.workflow }}-build-docker-image-${{ github.ref_name }}
cancel-in-progress: true
needs:
- prepare-docker-build
- build-psycopg2-wheel
- build-jbig2enc
- build-qpdf-debs
- build-pikepdf-wheel
steps: steps:
- -
name: Prepare name: Check pushing to Docker Hub
id: prepare id: docker-hub
# Only push to Dockerhub from the main repo
# Otherwise forks would require a Docker Hub account and secrets setup
run: | run: |
IMAGE_NAME=ghcr.io/${{ github.repository }} if [[ ${{ github.repository }} == "paperless-ngx/paperless-ngx" ]] ; then
if [[ $GITHUB_REF == refs/tags/ngx-* ]]; then echo ::set-output name=enable::"true"
TAGS=${IMAGE_NAME}:${GITHUB_REF#refs/tags/ngx-},${IMAGE_NAME}:latest
INSPECT_TAG=${IMAGE_NAME}:latest
elif [[ $GITHUB_REF == refs/tags/beta-* ]]; then
TAGS=${IMAGE_NAME}:beta
INSPECT_TAG=${TAGS}
elif [[ $GITHUB_REF == refs/heads/* ]]; then
TAGS=${IMAGE_NAME}:${GITHUB_REF#refs/heads/}
INSPECT_TAG=${TAGS}
else else
exit 1 echo ::set-output name=enable::"false"
fi fi
echo ::set-output name=tags::${TAGS} -
echo ::set-output name=inspect_tag::${INSPECT_TAG} name: Gather Docker metadata
id: docker-meta
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ github.repository }}
name=paperlessngx/paperless-ngx,enable=${{ steps.docker-hub.outputs.enable }}
tags: |
# Tag branches with branch name
type=ref,event=branch
# Process semver tags
# For a tag x.y.z or vX.Y.Z, output an x.y.z and x.y image tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1
@@ -185,6 +221,14 @@ jobs:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
-
name: Login to Docker Hub
uses: docker/login-action@v1
# Don't attempt to login is not pushing to Docker Hub
if: steps.docker-hub.outputs.enable == 'true'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
@@ -192,36 +236,49 @@ jobs:
context: . context: .
file: ./Dockerfile file: ./Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64 platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prepare.outputs.tags }} tags: ${{ steps.docker-meta.outputs.tags }}
cache-from: type=gha labels: ${{ steps.docker-meta.outputs.labels }}
cache-to: type=gha,mode=max build-args: |
JBIG2ENC_VERSION=${{ fromJSON(needs.prepare-docker-build.outputs.jbig2enc-json).version }}
QPDF_VERSION=${{ fromJSON(needs.prepare-docker-build.outputs.qpdf-json).version }}
PIKEPDF_VERSION=${{ fromJSON(needs.prepare-docker-build.outputs.pikepdf-json).version }}
PSYCOPG2_VERSION=${{ fromJSON(needs.prepare-docker-build.outputs.psycopg2-json).version }}
# Get cache layers from this branch, then dev, then main
# This allows new branches to get at least some cache benefits, generally from dev
cache-from: |
type=registry,ref=ghcr.io/${{ github.repository }}/builder/cache/app:${{ github.ref_name }}
type=registry,ref=ghcr.io/${{ github.repository }}/builder/cache/app:dev
type=registry,ref=ghcr.io/${{ github.repository }}/builder/cache/app:main
cache-to: |
type=registry,mode=max,ref=ghcr.io/${{ github.repository }}/builder/cache/app:${{ github.ref_name }}
- -
name: Inspect image name: Inspect image
run: | run: |
docker buildx imagetools inspect ${{ steps.prepare.outputs.inspect_tag }} docker buildx imagetools inspect ${{ fromJSON(steps.docker-meta.outputs.json).tags[0] }}
- -
name: Export frontend artifact from docker name: Export frontend artifact from docker
run: | run: |
docker run -d --name frontend-extract ${{ steps.prepare.outputs.inspect_tag }} docker create --name frontend-extract ${{ fromJSON(steps.docker-meta.outputs.json).tags[0] }}
docker cp frontend-extract:/usr/src/paperless/src/documents/static/frontend src/documents/static/frontend/ docker cp frontend-extract:/usr/src/paperless/src/documents/static/frontend src/documents/static/frontend/
- -
name: Upload frontend artifact name: Upload frontend artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: frontend-compiled name: frontend-compiled
path: src/documents/static/frontend/ path: src/documents/static/frontend/
build-release: build-release:
needs: [build-docker-image, documentation, tests, codeformatting, codestyle] needs:
- build-docker-image
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- -
name: Set up Python name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v3
with: with:
python-version: 3.9 python-version: 3.9
- -
@@ -233,13 +290,13 @@ jobs:
pip3 install -r requirements.txt pip3 install -r requirements.txt
- -
name: Download frontend artifact name: Download frontend artifact
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: frontend-compiled name: frontend-compiled
path: src/documents/static/frontend/ path: src/documents/static/frontend/
- -
name: Download documentation artifact name: Download documentation artifact
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: documentation name: documentation
path: docs/_build/html/ path: docs/_build/html/
@@ -274,19 +331,20 @@ jobs:
tar -cJf paperless-ngx.tar.xz paperless-ngx/ tar -cJf paperless-ngx.tar.xz paperless-ngx/
- -
name: Upload release artifact name: Upload release artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: release name: release
path: dist/paperless-ngx.tar.xz path: dist/paperless-ngx.tar.xz
publish-release: publish-release:
runs-on: ubuntu-latest runs-on: ubuntu-20.04
needs: build-release needs:
if: contains(github.ref, 'refs/tags/ngx-') || contains(github.ref, 'refs/tags/beta-') - build-release
if: github.ref_type == 'tag' && (startsWith(github.ref_name, 'v') || contains(github.ref_name, '-beta.rc'))
steps: steps:
- -
name: Download release artifact name: Download release artifact
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: release name: release
path: ./ path: ./
@@ -294,27 +352,24 @@ jobs:
name: Get version name: Get version
id: get_version id: get_version
run: | run: |
if [[ $GITHUB_REF == refs/tags/ngx-* ]]; then echo ::set-output name=version::${{ github.ref_name }}
echo ::set-output name=version::${GITHUB_REF#refs/tags/ngx-} if [[ ${{ contains(github.ref_name, '-beta.rc') }} == 'true' ]]; then
echo ::set-output name=prerelease::false
echo ::set-output name=body::"For a complete list of changes, see the changelog at https://paperless-ngx.readthedocs.io/en/latest/changelog.html"
elif [[ $GITHUB_REF == refs/tags/beta-* ]]; then
echo ::set-output name=version::${GITHUB_REF#refs/tags/beta-}
echo ::set-output name=prerelease::true echo ::set-output name=prerelease::true
echo ::set-output name=body::"For a complete list of changes, see the changelog at https://github.com/paperless-ngx/paperless-ngx/blob/beta/docs/changelog.rst" else
echo ::set-output name=prerelease::false
fi fi
- -
name: Create release name: Create Release and Changelog
id: create_release id: create-release
uses: actions/create-release@v1 uses: release-drafter/release-drafter@v5
with:
name: Paperless-ngx ${{ steps.get_version.outputs.version }}
tag: ${{ steps.get_version.outputs.version }}
version: ${{ steps.get_version.outputs.version }}
prerelease: ${{ steps.get_version.outputs.prerelease }}
publish: true # ensures release is not marked as draft
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ngx-${{ steps.get_version.outputs.version }}
release_name: Paperless-ngx ${{ steps.get_version.outputs.version }}
draft: false
prerelease: ${{ steps.get_version.outputs.prerelease }}
body: ${{ steps.get_version.outputs.body }}
- -
name: Upload release archive name: Upload release archive
id: upload-release-asset id: upload-release-asset
@@ -322,7 +377,7 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ./paperless-ngx.tar.xz asset_path: ./paperless-ngx.tar.xz
asset_name: paperless-ngx-${{ steps.get_version.outputs.version }}.tar.xz asset_name: paperless-ngx-${{ steps.get_version.outputs.version }}.tar.xz
asset_content_type: application/x-xz asset_content_type: application/x-xz

View File

@@ -42,7 +42,7 @@ jobs:
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v1 uses: github/codeql-action/init@v2
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file. # If you wish to specify custom queries, you can do so here or in a config file.
@@ -51,4 +51,4 @@ jobs:
# queries: ./path/to/local/query, your-org/your-repo/queries@main # queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1 uses: github/codeql-action/analyze@v2

View File

@@ -0,0 +1,108 @@
name: Backend CI Jobs
on:
workflow_call:
jobs:
code-checks-backend:
name: "Code Style Checks"
runs-on: ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Install checkers
run: |
pipx install reorder-python-imports
pipx install yesqa
pipx install add-trailing-comma
pipx install flake8
-
name: Run reorder-python-imports
run: |
find src/ -type f -name '*.py' ! -path "*/migrations/*" | xargs reorder-python-imports
-
name: Run yesqa
run: |
find src/ -type f -name '*.py' ! -path "*/migrations/*" | xargs yesqa
-
name: Run add-trailing-comma
run: |
find src/ -type f -name '*.py' ! -path "*/migrations/*" | xargs add-trailing-comma
# black is placed after add-trailing-comma because it may format differently
# if a trailing comma is added
-
name: Run black
uses: psf/black@stable
with:
options: "--check --diff"
version: "22.3.0"
-
name: Run flake8 checks
run: |
cd src/
flake8 --max-line-length=88 --ignore=E203,W503
tests-backend:
name: "Tests (${{ matrix.python-version }})"
runs-on: ubuntu-20.04
needs:
- code-checks-backend
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
fail-fast: false
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
-
name: Install pipenv
run: pipx install pipenv
-
name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "${{ matrix.python-version }}"
cache: "pipenv"
cache-dependency-path: 'Pipfile.lock'
-
name: Install system dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq --no-install-recommends unpaper tesseract-ocr imagemagick ghostscript optipng libzbar0 poppler-utils
-
name: Install Python dependencies
run: |
pipenv sync --dev
-
name: Tests
run: |
cd src/
pipenv run pytest
-
name: Get changed files
id: changed-files-specific
uses: tj-actions/changed-files@v19
with:
files: |
src/**
-
name: List all changed files
run: |
for file in ${{ steps.changed-files-specific.outputs.all_changed_files }}; do
echo "${file} was changed"
done
-
name: Publish coverage results
if: matrix.python-version == '3.9' && steps.changed-files-specific.outputs.any_changed == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/coveralls-clients/coveralls-python/issues/251
run: |
cd src/
pipenv run coveralls --service=github

View File

@@ -0,0 +1,42 @@
name: Frontend CI Jobs
on:
workflow_call:
jobs:
code-checks-frontend:
name: "Code Style Checks"
runs-on: ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
-
name: Install prettier
run: |
npm install prettier
-
name: Run prettier
run:
npx prettier --check --ignore-path Pipfile.lock **/*.js **/*.ts *.md **/*.md
tests-frontend:
name: "Tests"
runs-on: ubuntu-20.04
needs:
- code-checks-frontend
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: cd src-ui && npm ci
- run: cd src-ui && npm run test
- run: cd src-ui && npm run e2e:ci

View File

@@ -0,0 +1,53 @@
name: Reusable Image Builder
on:
workflow_call:
inputs:
dockerfile:
required: true
type: string
build-json:
required: true
type: string
build-args:
required: false
default: ""
type: string
concurrency:
group: ${{ github.workflow }}-${{ fromJSON(inputs.build-json).name }}-${{ fromJSON(inputs.build-json).version }}
cancel-in-progress: false
jobs:
build-image:
name: Build ${{ fromJSON(inputs.build-json).name }} @ ${{ fromJSON(inputs.build-json).version }}
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Login to Github Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Build ${{ fromJSON(inputs.build-json).name }}
uses: docker/build-push-action@v2
with:
context: .
file: ${{ inputs.dockerfile }}
tags: ${{ fromJSON(inputs.build-json).image_tag }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
build-args: ${{ inputs.build-args }}
push: true
cache-from: type=registry,ref=${{ fromJSON(inputs.build-json).cache_tag }}
cache-to: type=registry,mode=max,ref=${{ fromJSON(inputs.build-json).cache_tag }}

3
.gitignore vendored
View File

@@ -61,6 +61,9 @@ target/
# PyCharm # PyCharm
.idea .idea
# VS Code
.vscode
# Other stuff that doesn't belong # Other stuff that doesn't belong
.virtualenv .virtualenv
virtualenv virtualenv

View File

@@ -5,7 +5,7 @@
repos: repos:
# General hooks # General hooks
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0 rev: v4.2.0
hooks: hooks:
- id: check-docstring-first - id: check-docstring-first
- id: check-json - id: check-json
@@ -27,7 +27,7 @@ repos:
- id: check-case-conflict - id: check-case-conflict
- id: detect-private-key - id: detect-private-key
- repo: https://github.com/pre-commit/mirrors-prettier - repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.6.1" rev: "v2.6.2"
hooks: hooks:
- id: prettier - id: prettier
types_or: types_or:
@@ -37,7 +37,7 @@ repos:
exclude: "(^Pipfile\\.lock$)" exclude: "(^Pipfile\\.lock$)"
# Python hooks # Python hooks
- repo: https://github.com/asottile/reorder_python_imports - repo: https://github.com/asottile/reorder_python_imports
rev: v3.0.1 rev: v3.1.0
hooks: hooks:
- id: reorder-python-imports - id: reorder-python-imports
exclude: "(migrations)" exclude: "(migrations)"
@@ -47,7 +47,7 @@ repos:
- id: yesqa - id: yesqa
exclude: "(migrations)" exclude: "(migrations)"
- repo: https://github.com/asottile/add-trailing-comma - repo: https://github.com/asottile/add-trailing-comma
rev: "v2.2.1" rev: "v2.2.3"
hooks: hooks:
- id: add-trailing-comma - id: add-trailing-comma
exclude: "(migrations)" exclude: "(migrations)"
@@ -62,11 +62,25 @@ repos:
rev: 22.3.0 rev: 22.3.0
hooks: hooks:
- id: black - id: black
# Dockerfile hooks - repo: https://github.com/asottile/pyupgrade
- repo: https://github.com/pryorda/dockerfilelint-precommit-hooks rev: v2.32.1
rev: "v0.1.0"
hooks: hooks:
- id: dockerfilelint - id: pyupgrade
exclude: "(migrations)"
args:
- "--py38-plus"
# Dockerfile hooks
- repo: https://github.com/AleksaC/hadolint-py
rev: v2.10.0
hooks:
- id: hadolint
args:
- --ignore
- DL3008 # https://github.com/hadolint/hadolint/wiki/DL3008 (should probably do this at some point)
- --ignore
- DL3013 # https://github.com/hadolint/hadolint/wiki/DL3013 (should probably do this too at some point)
- --ignore
- DL3003 # https://github.com/hadolint/hadolint/wiki/DL3003 (seems excessive to use WORKDIR so much)
# Shell script hooks # Shell script hooks
- repo: https://github.com/lovesegfault/beautysh - repo: https://github.com/lovesegfault/beautysh
rev: v6.2.1 rev: v6.2.1

4
.prettierrc Normal file
View File

@@ -0,0 +1,4 @@
# https://prettier.io/docs/en/options.html#semicolons
semi: false
# https://prettier.io/docs/en/options.html#quotes
singleQuote: true

10
CODEOWNERS Normal file
View File

@@ -0,0 +1,10 @@
/.github/workflows/ @paperless-ngx/ci-cd
/docker/ @paperless-ngx/ci-cd
/scripts/ @paperless-ngx/ci-cd
/src-ui/ @paperless-ngx/frontend
/src/ @paperless-ngx/backend
Pipfile* @paperless-ngx/backend
*.py @paperless-ngx/backend
requirements.txt @paperless-ngx/backend

View File

@@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our Examples of behavior that contributes to a positive environment for our
community include: community include:
* Demonstrating empathy and kindness toward other people - Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences - Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback - Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, - Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience and learning from the experience
* Focusing on what is best not just for us as individuals, but for the - Focusing on what is best not just for us as individuals, but for the
overall community overall community
Examples of unacceptable behavior include: Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or - The use of sexualized language or imagery, and sexual attention or
advances of any kind advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks - Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment - Public or private harassment
* Publishing others' private information, such as a physical or email - Publishing others' private information, such as a physical or email
address, without their explicit permission address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a - Other conduct which could reasonably be considered inappropriate in a
professional setting professional setting
## Enforcement Responsibilities ## Enforcement Responsibilities
@@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban ### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community **Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals. individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within **Consequence**: A permanent ban from any sort of public interaction within

View File

@@ -4,10 +4,10 @@ If you feel like contributing to the project, please do! Bug fixes and improveme
If you want to implement something big: If you want to implement something big:
* Please start a discussion about that in the issues! Maybe something similar is already in development and we can make it happen together. - Please start a discussion about that in the issues! Maybe something similar is already in development and we can make it happen together.
* When making additions to the project, consider if the majority of users will benefit from your change. If not, you're probably better of forking the project. - When making additions to the project, consider if the majority of users will benefit from your change. If not, you're probably better of forking the project.
* Also consider if your change will get in the way of other users. A good change is a change that enhances the experience of some users who want that change and does not affect users who do not care about the change. - Also consider if your change will get in the way of other users. A good change is a change that enhances the experience of some users who want that change and does not affect users who do not care about the change.
* Please see the [paperless-ngx merge process](#merging-prs) below. - Please see the [paperless-ngx merge process](#merging-prs) below.
## Python ## Python
@@ -27,6 +27,8 @@ Please format and test your code! I know it's a hassle, but it makes sure that y
To test your code, execute `pytest` in the src/ directory. This also generates a html coverage report, which you can use to see if you missed anything important during testing. To test your code, execute `pytest` in the src/ directory. This also generates a html coverage report, which you can use to see if you missed anything important during testing.
Before you can run `pytest`, ensure to [properly set up your local environment](https://paperless-ngx.readthedocs.io/en/latest/extending.html#initial-setup-and-first-start).
## More info: ## More info:
... is available in the documentation. https://paperless-ngx.readthedocs.io/en/latest/extending.html ... is available in the documentation. https://paperless-ngx.readthedocs.io/en/latest/extending.html
@@ -41,9 +43,9 @@ PRs deemed `non-trivial` will go through a stricter review process before being
Examples of `non-trivial` PRs might include: Examples of `non-trivial` PRs might include:
* Additional features - Additional features
* Large changes to many distinct files - Large changes to many distinct files
* Breaking or depreciation of existing features - Breaking or depreciation of existing features
Our community review process for `non-trivial` PRs is the following: Our community review process for `non-trivial` PRs is the following:
@@ -75,18 +77,18 @@ If a language has already been added, and you would like to contribute new trans
If you would like the project to be translated to another language, first head over to https://crwd.in/paperless-ngx to check if that language has already been enabled for translation. If you would like the project to be translated to another language, first head over to https://crwd.in/paperless-ngx to check if that language has already been enabled for translation.
If not, please request the language to be added by creating an issue on GitHub. The issue should contain: If not, please request the language to be added by creating an issue on GitHub. The issue should contain:
* English name of the language (the localized name can be added on Crowdin). - English name of the language (the localized name can be added on Crowdin).
* ISO language code. A list of those can be found here: https://support.crowdin.com/enterprise/language-codes/ - ISO language code. A list of those can be found here: https://support.crowdin.com/enterprise/language-codes/
* Date format commonly used for the language, e.g. dd/mm/yyyy, mm/dd/yyyy, etc. - Date format commonly used for the language, e.g. dd/mm/yyyy, mm/dd/yyyy, etc.
After the language has been added and some translations have been made on Crowdin, the language needs to be enabled in the code. After the language has been added and some translations have been made on Crowdin, the language needs to be enabled in the code.
Note that there is no need to manually add a .po of .xlf file as those will be automatically generated and imported from Crowdin. Note that there is no need to manually add a .po of .xlf file as those will be automatically generated and imported from Crowdin.
The following files need to be changed: The following files need to be changed:
* src-ui/angular.json (under the _projects/paperless-ui/i18n/locales_ JSON key) - src-ui/angular.json (under the _projects/paperless-ui/i18n/locales_ JSON key)
* src/paperless/settings.py (in the _LANGUAGES_ array) - src/paperless/settings.py (in the _LANGUAGES_ array)
* src-ui/src/app/services/settings.service.ts (inside the _getLanguageOptions_ method) - src-ui/src/app/services/settings.service.ts (inside the _getLanguageOptions_ method)
* src-ui/src/app/app.module.ts (import locale from _angular/common/locales_ and call _registerLocaleData_) - src-ui/src/app/app.module.ts (import locale from _angular/common/locales_ and call _registerLocaleData_)
Please add the language in the correct order, alphabetically by locale. Please add the language in the correct order, alphabetically by locale.
Note that _en-us_ needs to stay on top of the list, as it is the default project language Note that _en-us_ needs to stay on top of the list, as it is the default project language
@@ -102,26 +104,26 @@ Paperless-ngx is a community project. We do our best to delegate permission and
As of writing, there are 21 members in paperless-ngx. 4 of these people have complete administrative privileges to the repo: As of writing, there are 21 members in paperless-ngx. 4 of these people have complete administrative privileges to the repo:
* [@shamoon](https://github.com/shamoon) - [@shamoon](https://github.com/shamoon)
* [@bauerj](https://github.com/bauerj) - [@bauerj](https://github.com/bauerj)
* [@qcasey](https://github.com/qcasey) - [@qcasey](https://github.com/qcasey)
* [@FrankStrieter](https://github.com/FrankStrieter) - [@FrankStrieter](https://github.com/FrankStrieter)
There are 5 teams collaborating on specific tasks within paperless-ngx: There are 5 teams collaborating on specific tasks within paperless-ngx:
* @paperless-ngx/backend (Python / django) - @paperless-ngx/backend (Python / django)
* @paperless-ngx/frontend (JavaScript / Typescript) - @paperless-ngx/frontend (JavaScript / Typescript)
* @paperless-ngx/ci-cd (GitHub Actions / Deployment) - @paperless-ngx/ci-cd (GitHub Actions / Deployment)
* @paperless-ngx/issues (Issue triage) - @paperless-ngx/issues (Issue triage)
* @paperless-ngx/test (General testing for larger PRs) - @paperless-ngx/test (General testing for larger PRs)
## Permissions ## Permissions
All team members are notified when mentioned or assigned to a relevant issue or pull request. Additionally, each team has slightly different access to paperless-ngx: All team members are notified when mentioned or assigned to a relevant issue or pull request. Additionally, each team has slightly different access to paperless-ngx:
* The **test** team has no special permissions. - The **test** team has no special permissions.
* The **issues** team has `triage` access. This means they can organize issues and pull requests. - The **issues** team has `triage` access. This means they can organize issues and pull requests.
* The **backend**, **frontend**, and **ci-cd** teams have `write` access. This means they can approve PRs and push code, containers, releases, and more. - The **backend**, **frontend**, and **ci-cd** teams have `write` access. This means they can approve PRs and push code, containers, releases, and more.
## Joining ## Joining

View File

@@ -1,134 +1,216 @@
FROM node:16 AS compile-frontend # syntax=docker/dockerfile:1.4
COPY . /src # Pull the installer images from the library
# These are all built previously
# They provide either a .deb or .whl
ARG JBIG2ENC_VERSION
ARG QPDF_VERSION
ARG PIKEPDF_VERSION
ARG PSYCOPG2_VERSION
FROM ghcr.io/paperless-ngx/paperless-ngx/builder/jbig2enc:${JBIG2ENC_VERSION} as jbig2enc-builder
FROM ghcr.io/paperless-ngx/paperless-ngx/builder/qpdf:${QPDF_VERSION} as qpdf-builder
FROM ghcr.io/paperless-ngx/paperless-ngx/builder/pikepdf:${PIKEPDF_VERSION} as pikepdf-builder
FROM ghcr.io/paperless-ngx/paperless-ngx/builder/psycopg2:${PSYCOPG2_VERSION} as psycopg2-builder
FROM --platform=$BUILDPLATFORM node:16-bullseye-slim AS compile-frontend
# This stage compiles the frontend
# This stage runs once for the native platform, as the outputs are not
# dependent on target arch
# Inputs: None
COPY ./src-ui /src/src-ui
WORKDIR /src/src-ui WORKDIR /src/src-ui
RUN npm update npm -g && npm install RUN set -eux \
RUN ./node_modules/.bin/ng build --configuration production && npm update npm -g \
&& npm ci --no-optional
RUN set -eux \
&& ./node_modules/.bin/ng build --configuration production
FROM python:3.9-slim-bullseye as main-app
FROM ubuntu:20.04 AS jbig2enc
WORKDIR /usr/src/jbig2enc
RUN apt-get update && apt-get install -y --no-install-recommends build-essential automake libtool libleptonica-dev zlib1g-dev git ca-certificates
RUN git clone https://github.com/agl/jbig2enc .
RUN ./autogen.sh
RUN ./configure && make
FROM python:3.9-slim-bullseye
# Binary dependencies
RUN apt-get update \
&& apt-get -y --no-install-recommends install \
# Basic dependencies
curl \
gnupg \
imagemagick \
gettext \
tzdata \
gosu \
# fonts for text file thumbnail generation
fonts-liberation \
# for Numpy
libatlas-base-dev \
libxslt1-dev \
# thumbnail size reduction
optipng \
libxml2 \
pngquant \
unpaper \
zlib1g \
ghostscript \
icc-profiles-free \
# Mime type detection
file \
libmagic-dev \
media-types \
# OCRmyPDF dependencies
liblept5 \
tesseract-ocr \
tesseract-ocr-eng \
tesseract-ocr-deu \
tesseract-ocr-fra \
tesseract-ocr-ita \
tesseract-ocr-spa \
&& rm -rf /var/lib/apt/lists/*
# copy jbig2enc
COPY --from=jbig2enc /usr/src/jbig2enc/src/.libs/libjbig2enc* /usr/local/lib/
COPY --from=jbig2enc /usr/src/jbig2enc/src/jbig2 /usr/local/bin/
COPY --from=jbig2enc /usr/src/jbig2enc/src/*.h /usr/local/include/
WORKDIR /usr/src/paperless/src/
COPY requirements.txt ../
# Python dependencies
RUN apt-get update \
&& apt-get -y --no-install-recommends install \
build-essential \
libpq-dev \
git \
zlib1g-dev \
libjpeg62-turbo-dev \
&& if [ "$(uname -m)" = "armv7l" ] || [ "$(uname -m)" = "aarch64" ]; \
then echo "Building qpdf" \
&& mkdir -p /usr/src/qpdf \
&& cd /usr/src/qpdf \
&& git clone https://github.com/qpdf/qpdf.git . \
&& git checkout --quiet release-qpdf-10.6.2 \
&& ./configure \
&& make \
&& make install \
&& cd /usr/src/paperless/src/ \
&& rm -rf /usr/src/qpdf; \
else \
echo "Skipping qpdf build because pikepdf binary wheels are available."; \
fi \
&& python3 -m pip install --upgrade pip wheel \
&& python3 -m pip install --default-timeout=1000 --upgrade --no-cache-dir supervisor \
&& python3 -m pip install --default-timeout=1000 --no-cache-dir -r ../requirements.txt \
&& apt-get -y purge build-essential git zlib1g-dev libjpeg62-turbo-dev \
&& apt-get -y autoremove --purge \
&& rm -rf /var/lib/apt/lists/*
# setup docker-specific things
COPY docker/ ./docker/
RUN cd docker \
&& cp imagemagick-policy.xml /etc/ImageMagick-6/policy.xml \
&& mkdir /var/log/supervisord /var/run/supervisord \
&& cp supervisord.conf /etc/supervisord.conf \
&& cp docker-entrypoint.sh /sbin/docker-entrypoint.sh \
&& cp docker-prepare.sh /sbin/docker-prepare.sh \
&& chmod 755 /sbin/docker-entrypoint.sh \
&& chmod +x install_management_commands.sh \
&& ./install_management_commands.sh \
&& cd .. \
&& rm docker -rf
COPY gunicorn.conf.py ../
# copy app
COPY --from=compile-frontend /src/src/ ./
# add users, setup scripts
RUN addgroup --gid 1000 paperless \
&& useradd --uid 1000 --gid paperless --home-dir /usr/src/paperless paperless \
&& chown -R paperless:paperless ../ \
&& gosu paperless python3 manage.py collectstatic --clear --no-input \
&& gosu paperless python3 manage.py compilemessages
VOLUME ["/usr/src/paperless/data", "/usr/src/paperless/media", "/usr/src/paperless/consume", "/usr/src/paperless/export"]
ENTRYPOINT ["/sbin/docker-entrypoint.sh"]
EXPOSE 8000
CMD ["/usr/local/bin/supervisord", "-c", "/etc/supervisord.conf"]
LABEL org.opencontainers.image.authors="paperless-ngx team <hello@paperless-ngx.com>" LABEL org.opencontainers.image.authors="paperless-ngx team <hello@paperless-ngx.com>"
LABEL org.opencontainers.image.documentation="https://paperless-ngx.readthedocs.io/en/latest/" LABEL org.opencontainers.image.documentation="https://paperless-ngx.readthedocs.io/en/latest/"
LABEL org.opencontainers.image.source="https://github.com/paperless-ngx/paperless-ngx" LABEL org.opencontainers.image.source="https://github.com/paperless-ngx/paperless-ngx"
LABEL org.opencontainers.image.url="https://github.com/paperless-ngx/paperless-ngx" LABEL org.opencontainers.image.url="https://github.com/paperless-ngx/paperless-ngx"
LABEL org.opencontainers.image.licenses="GPL-3.0-only" LABEL org.opencontainers.image.licenses="GPL-3.0-only"
ARG DEBIAN_FRONTEND=noninteractive
#
# Begin installation and configuration
# Order the steps below from least often changed to most
#
# copy jbig2enc
# Basically will never change again
COPY --from=jbig2enc-builder /usr/src/jbig2enc/src/.libs/libjbig2enc* /usr/local/lib/
COPY --from=jbig2enc-builder /usr/src/jbig2enc/src/jbig2 /usr/local/bin/
COPY --from=jbig2enc-builder /usr/src/jbig2enc/src/*.h /usr/local/include/
# Packages need for running
ARG RUNTIME_PACKAGES="\
curl \
file \
# fonts for text file thumbnail generation
fonts-liberation \
gettext \
ghostscript \
gnupg \
gosu \
icc-profiles-free \
imagemagick \
media-types \
liblept5 \
libpq5 \
libxml2 \
liblcms2-2 \
libtiff5 \
libxslt1.1 \
libfreetype6 \
libwebp6 \
libopenjp2-7 \
libimagequant0 \
libraqm0 \
libgnutls30 \
libjpeg62-turbo \
optipng \
python3 \
python3-pip \
python3-setuptools \
postgresql-client \
# For Numpy
libatlas3-base \
# thumbnail size reduction
pngquant \
# OCRmyPDF dependencies
tesseract-ocr \
tesseract-ocr-eng \
tesseract-ocr-deu \
tesseract-ocr-fra \
tesseract-ocr-ita \
tesseract-ocr-spa \
tzdata \
unpaper \
# Mime type detection
zlib1g \
# Barcode splitter
libzbar0 \
poppler-utils"
# Install basic runtime packages.
# These change very infrequently
RUN set -eux \
echo "Installing system packages" \
&& apt-get update \
&& apt-get install --yes --quiet --no-install-recommends ${RUNTIME_PACKAGES} \
&& rm -rf /var/lib/apt/lists/* \
&& echo "Installing supervisor" \
&& python3 -m pip install --default-timeout=1000 --upgrade --no-cache-dir supervisor==4.2.4
# Copy gunicorn config
# Changes very infrequently
WORKDIR /usr/src/paperless/
COPY gunicorn.conf.py .
# setup docker-specific things
# Use mounts to avoid copying installer files into the image
# These change sometimes, but rarely
WORKDIR /usr/src/paperless/src/docker/
RUN --mount=type=bind,readwrite,source=docker,target=./ \
set -eux \
&& echo "Configuring ImageMagick" \
&& cp imagemagick-policy.xml /etc/ImageMagick-6/policy.xml \
&& echo "Configuring supervisord" \
&& mkdir /var/log/supervisord /var/run/supervisord \
&& cp supervisord.conf /etc/supervisord.conf \
&& echo "Setting up Docker scripts" \
&& cp docker-entrypoint.sh /sbin/docker-entrypoint.sh \
&& chmod 755 /sbin/docker-entrypoint.sh \
&& cp docker-prepare.sh /sbin/docker-prepare.sh \
&& chmod 755 /sbin/docker-prepare.sh \
&& cp wait-for-redis.py /sbin/wait-for-redis.py \
&& chmod 755 /sbin/wait-for-redis.py \
&& echo "Installing managment commands" \
&& chmod +x install_management_commands.sh \
&& ./install_management_commands.sh
# Install the built packages from the installer library images
# Use mounts to avoid copying installer files into the image
# These change sometimes
RUN --mount=type=bind,from=qpdf-builder,target=/qpdf \
--mount=type=bind,from=psycopg2-builder,target=/psycopg2 \
--mount=type=bind,from=pikepdf-builder,target=/pikepdf \
set -eux \
&& echo "Installing qpdf" \
&& apt-get install --yes --no-install-recommends /qpdf/usr/src/qpdf/libqpdf28_*.deb \
&& apt-get install --yes --no-install-recommends /qpdf/usr/src/qpdf/qpdf_*.deb \
&& echo "Installing pikepdf and dependencies" \
&& python3 -m pip install --no-cache-dir /pikepdf/usr/src/pikepdf/wheels/packaging*.whl \
&& python3 -m pip install --no-cache-dir /pikepdf/usr/src/pikepdf/wheels/lxml*.whl \
&& python3 -m pip install --no-cache-dir /pikepdf/usr/src/pikepdf/wheels/Pillow*.whl \
&& python3 -m pip install --no-cache-dir /pikepdf/usr/src/pikepdf/wheels/pyparsing*.whl \
&& python3 -m pip install --no-cache-dir /pikepdf/usr/src/pikepdf/wheels/pikepdf*.whl \
&& python -m pip list \
&& echo "Installing psycopg2" \
&& python3 -m pip install --no-cache-dir /psycopg2/usr/src/psycopg2/wheels/psycopg2*.whl \
&& python -m pip list
# Python dependencies
# Change pretty frequently
COPY requirements.txt ../
# Packages needed only for building a few quick Python
# dependencies
ARG BUILD_PACKAGES="\
build-essential \
python3-dev"
RUN set -eux \
&& echo "Installing build system packages" \
&& apt-get update \
&& apt-get install --yes --quiet --no-install-recommends ${BUILD_PACKAGES} \
&& python3 -m pip install --no-cache-dir --upgrade wheel \
&& echo "Installing Python requirements" \
&& python3 -m pip install --default-timeout=1000 --no-cache-dir -r ../requirements.txt \
&& echo "Cleaning up image" \
&& apt-get -y purge ${BUILD_PACKAGES} \
&& apt-get -y autoremove --purge \
&& apt-get clean --yes \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* \
&& rm -rf /var/tmp/* \
&& rm -rf /var/cache/apt/archives/* \
&& truncate -s 0 /var/log/*log
WORKDIR /usr/src/paperless/src/
# copy backend
COPY ./src ./
# copy frontend
COPY --from=compile-frontend /src/src/documents/static/frontend/ ./documents/static/frontend/
# add users, setup scripts
RUN set -eux \
&& addgroup --gid 1000 paperless \
&& useradd --uid 1000 --gid paperless --home-dir /usr/src/paperless paperless \
&& chown -R paperless:paperless ../ \
&& gosu paperless python3 manage.py collectstatic --clear --no-input \
&& gosu paperless python3 manage.py compilemessages
VOLUME ["/usr/src/paperless/data", \
"/usr/src/paperless/media", \
"/usr/src/paperless/consume", \
"/usr/src/paperless/export"]
ENTRYPOINT ["/sbin/docker-entrypoint.sh"]
EXPOSE 8000
CMD ["/usr/local/bin/supervisord", "-c", "/etc/supervisord.conf"]

37
Pipfile
View File

@@ -9,35 +9,36 @@ verify_ssl = true
name = "piwheels" name = "piwheels"
[packages] [packages]
dateparser = "~=1.1.0" dateparser = "~=1.1"
django = "~=3.2" django = "~=4.0"
django-cors-headers = "*" django-cors-headers = "*"
django-extensions = "*" django-extensions = "*"
django-filter = "~=21.1" django-filter = "~=21.1"
django-q = "~=1.3.4" django-q = "~=1.3"
djangorestframework = "~=3.13.1" djangorestframework = "~=3.13"
filelock = "*" filelock = "*"
fuzzywuzzy = {extras = ["speedup"], version = "*"} fuzzywuzzy = {extras = ["speedup"], version = "*"}
gunicorn = "*" gunicorn = "*"
imap-tools = "*" imap-tools = "~=0.54.0"
langdetect = "*" langdetect = "*"
numpy = "~=1.22.0"
pathvalidate = "*" pathvalidate = "*"
pillow = "~=9.0" pillow = "~=9.1"
pikepdf = "~=5.0" # Any version update to pikepdf requires a base image update
pikepdf = "~=5.1"
python-gnupg = "*" python-gnupg = "*"
python-dotenv = "*" python-dotenv = "*"
python-dateutil = "*" python-dateutil = "*"
python-magic = "*" python-magic = "*"
psycopg2-binary = "*" # Any version update to psycopg2 requires a base image update
psycopg2 = "*"
redis = "*" redis = "*"
# Pinned because aarch64 wheels and updates cause warnings when loading the classifier model. # Pinned because aarch64 wheels and updates cause warnings when loading the classifier model.
scikit-learn="==0.24.0" scikit-learn="==1.0.2"
whitenoise = "~=6.0.0" whitenoise = "~=6.0.0"
watchdog = "~=2.1.0" watchdog = "~=2.1.0"
whoosh="~=2.7.4" whoosh="~=2.7.4"
inotifyrecursive = "~=0.3.4" inotifyrecursive = "~=0.3"
ocrmypdf = "~=13.4.0" ocrmypdf = "~=13.4"
tqdm = "*" tqdm = "*"
tika = "*" tika = "*"
# TODO: This will sadly also install daphne+dependencies, # TODO: This will sadly also install daphne+dependencies,
@@ -46,11 +47,12 @@ channels = "~=3.0"
channels-redis = "*" channels-redis = "*"
uvicorn = {extras = ["standard"], version = "*"} uvicorn = {extras = ["standard"], version = "*"}
concurrent-log-handler = "*" concurrent-log-handler = "*"
# uvloop 0.15+ incompatible with python 3.6
uvloop = "~=0.16"
cryptography = "~=36.0.1"
"pdfminer.six" = "*" "pdfminer.six" = "*"
"backports.zoneinfo" = "*" "backports.zoneinfo" = {version = "*", markers = "python_version < '3.9'"}
"importlib-resources" = {version = "*", markers = "python_version < '3.9'"}
zipp = {version = "*", markers = "python_version < '3.9'"}
pyzbar = "*"
pdf2image = "*"
[dev-packages] [dev-packages]
coveralls = "*" coveralls = "*"
@@ -62,7 +64,8 @@ pytest-django = "*"
pytest-env = "*" pytest-env = "*"
pytest-sugar = "*" pytest-sugar = "*"
pytest-xdist = "*" pytest-xdist = "*"
sphinx = "~=3.4.2" sphinx = "~=4.5.0"
sphinx_rtd_theme = "*" sphinx_rtd_theme = "*"
tox = "*" tox = "*"
black = "*" black = "*"
pre-commit = "*"

1323
Pipfile.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -10,23 +10,23 @@
</p> </p>
<!-- omit in toc --> <!-- omit in toc -->
# Paperless-ngx # Paperless-ngx
Paperless-ngx is a document management system that transforms your physical documents into a searchable online archive so you can keep, well, *less paper*. Paperless-ngx is a document management system that transforms your physical documents into a searchable online archive so you can keep, well, _less paper_.
Paperless-ngx forked from [paperless-ng](https://github.com/jonaswinkler/paperless-ng) to continue the great work and distribute responsibility of supporting and advancing the project among a team of people. [Consider joining us!](#community-support) Discussion of this transition can be found in issues Paperless-ngx forked from [paperless-ng](https://github.com/jonaswinkler/paperless-ng) to continue the great work and distribute responsibility of supporting and advancing the project among a team of people. [Consider joining us!](#community-support) Discussion of this transition can be found in issues
[#1599](https://github.com/jonaswinkler/paperless-ng/issues/1599) and [#1632](https://github.com/jonaswinkler/paperless-ng/issues/1632). [#1599](https://github.com/jonaswinkler/paperless-ng/issues/1599) and [#1632](https://github.com/jonaswinkler/paperless-ng/issues/1632).
A demo is available at [demo.paperless-ngx.com](https://demo.paperless-ngx.com) using login `demo` / `demo`. *Note: demo content is reset frequently and confidential information should not be uploaded.* A demo is available at [demo.paperless-ngx.com](https://demo.paperless-ngx.com) using login `demo` / `demo`. _Note: demo content is reset frequently and confidential information should not be uploaded._
- [Features](#features) - [Features](#features)
- [Getting started](#getting-started) - [Getting started](#getting-started)
- [Contributing](#contributing) - [Contributing](#contributing)
- [Community Support](#community-support) - [Community Support](#community-support)
- [Translation](#translation) - [Translation](#translation)
- [Feature Requests](#feature-requests) - [Feature Requests](#feature-requests)
- [Bugs](#bugs) - [Bugs](#bugs)
- [Affiliated Projects](#affiliated-projects) - [Affiliated Projects](#affiliated-projects)
- [Important Note](#important-note) - [Important Note](#important-note)
@@ -35,28 +35,28 @@ A demo is available at [demo.paperless-ngx.com](https://demo.paperless-ngx.com)
![Dashboard](https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/docs/_static/screenshots/documents-wchrome.png#gh-light-mode-only) ![Dashboard](https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/docs/_static/screenshots/documents-wchrome.png#gh-light-mode-only)
![Dashboard](https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/docs/_static/screenshots/documents-wchrome-dark.png#gh-dark-mode-only) ![Dashboard](https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/docs/_static/screenshots/documents-wchrome-dark.png#gh-dark-mode-only)
* Organize and index your scanned documents with tags, correspondents, types, and more. - Organize and index your scanned documents with tags, correspondents, types, and more.
* Performs OCR on your documents, adds selectable text to image only documents and adds tags, correspondents and document types to your documents. - Performs OCR on your documents, adds selectable text to image only documents and adds tags, correspondents and document types to your documents.
* Supports PDF documents, images, plain text files, and Office documents (Word, Excel, Powerpoint, and LibreOffice equivalents). - Supports PDF documents, images, plain text files, and Office documents (Word, Excel, Powerpoint, and LibreOffice equivalents).
* Office document support is optional and provided by Apache Tika (see [configuration](https://paperless-ngx.readthedocs.io/en/latest/configuration.html#tika-settings)) - Office document support is optional and provided by Apache Tika (see [configuration](https://paperless-ngx.readthedocs.io/en/latest/configuration.html#tika-settings))
* Paperless stores your documents plain on disk. Filenames and folders are managed by paperless and their format can be configured freely. - Paperless stores your documents plain on disk. Filenames and folders are managed by paperless and their format can be configured freely.
* Single page application front end. - Single page application front end.
* Includes a dashboard that shows basic statistics and has document upload. - Includes a dashboard that shows basic statistics and has document upload.
* Filtering by tags, correspondents, types, and more. - Filtering by tags, correspondents, types, and more.
* Customizable views can be saved and displayed on the dashboard. - Customizable views can be saved and displayed on the dashboard.
* Full text search helps you find what you need. - Full text search helps you find what you need.
* Auto completion suggests relevant words from your documents. - Auto completion suggests relevant words from your documents.
* Results are sorted by relevance to your search query. - Results are sorted by relevance to your search query.
* Highlighting shows you which parts of the document matched the query. - Highlighting shows you which parts of the document matched the query.
* Searching for similar documents ("More like this") - Searching for similar documents ("More like this")
* Email processing: Paperless adds documents from your email accounts. - Email processing: Paperless adds documents from your email accounts.
* Configure multiple accounts and filters for each account. - Configure multiple accounts and filters for each account.
* When adding documents from mail, paperless can move these mail to a new folder, mark them as read, flag them as important or delete them. - When adding documents from mail, paperless can move these mail to a new folder, mark them as read, flag them as important or delete them.
* Machine learning powered document matching. - Machine learning powered document matching.
* Paperless-ngx learns from your documents and will be able to automatically assign tags, correspondents and types to documents once you've stored a few documents in paperless. - Paperless-ngx learns from your documents and will be able to automatically assign tags, correspondents and types to documents once you've stored a few documents in paperless.
* Optimized for multi core systems: Paperless-ngx consumes multiple documents in parallel. - Optimized for multi core systems: Paperless-ngx consumes multiple documents in parallel.
* The integrated sanity checker makes sure that your document archive is in good health. - The integrated sanity checker makes sure that your document archive is in good health.
* [More screenshots are available in the documentation](https://paperless-ngx.readthedocs.io/en/latest/screenshots.html). - [More screenshots are available in the documentation](https://paperless-ngx.readthedocs.io/en/latest/screenshots.html).
# Getting started # Getting started
@@ -65,7 +65,7 @@ The easiest way to deploy paperless is docker-compose. The files in the [`/docke
If you'd like to jump right in, you can configure a docker-compose environment with our install script: If you'd like to jump right in, you can configure a docker-compose environment with our install script:
```bash ```bash
bash -c "$(curl -L https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/master/install-paperless-ngx.sh)" bash -c "$(curl -L https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/install-paperless-ngx.sh)"
``` ```
Alternatively, you can install the dependencies and setup apache and a database server yourself. The [documentation](https://paperless-ngx.readthedocs.io/en/latest/setup.html#installation) has a step by step guide on how to do it. Alternatively, you can install the dependencies and setup apache and a database server yourself. The [documentation](https://paperless-ngx.readthedocs.io/en/latest/setup.html#installation) has a step by step guide on how to do it.
@@ -73,6 +73,7 @@ Alternatively, you can install the dependencies and setup apache and a database
Migrating from Paperless-ng is easy, just drop in the new docker image! See the [documentation on migrating](https://paperless-ngx.readthedocs.io/en/latest/setup.html#migrating-from-paperless-ng) for more details. Migrating from Paperless-ng is easy, just drop in the new docker image! See the [documentation on migrating](https://paperless-ngx.readthedocs.io/en/latest/setup.html#migrating-from-paperless-ng) for more details.
<!-- omit in toc --> <!-- omit in toc -->
### Documentation ### Documentation
The documentation for Paperless-ngx is available on [ReadTheDocs](https://paperless-ngx.readthedocs.io/). The documentation for Paperless-ngx is available on [ReadTheDocs](https://paperless-ngx.readthedocs.io/).
@@ -101,18 +102,18 @@ For bugs please [open an issue](https://github.com/paperless-ngx/paperless-ngx/i
Paperless has been around a while now, and people are starting to build stuff on top of it. If you're one of those people, we can add your project to this list: Paperless has been around a while now, and people are starting to build stuff on top of it. If you're one of those people, we can add your project to this list:
* [Paperless App](https://github.com/bauerj/paperless_app): An Android/iOS app for Paperless-ngx. Also works with the original Paperless and Paperless-ng. - [Paperless App](https://github.com/bauerj/paperless_app): An Android/iOS app for Paperless-ngx. Also works with the original Paperless and Paperless-ngx.
* [Paperless Share](https://github.com/qcasey/paperless_share). Share any files from your Android application with paperless. Very simple, but works with all of the mobile scanning apps out there that allow you to share scanned documents. - [Paperless Share](https://github.com/qcasey/paperless_share). Share any files from your Android application with paperless. Very simple, but works with all of the mobile scanning apps out there that allow you to share scanned documents.
* [Scan to Paperless](https://github.com/sbrunner/scan-to-paperless): Scan and prepare (crop, deskew, OCR, ...) your documents for Paperless. - [Scan to Paperless](https://github.com/sbrunner/scan-to-paperless): Scan and prepare (crop, deskew, OCR, ...) your documents for Paperless.
These projects also exist, but their status and compatibility with paperless-ngx is unknown. These projects also exist, but their status and compatibility with paperless-ngx is unknown.
* [paperless-cli](https://github.com/stgarf/paperless-cli): A golang command line binary to interact with a Paperless instance. - [paperless-cli](https://github.com/stgarf/paperless-cli): A golang command line binary to interact with a Paperless instance.
This project also exists, but needs updates to be compatible with paperless-ngx. This project also exists, but needs updates to be compatible with paperless-ngx.
* [Paperless Desktop](https://github.com/thomasbrueggemann/paperless-desktop): A desktop UI for your Paperless installation. Runs on Mac, Linux, and Windows. - [Paperless Desktop](https://github.com/thomasbrueggemann/paperless-desktop): A desktop UI for your Paperless installation. Runs on Mac, Linux, and Windows.
Known issues on Mac: (Could not load reminders and documents) Known issues on Mac: (Could not load reminders and documents)
# Important Note # Important Note

42
build-docker-image.sh Executable file
View File

@@ -0,0 +1,42 @@
#!/usr/bin/env bash
# Helper script for building the Docker image locally.
# Parses and provides the nessecary versions of other images to Docker
# before passing in the rest of script args.
# First Argument: The Dockerfile to build
# Other Arguments: Additional arguments to docker build
# Example Usage:
# ./build-docker-image.sh Dockerfile -t paperless-ngx:my-awesome-feature
set -eux
if ! command -v jq; then
echo "jq required"
exit 1
elif [ ! -f "$1" ]; then
echo "$1 is not a file, please provide the Dockerfile"
exit 1
fi
# Parse what we can from Pipfile.lock
pikepdf_version=$(jq ".default.pikepdf.version" Pipfile.lock | sed 's/=//g' | sed 's/"//g')
psycopg2_version=$(jq ".default.psycopg2.version" Pipfile.lock | sed 's/=//g' | sed 's/"//g')
# Read this from the other config file
qpdf_version=$(jq ".qpdf.version" .build-config.json | sed 's/"//g')
jbig2enc_version=$(jq ".jbig2enc.version" .build-config.json | sed 's/"//g')
# Get the branch name (used for caching)
branch_name=$(git rev-parse --abbrev-ref HEAD)
# https://docs.docker.com/develop/develop-images/build_enhancements/
# Required to use cache-from
export DOCKER_BUILDKIT=1
docker build --file "$1" \
--cache-from ghcr.io/paperless-ngx/paperless-ngx/builder/cache/app:"${branch_name}" \
--cache-from ghcr.io/paperless-ngx/paperless-ngx/builder/cache/app:dev \
--build-arg JBIG2ENC_VERSION="${jbig2enc_version}" \
--build-arg QPDF_VERSION="${qpdf_version}" \
--build-arg PIKEPDF_VERSION="${pikepdf_version}" \
--build-arg PSYCOPG2_VERSION="${psycopg2_version}" "${@:2}" .

View File

@@ -0,0 +1,14 @@
# This Dockerfile compiles the frontend
# Inputs: None
FROM node:16-bullseye-slim AS compile-frontend
COPY ./src /src/src
COPY ./src-ui /src/src-ui
WORKDIR /src/src-ui
RUN set -eux \
&& npm update npm -g \
&& npm ci --no-optional
RUN set -eux \
&& ./node_modules/.bin/ng build --configuration production

View File

@@ -0,0 +1,39 @@
# This Dockerfile compiles the jbig2enc library
# Inputs:
# - JBIG2ENC_VERSION - the Git tag to checkout and build
FROM debian:bullseye-slim as main
LABEL org.opencontainers.image.description="A intermediate image with jbig2enc built"
ARG DEBIAN_FRONTEND=noninteractive
ARG BUILD_PACKAGES="\
build-essential \
automake \
libtool \
libleptonica-dev \
zlib1g-dev \
git \
ca-certificates"
WORKDIR /usr/src/jbig2enc
# As this is an base image for a multi-stage final image
# the added size of the install is basically irrelevant
RUN apt-get update --quiet \
&& apt-get install --yes --quiet --no-install-recommends ${BUILD_PACKAGES} \
&& rm -rf /var/lib/apt/lists/*
# Layers after this point change according to required version
# For better caching, seperate the basic installs from
# the building
ARG JBIG2ENC_VERSION
RUN set -eux \
&& git clone --quiet --branch $JBIG2ENC_VERSION https://github.com/agl/jbig2enc .
RUN set -eux \
&& ./autogen.sh
RUN set -eux \
&& ./configure && make

View File

@@ -0,0 +1,92 @@
# This Dockerfile builds the pikepdf wheel
# Inputs:
# - REPO - Docker repository to pull qpdf from
# - QPDF_VERSION - The image qpdf version to copy .deb files from
# - PIKEPDF_GIT_TAG - The Git tag to clone and build from
# - PIKEPDF_VERSION - Used to force the built pikepdf version to match
# Default to pulling from the main repo registry when manually building
ARG REPO="paperless-ngx/paperless-ngx"
ARG QPDF_VERSION
FROM ghcr.io/${REPO}/builder/qpdf:${QPDF_VERSION} as qpdf-builder
# This does nothing, except provide a name for a copy below
FROM python:3.9-slim-bullseye as main
LABEL org.opencontainers.image.description="A intermediate image with pikepdf wheel built"
ARG DEBIAN_FRONTEND=noninteractive
ARG BUILD_PACKAGES="\
build-essential \
python3-dev \
python3-pip \
git \
# qpdf requirement - https://github.com/qpdf/qpdf#crypto-providers
libgnutls28-dev \
# lxml requrements - https://lxml.de/installation.html
libxml2-dev \
libxslt1-dev \
# Pillow requirements - https://pillow.readthedocs.io/en/stable/installation.html#external-libraries
# JPEG functionality
libjpeg62-turbo-dev \
# conpressed PNG
zlib1g-dev \
# compressed TIFF
libtiff-dev \
# type related services
libfreetype-dev \
# color management
liblcms2-dev \
# WebP format
libwebp-dev \
# JPEG 2000
libopenjp2-7-dev \
# improved color quantization
libimagequant-dev \
# complex text layout support
libraqm-dev"
WORKDIR /usr/src
COPY --from=qpdf-builder /usr/src/qpdf/*.deb ./
# As this is an base image for a multi-stage final image
# the added size of the install is basically irrelevant
RUN set -eux \
&& apt-get update --quiet \
&& apt-get install --yes --quiet --no-install-recommends $BUILD_PACKAGES \
&& dpkg --install libqpdf28_*.deb \
&& dpkg --install libqpdf-dev_*.deb \
&& python3 -m pip install --no-cache-dir --upgrade \
pip \
wheel \
# https://pikepdf.readthedocs.io/en/latest/installation.html#requirements
pybind11 \
&& rm -rf /var/lib/apt/lists/*
# Layers after this point change according to required version
# For better caching, seperate the basic installs from
# the building
ARG PIKEPDF_GIT_TAG
ARG PIKEPDF_VERSION
RUN set -eux \
&& echo "building pikepdf wheel" \
# Note the v in the tag name here
&& git clone --quiet --depth 1 --branch "${PIKEPDF_GIT_TAG}" https://github.com/pikepdf/pikepdf.git \
&& cd pikepdf \
# pikepdf seems to specifciy either a next version when built OR
# a post release tag.
# In either case, this won't match what we want from requirements.txt
# Directly modify the setup.py to set the version we just checked out of Git
&& sed -i "s/use_scm_version=True/version=\"${PIKEPDF_VERSION}\"/g" setup.py \
# https://github.com/pikepdf/pikepdf/issues/323
&& rm pyproject.toml \
&& mkdir wheels \
&& python3 -m pip wheel . --wheel-dir wheels \
&& ls -ahl wheels

View File

@@ -0,0 +1,45 @@
# This Dockerfile builds the psycopg2 wheel
# Inputs:
# - PSYCOPG2_GIT_TAG - The Git tag to clone and build from
# - PSYCOPG2_VERSION - Unused, kept for future possible usage
FROM python:3.9-slim-bullseye as main
LABEL org.opencontainers.image.description="A intermediate image with psycopg2 wheel built"
ARG DEBIAN_FRONTEND=noninteractive
ARG BUILD_PACKAGES="\
build-essential \
git \
python3-dev \
python3-pip \
# https://www.psycopg.org/docs/install.html#prerequisites
libpq-dev"
WORKDIR /usr/src
# As this is an base image for a multi-stage final image
# the added size of the install is basically irrelevant
RUN set -eux \
&& apt-get update --quiet \
&& apt-get install --yes --quiet --no-install-recommends $BUILD_PACKAGES \
&& rm -rf /var/lib/apt/lists/* \
&& python3 -m pip install --no-cache-dir --upgrade pip wheel
# Layers after this point change according to required version
# For better caching, seperate the basic installs from
# the building
ARG PSYCOPG2_GIT_TAG
ARG PSYCOPG2_VERSION
RUN set -eux \
&& echo "Building psycopg2 wheel" \
&& cd /usr/src \
&& git clone --quiet --depth 1 --branch ${PSYCOPG2_GIT_TAG} https://github.com/psycopg/psycopg2.git \
&& cd psycopg2 \
&& mkdir wheels \
&& python3 -m pip wheel . --wheel-dir wheels \
&& ls -ahl wheels/

View File

@@ -0,0 +1,53 @@
FROM debian:bullseye-slim as main
LABEL org.opencontainers.image.description="A intermediate image with qpdf built"
ARG DEBIAN_FRONTEND=noninteractive
ARG BUILD_PACKAGES="\
build-essential \
debhelper \
debian-keyring \
devscripts \
equivs \
libtool \
# https://qpdf.readthedocs.io/en/stable/installation.html#system-requirements
libjpeg62-turbo-dev \
libgnutls28-dev \
packaging-dev \
zlib1g-dev"
WORKDIR /usr/src
# As this is an base image for a multi-stage final image
# the added size of the install is basically irrelevant
RUN set -eux \
&& apt-get update --quiet \
&& apt-get install --yes --quiet --no-install-recommends $BUILD_PACKAGES \
&& rm -rf /var/lib/apt/lists/*
# Layers after this point change according to required version
# For better caching, seperate the basic installs from
# the building
# This must match to pikepdf's minimum at least
ARG QPDF_VERSION
# In order to get the required version of qpdf, it is backported from bookwork
# and then built from source
RUN set -eux \
&& echo "Building qpdf" \
&& echo "deb-src http://deb.debian.org/debian/ bookworm main" > /etc/apt/sources.list.d/bookworm-src.list \
&& apt-get update \
&& mkdir qpdf \
&& cd qpdf \
&& apt-get source --yes --quiet qpdf=${QPDF_VERSION}-1/bookworm \
&& rm -rf /var/lib/apt/lists/* \
&& cd qpdf-$QPDF_VERSION \
# We don't need to build the tests (also don't run them)
&& rm -rf libtests \
&& DEBEMAIL=hello@paperless-ngx.com debchange --bpo \
&& export DEB_BUILD_OPTIONS="terse nocheck nodoc parallel=2" \
&& dpkg-buildpackage --build=binary --unsigned-source --unsigned-changes \
&& ls -ahl ../*.deb

View File

@@ -22,6 +22,10 @@
# Docker setup does not use the configuration file. # Docker setup does not use the configuration file.
# A few commonly adjusted settings are provided below. # A few commonly adjusted settings are provided below.
# This is required if you will be exposing Paperless-ngx on a public domain
# (if doing so please consider security measures such as reverse proxy)
#PAPERLESS_URL=https://paperless.example.com
# Adjust this key if you plan to make paperless available publicly. It should # Adjust this key if you plan to make paperless available publicly. It should
# be a very long sequence of random characters. You don't need to remember it. # be a very long sequence of random characters. You don't need to remember it.
#PAPERLESS_SECRET_KEY=change-me #PAPERLESS_SECRET_KEY=change-me

View File

@@ -55,7 +55,7 @@ services:
ports: ports:
- 8010:8000 - 8010:8000
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000"] test: ["CMD", "curl", "-fs", "-S", "--max-time", "2", "http://localhost:8000"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 5 retries: 5

View File

@@ -1,4 +1,4 @@
# docker-compose file for running paperless from the Docker Hub. # docker-compose file for running paperless from the docker container registry.
# This file contains everything paperless needs to run. # This file contains everything paperless needs to run.
# Paperless supports amd64, arm and arm64 hardware. # Paperless supports amd64, arm and arm64 hardware.
# #
@@ -59,7 +59,7 @@ services:
ports: ports:
- 8000:8000 - 8000:8000
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000"] test: ["CMD", "curl", "-fs", "-S", "--max-time", "2", "http://localhost:8000"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 5 retries: 5
@@ -77,13 +77,14 @@ services:
PAPERLESS_TIKA_ENDPOINT: http://tika:9998 PAPERLESS_TIKA_ENDPOINT: http://tika:9998
gotenberg: gotenberg:
image: gotenberg/gotenberg:7 image: gotenberg/gotenberg:7.4
restart: unless-stopped restart: unless-stopped
environment: command:
CHROMIUM_DISABLE_ROUTES: 1 - "gotenberg"
- "--chromium-disable-routes=true"
tika: tika:
image: apache/tika image: ghcr.io/paperless-ngx/tika:latest
restart: unless-stopped restart: unless-stopped
volumes: volumes:

View File

@@ -53,7 +53,7 @@ services:
ports: ports:
- 8000:8000 - 8000:8000
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000"] test: ["CMD", "curl", "-fs", "-S", "--max-time", "2", "http://localhost:8000"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 5 retries: 5

View File

@@ -1,7 +1,6 @@
# docker-compose file for running paperless from the Docker Hub. # docker-compose file for running paperless from the docker container registry.
# This file contains everything paperless needs to run. # This file contains everything paperless needs to run.
# Paperless supports amd64, arm and arm64 hardware. # Paperless supports amd64, arm and arm64 hardware.
#
# All compose files of paperless configure paperless in the following way: # All compose files of paperless configure paperless in the following way:
# #
# - Paperless is (re)started on system boot, if it was running before shutdown. # - Paperless is (re)started on system boot, if it was running before shutdown.
@@ -49,7 +48,7 @@ services:
ports: ports:
- 8000:8000 - 8000:8000
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000"] test: ["CMD", "curl", "-fs", "-S", "--max-time", "2", "http://localhost:8000"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 5 retries: 5
@@ -66,13 +65,14 @@ services:
PAPERLESS_TIKA_ENDPOINT: http://tika:9998 PAPERLESS_TIKA_ENDPOINT: http://tika:9998
gotenberg: gotenberg:
image: gotenberg/gotenberg:7 image: gotenberg/gotenberg:7.4
restart: unless-stopped restart: unless-stopped
environment: command:
CHROMIUM_DISABLE_ROUTES: 1 - "gotenberg"
- "--chromium-disable-routes=true"
tika: tika:
image: apache/tika image: ghcr.io/paperless-ngx/tika:latest
restart: unless-stopped restart: unless-stopped
volumes: volumes:

View File

@@ -39,7 +39,7 @@ services:
ports: ports:
- 8000:8000 - 8000:8000
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000"] test: ["CMD", "curl", "-fs", "-S", "--max-time", "2", "http://localhost:8000"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 5 retries: 5

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e
@@ -10,7 +10,7 @@ map_uidgid() {
USERMAP_NEW_GID=${USERMAP_GID:-${USERMAP_ORIG_GID:-$USERMAP_NEW_UID}} USERMAP_NEW_GID=${USERMAP_GID:-${USERMAP_ORIG_GID:-$USERMAP_NEW_UID}}
if [[ ${USERMAP_NEW_UID} != "${USERMAP_ORIG_UID}" || ${USERMAP_NEW_GID} != "${USERMAP_ORIG_GID}" ]]; then if [[ ${USERMAP_NEW_UID} != "${USERMAP_ORIG_UID}" || ${USERMAP_NEW_GID} != "${USERMAP_ORIG_GID}" ]]; then
echo "Mapping UID and GID for paperless:paperless to $USERMAP_NEW_UID:$USERMAP_NEW_GID" echo "Mapping UID and GID for paperless:paperless to $USERMAP_NEW_UID:$USERMAP_NEW_GID"
usermod -u "${USERMAP_NEW_UID}" paperless usermod -o -u "${USERMAP_NEW_UID}" paperless
groupmod -o -g "${USERMAP_NEW_GID}" paperless groupmod -o -g "${USERMAP_NEW_GID}" paperless
fi fi
} }
@@ -56,12 +56,12 @@ install_languages() {
# continue # continue
#fi #fi
if dpkg -s $pkg &>/dev/null; then if dpkg -s "$pkg" &>/dev/null; then
echo "Package $pkg already installed!" echo "Package $pkg already installed!"
continue continue
fi fi
if ! apt-cache show $pkg &>/dev/null; then if ! apt-cache show "$pkg" &>/dev/null; then
echo "Package $pkg not found! :(" echo "Package $pkg not found! :("
continue continue
fi fi
@@ -77,7 +77,7 @@ install_languages() {
echo "Paperless-ngx docker container starting..." echo "Paperless-ngx docker container starting..."
# Install additional languages if specified # Install additional languages if specified
if [[ ! -z "$PAPERLESS_OCR_LANGUAGES" ]]; then if [[ -n "$PAPERLESS_OCR_LANGUAGES" ]]; then
install_languages "$PAPERLESS_OCR_LANGUAGES" install_languages "$PAPERLESS_OCR_LANGUAGES"
fi fi

View File

@@ -1,19 +1,18 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
wait_for_postgres() { wait_for_postgres() {
attempt_num=1 attempt_num=1
max_attempts=5 max_attempts=5
echo "Waiting for PostgreSQL to start..." echo "Waiting for PostgreSQL to start..."
host="${PAPERLESS_DBHOST}" host="${PAPERLESS_DBHOST:=localhost}"
port="${PAPERLESS_DBPORT}" port="${PAPERLESS_DBPORT:=5432}"
if [[ -z $port ]]; then
port="5432"
fi
while ! </dev/tcp/$host/$port; do while [ ! "$(pg_isready -h $host -p $port)" ]; do
if [ $attempt_num -eq $max_attempts ]; then if [ $attempt_num -eq $max_attempts ]; then
echo "Unable to connect to database." echo "Unable to connect to database."
@@ -23,11 +22,19 @@ wait_for_postgres() {
fi fi
attempt_num=$(expr "$attempt_num" + 1) attempt_num=$(("$attempt_num" + 1))
sleep 5 sleep 5
done done
} }
wait_for_redis() {
# We use a Python script to send the Redis ping
# instead of installing redis-tools just for 1 thing
if ! python3 /sbin/wait-for-redis.py; then
exit 1
fi
}
migrations() { migrations() {
( (
# flock is in place to prevent multiple containers from doing migrations # flock is in place to prevent multiple containers from doing migrations
@@ -61,6 +68,8 @@ do_work() {
wait_for_postgres wait_for_postgres
fi fi
wait_for_redis
migrations migrations
search_index search_index

View File

@@ -1,3 +1,7 @@
#!/usr/bin/env bash
set -eu
for command in document_archiver document_exporter document_importer mail_fetcher document_create_classifier document_index document_renamer document_retagger document_thumbnails document_sanity_checker manage_superuser; for command in document_archiver document_exporter document_importer mail_fetcher document_create_classifier document_index document_renamer document_retagger document_thumbnails document_sanity_checker manage_superuser;
do do
echo "installing $command..." echo "installing $command..."

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e
@@ -6,10 +6,10 @@ cd /usr/src/paperless/src/
if [[ $(id -u) == 0 ]] ; if [[ $(id -u) == 0 ]] ;
then then
gosu paperless python3 manage.py management_command "$@" gosu paperless python3 manage.py management_command "$@"
elif [[ $(id -un) == "paperless" ]] ; elif [[ $(id -un) == "paperless" ]] ;
then then
python3 manage.py management_command "$@" python3 manage.py management_command "$@"
else else
echo "Unknown user." echo "Unknown user."
fi fi

View File

@@ -28,6 +28,7 @@ stderr_logfile_maxbytes=0
[program:scheduler] [program:scheduler]
command=python3 manage.py qcluster command=python3 manage.py qcluster
user=paperless user=paperless
stopasgroup = true
stdout_logfile=/dev/stdout stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0 stdout_logfile_maxbytes=0

42
docker/wait-for-redis.py Executable file
View File

@@ -0,0 +1,42 @@
#!/usr/bin/env python3
"""
Simple script which attempts to ping the Redis broker as set in the environment for
a certain number of times, waiting a little bit in between
"""
import os
import sys
import time
from typing import Final
from redis import Redis
if __name__ == "__main__":
MAX_RETRY_COUNT: Final[int] = 5
RETRY_SLEEP_SECONDS: Final[int] = 5
REDIS_URL: Final[str] = os.getenv("PAPERLESS_REDIS", "redis://localhost:6379")
print(f"Waiting for Redis: {REDIS_URL}", flush=True)
attempt = 0
with Redis.from_url(url=REDIS_URL) as client:
while attempt < MAX_RETRY_COUNT:
try:
client.ping()
break
except Exception:
print(
f"Redis ping #{attempt} failed, waiting {RETRY_SLEEP_SECONDS}s",
flush=True,
)
time.sleep(RETRY_SLEEP_SECONDS)
attempt += 1
if attempt >= MAX_RETRY_COUNT:
print(f"Failed to connect to: {REDIS_URL}")
sys.exit(os.EX_UNAVAILABLE)
else:
print(f"Connected to Redis broker: {REDIS_URL}")
sys.exit(os.EX_OK)

View File

@@ -1,11 +1,10 @@
FROM python:3.5.1 FROM python:3.5.1
MAINTAINER Pit Kleyersburg <pitkley@googlemail.com>
# Install Sphinx and Pygments # Install Sphinx and Pygments
RUN pip install Sphinx Pygments RUN pip install --no-cache-dir Sphinx Pygments \
# Setup directories, copy data
&& mkdir /build
# Setup directories, copy data
RUN mkdir /build
COPY . /build COPY . /build
WORKDIR /build/docs WORKDIR /build/docs

View File

@@ -580,9 +580,13 @@ a.image-reference img {
right: 12px; right: 12px;
height: 20px; height: 20px;
width: 24px; width: 24px;
z-index: 1000; z-index: 10;
border: none; border: none;
background-color: transparent; background-color: transparent;
color: inherit; color: inherit;
opacity: 0.7; opacity: 0.7;
} }
.wy-nav-content-wrap {
z-index: 20;
}

View File

@@ -117,6 +117,23 @@ Then you can start paperless-ngx with ``-d`` to have it run in the background.
image: ghcr.io/paperless-ngx/paperless-ngx:latest image: ghcr.io/paperless-ngx/paperless-ngx:latest
.. note::
In version 1.7.1 and onwards, the Docker image can now pinned to a release series.
This is often combined with automatic updaters such as Watchtower to allow safer
unattended upgrading to new bugfix releases only. It is still recommended to always
review release notes before upgrading. To ping your install to a release series, edit
the ``docker-compose.yml`` find the line that says
.. code::
image: ghcr.io/paperless-ngx/paperless-ngx:latest
and replace the version with the series you want to track, for example:
.. code::
image: ghcr.io/paperless-ngx/paperless-ngx:1.7
Bare Metal Route Bare Metal Route
================ ================
@@ -369,7 +386,7 @@ the naming scheme.
.. warning:: .. warning::
Since this command moves you documents around alot, it is advised to to Since this command moves you documents around a lot, it is advised to to
a backup before. The renaming logic is robust and will never overwrite a backup before. The renaming logic is robust and will never overwrite
or delete a file, but you can't ever be careful enough. or delete a file, but you can't ever be careful enough.
@@ -379,7 +396,7 @@ the naming scheme.
The command takes no arguments and processes all your documents at once. The command takes no arguments and processes all your documents at once.
Learn how to use :ref:`Management Utilities<Management utilities>`. Learn how to use :ref:`Management Utilities<utilities-management-commands>`.
.. _utilities-sanity-checker: .. _utilities-sanity-checker:

View File

@@ -179,13 +179,14 @@ Assumed you have ``/home/foo/paperless-ngx/scripts/post-consumption-example.sh``
You can pass that script into the consumer container via a host mount in your ``docker-compose.yml``. You can pass that script into the consumer container via a host mount in your ``docker-compose.yml``.
.. code:: bash .. code:: bash
...
consumer: ...
... consumer:
volumes: ...
... volumes:
- /home/paperless-ngx/scripts:/path/in/container/scripts/ ...
... - /home/paperless-ngx/scripts:/path/in/container/scripts/
...
Example (docker-compose.yml): ``- /home/foo/paperless-ngx/scripts:/usr/src/paperless/scripts`` Example (docker-compose.yml): ``- /home/foo/paperless-ngx/scripts:/usr/src/paperless/scripts``
@@ -242,7 +243,7 @@ will create a directory structure as follows:
last filename a document was stored as. If you do rename a file, paperless will last filename a document was stored as. If you do rename a file, paperless will
report your files as missing and won't be able to find them. report your files as missing and won't be able to find them.
Paperless provides the following placeholders withing filenames: Paperless provides the following placeholders within filenames:
* ``{asn}``: The archive serial number of the document, or "none". * ``{asn}``: The archive serial number of the document, or "none".
* ``{correspondent}``: The name of the correspondent, or "none". * ``{correspondent}``: The name of the correspondent, or "none".

View File

@@ -5,6 +5,87 @@
Changelog Changelog
********* *********
paperless-ngx 1.7.0
###################
Breaking Changes
* ``PAPERLESS_URL`` is now required when using a reverse proxy. See `#674`_.
Features
* Allow setting more than one tag in mail rules `@jonasc`_ (#270)
* global drag'n'drop `@shamoon`_ (#283).
* Fix: download buttons should disable while waiting `@shamoon`_ (#630).
* Update checker `@shamoon`_ (#591).
* Show prompt on password-protected pdfs `@shamoon`_ (#564).
* Filtering query params aka browser navigation for filtering `@shamoon`_ (#540).
* Clickable tags in dashboard widgets `@shamoon`_ (#515).
* Add bottom pagination `@shamoon`_ (#372).
* Feature barcode splitter `@gador`_ (#532).
* App loading screen `@shamoon`_ (#298).
* Use progress bar for delayed buttons `@shamoon`_ (#415).
* Add minimum length for documents text filter `@shamoon`_ (#401).
* Added nav buttons in the document detail view `@GruberViktor`_ (#273).
* Improve date keyboard input `@shamoon`_ (#253).
* Color theming `@shamoon`_ (#243).
* Parse dates when entered without separators `@GruberViktor`_ (#250).
Bug Fixes
* add "localhost" to ALLOWED_HOSTS `@gador`_ (#700).
* Fix: scanners table `@qcasey`_ (#690).
* Adds wait for file before consuming `@stumpylog`_ (#483).
* Fix: frontend document editing erases time data `@shamoon`_ (#654).
* Increase length of SavedViewFilterRule `@stumpylog`_ (#612).
* Fixes attachment filename matching during mail fetching `@stumpylog`_ (#680).
* Add ``PAPERLESS_URL`` env variable & CSRF var `@shamoon`_ (#674).
* Fix: download buttons should disable while waiting `@shamoon`_ (#630).
* Fixes downloaded filename, add more consumer ignore settings `@stumpylog`_ (#599).
* FIX BUG: case-sensitive matching was not possible `@danielBreitlauch`_ (#594).
* uses shutil.move instead of rename `@gador`_ (#617).
* Fix npm deps 01.02.22 2 `@shamoon`_ (#610).
* Fix npm dependencies 01.02.22 `@shamoon`_ (#600).
* fix issue 416: implement PAPERLESS_OCR_MAX_IMAGE_PIXELS `@hacker-h`_ (#441).
* fix: exclude cypress from build in Dockerfile `@FrankStrieter`_ (#526).
* Corrections to pass pre-commit hooks `@schnuffle`_ (#454).
* Fix 311 unable to click checkboxes in document list `@shamoon`_ (#313).
* Fix imap tools bug `@stumpylog`_ (#393).
* Fix filterable dropdown buttons arent translated `@shamoon`_ (#366).
* Fix 224: "Auto-detected date is day before receipt date" `@a17t`_ (#246).
* Fix minor sphinx errors `@shamoon`_ (#322).
* Fix page links hidden `@shamoon`_ (#314).
* Fix: Include excluded items in dropdown count `@shamoon`_ (#263).
Translation
* `@miku323`_ contributed to Slovenian translation.
* `@FaintGhost`_ contributed to Chinese Simplified translation.
* `@DarkoBG79`_ contributed to Serbian translation.
* `Kemal Secer`_ contributed to Turkish translation.
* `@Prominence`_ contributed to Belarusian translation.
Documentation
* Fix: scanners table `@qcasey`_ (#690).
* Add `PAPERLESS_URL` env variable & CSRF var `@shamoon`_ (#674).
* Fixes downloaded filename, add more consumer ignore settings `@stumpylog`_ (#599).
* fix issue 416: implement ``PAPERLESS_OCR_MAX_IMAGE_PIXELS`` `@hacker-h`_ (#441).
* Fix minor sphinx errors `@shamoon`_ (#322).
Maintenance
* Add ``PAPERLESS_URL`` env variable & CSRF var `@shamoon`_ (#674).
* Chore: Implement release-drafter action for Changelogs `@qcasey`_ (#669).
* Chore: Add CODEOWNERS `@qcasey`_ (#667).
* Support docker-compose v2 in install `@stumpylog`_ (#611).
* Add Belarusian localization `@shamoon`_ (#588).
* Add Turkish localization `@shamoon`_ (#536).
* Add Serbian localization `@shamoon`_ (#504).
* Create PULL_REQUEST_TEMPLATE.md `@shamoon`_ (#304).
* Add Chinese localization `@shamoon`_ (#247).
* Add Slovenian language for frontend `@shamoon`_ (#315).
paperless-ngx 1.6.0 paperless-ngx 1.6.0
################### ###################
@@ -35,6 +116,10 @@ Version 1.6.0 merges several pending PRs from jonaswinkler's repo and includes n
* `@shamoon`_ created a slick new logo (#165). * `@shamoon`_ created a slick new logo (#165).
* `@tim-vogel`_ fixed exports missing groups (#193). * `@tim-vogel`_ fixed exports missing groups (#193).
Known issues:
* 1.6.0 included a malformed package-lock.json, as a result users who want to build the docker image themselves need to change line 6 of the ``Dockerfile`` to ``RUN npm update npm -g && npm install --legacy-peer-deps``.
Thank you to the following people for their documentation updates, fixes, and comprehensive testing: Thank you to the following people for their documentation updates, fixes, and comprehensive testing:
`@m0veax`_, `@a17t`_, `@fignew`_, `@muued`_, `@bauerj`_, `@isigmund`_, `@denilsonsa`_, `@mweimerskirch`_, `@alexander-bauer`_, `@apeltzer`_, `@tribut`_, `@yschroeder`_, `@gador`_, `@sAksham-Ar`_, `@sbrunner`_, `@philpagel`_, `@davemachado`_, `@2600box`_, `@qcasey`_, `@Nicarim`_, `@kpj`_, `@filcuk`_, `@Timoms`_, `@mattlamb99`_, `@padraigkitterick`_, `@ajkavanagh`_, `@Tooa`_, `@Unkn0wnCat`_, `@pewter77`_, `@stumpylog`_, `@Toxix`_, `@azapater`_, `@jschpp`_ `@m0veax`_, `@a17t`_, `@fignew`_, `@muued`_, `@bauerj`_, `@isigmund`_, `@denilsonsa`_, `@mweimerskirch`_, `@alexander-bauer`_, `@apeltzer`_, `@tribut`_, `@yschroeder`_, `@gador`_, `@sAksham-Ar`_, `@sbrunner`_, `@philpagel`_, `@davemachado`_, `@2600box`_, `@qcasey`_, `@Nicarim`_, `@kpj`_, `@filcuk`_, `@Timoms`_, `@mattlamb99`_, `@padraigkitterick`_, `@ajkavanagh`_, `@Tooa`_, `@Unkn0wnCat`_, `@pewter77`_, `@stumpylog`_, `@Toxix`_, `@azapater`_, `@jschpp`_
@@ -140,7 +225,7 @@ paperless-ng 1.4.0
* New URL pattern for accessing documents by ASN directly (http://<paperless>/asn/123) * New URL pattern for accessing documents by ASN directly (http://<paperless>/asn/123)
* Added logging when executing pre- and post-consume scripts. * Added logging when executing pre* and post-consume scripts.
* Better error logging during document consumption. * Better error logging during document consumption.
@@ -1576,6 +1661,16 @@ bulk of the work on this big change.
.. _@azapater: https://github.com/azapater .. _@azapater: https://github.com/azapater
.. _@tim-vogel: https://github.com/tim-vogel .. _@tim-vogel: https://github.com/tim-vogel
.. _@jschpp: https://github.com/jschpp .. _@jschpp: https://github.com/jschpp
.. _@schnuffle: https://github.com/schnuffle
.. _@GruberViktor: https://github.com/gruberviktor
.. _@hacker-h: https://github.com/hacker-h
.. _@danielBreitlauch: https://github.com/danielbreitlauch
.. _@miku323: https://github.com/miku323
.. _@FaintGhost: https://github.com/FaintGhost
.. _@DarkoBG79: https://github.com/DarkoBG79
.. _Kemal Secer: https://crowdin.com/profile/kemal.secer
.. _@Prominence: https://github.com/Prominence
.. _@jonasc: https://github.com/jonasc
.. _#20: https://github.com/the-paperless-project/paperless/issues/20 .. _#20: https://github.com/the-paperless-project/paperless/issues/20
.. _#44: https://github.com/the-paperless-project/paperless/issues/44 .. _#44: https://github.com/the-paperless-project/paperless/issues/44
@@ -1684,8 +1779,9 @@ bulk of the work on this big change.
.. _#488: https://github.com/the-paperless-project/paperless/pull/488 .. _#488: https://github.com/the-paperless-project/paperless/pull/488
.. _#489: https://github.com/the-paperless-project/paperless/pull/489 .. _#489: https://github.com/the-paperless-project/paperless/pull/489
.. _#492: https://github.com/the-paperless-project/paperless/pull/492 .. _#492: https://github.com/the-paperless-project/paperless/pull/492
.. _#674: https://github.com/paperless-ngx/paperless-ngx/pull/674
.. _a new home on Docker Hub: https://hub.docker.com/r/danielquinn/paperless/ .. _a new home on Docker Hub: https://hub.docker.com/r/danielquinn/paperless/
.. _optipng: http://optipng.sourceforge.net/ .. _optipng: http://optipng.sourceforge.net/
.. _DjangoQL: https://github.com/ivelum/djangoql .. _DjangoQL: https://github.com/ivelum/djangoql
.. _ansible repo: https://github.com/paperless-ngx/paperless-ngx-ansible .. _ansible repo: https://github.com/paperless-ngx/paperless-ngx-ansible

View File

@@ -2,6 +2,8 @@ import sphinx_rtd_theme
__version__ = None __version__ = None
__full_version_str__ = None
__major_minor_version_str__ = None
exec(open("../src/paperless/version.py").read()) exec(open("../src/paperless/version.py").read())
@@ -41,9 +43,9 @@ copyright = "2015-2022, Daniel Quinn, Jonas Winkler, and the paperless-ngx team"
# #
# The short X.Y version. # The short X.Y version.
version = ".".join([str(_) for _ in __version__[:2]]) version = __major_minor_version_str__
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = ".".join([str(_) for _ in __version__[:3]]) release = __full_version_str__
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.

View File

@@ -130,6 +130,8 @@ PAPERLESS_LOGROTATE_MAX_BACKUPS=<num>
Defaults to 20. Defaults to 20.
.. _hosting-and-security:
Hosting & Security Hosting & Security
################## ##################
@@ -142,7 +144,24 @@ PAPERLESS_SECRET_KEY=<key>
Default is listed in the file ``src/paperless/settings.py``. Default is listed in the file ``src/paperless/settings.py``.
PAPERLESS_ALLOWED_HOSTS<comma-separated-list> PAPERLESS_URL=<url>
This setting can be used to set the three options below (ALLOWED_HOSTS,
CORS_ALLOWED_HOSTS and CSRF_TRUSTED_ORIGINS). If the other options are
set the values will be combined with this one. Do not include a trailing
slash. E.g. https://paperless.domain.com
Defaults to empty string, leaving the other settings unaffected.
PAPERLESS_CSRF_TRUSTED_ORIGINS=<comma-separated-list>
A list of trusted origins for unsafe requests (e.g. POST). As of Django 4.0
this is required to access the Django admin via the web.
See https://docs.djangoproject.com/en/4.0/ref/settings/#csrf-trusted-origins
Can also be set using PAPERLESS_URL (see above).
Defaults to empty string, which does not add any origins to the trusted list.
PAPERLESS_ALLOWED_HOSTS=<comma-separated-list>
If you're planning on putting Paperless on the open internet, then you If you're planning on putting Paperless on the open internet, then you
really should set this value to the domain name you're using. Failing to do really should set this value to the domain name you're using. Failing to do
so leaves you open to HTTP host header attacks: so leaves you open to HTTP host header attacks:
@@ -151,12 +170,19 @@ PAPERLESS_ALLOWED_HOSTS<comma-separated-list>
Just remember that this is a comma-separated list, so "example.com" is fine, Just remember that this is a comma-separated list, so "example.com" is fine,
as is "example.com,www.example.com", but NOT " example.com" or "example.com," as is "example.com,www.example.com", but NOT " example.com" or "example.com,"
Can also be set using PAPERLESS_URL (see above).
If manually set, please remember to include "localhost". Otherwise docker
healthcheck will fail.
Defaults to "*", which is all hosts. Defaults to "*", which is all hosts.
PAPERLESS_CORS_ALLOWED_HOSTS<comma-separated-list> PAPERLESS_CORS_ALLOWED_HOSTS=<comma-separated-list>
You need to add your servers to the list of allowed hosts that can do CORS You need to add your servers to the list of allowed hosts that can do CORS
calls. Set this to your public domain name. calls. Set this to your public domain name.
Can also be set using PAPERLESS_URL (see above).
Defaults to "http://localhost:8000". Defaults to "http://localhost:8000".
PAPERLESS_FORCE_SCRIPT_NAME=<path> PAPERLESS_FORCE_SCRIPT_NAME=<path>
@@ -185,7 +211,7 @@ PAPERLESS_AUTO_LOGIN_USERNAME=<username>
PAPERLESS_ADMIN_USER=<username> PAPERLESS_ADMIN_USER=<username>
If this environment variable is specified, Paperless automatically creates If this environment variable is specified, Paperless automatically creates
a superuser with the provided username at start. This is useful in cases a superuser with the provided username at start. This is useful in cases
where you can not run the `createsuperuser` command seperately, such as Kubernetes where you can not run the `createsuperuser` command separately, such as Kubernetes
or AWS ECS. or AWS ECS.
Requires `PAPERLESS_ADMIN_PASSWORD` to be set. Requires `PAPERLESS_ADMIN_PASSWORD` to be set.
@@ -389,6 +415,15 @@ PAPERLESS_OCR_IMAGE_DPI=<num>
Default is none, which will automatically calculate image DPI so that Default is none, which will automatically calculate image DPI so that
the produced PDF documents are A4 sized. the produced PDF documents are A4 sized.
PAPERLESS_OCR_MAX_IMAGE_PIXELS=<num>
Paperless will not OCR images that have more pixels than this limit.
This is intended to prevent decompression bombs from overloading paperless.
Increasing this limit is desired if you face a DecompressionBombError despite
the concerning file not being malicious; this could e.g. be caused by invalidly
recognized metadata.
If you have enough resources or if you are certain that your uploaded files
are not malicious you can increase this value to your needs.
The default value is 256000000, an image with more pixels than that would not be parsed.
PAPERLESS_OCR_USER_ARGS=<json> PAPERLESS_OCR_USER_ARGS=<json>
OCRmyPDF offers many more options. Use this parameter to specify any OCRmyPDF offers many more options. Use this parameter to specify any
@@ -439,7 +474,7 @@ PAPERLESS_TIKA_GOTENBERG_ENDPOINT=<url>
Defaults to "http://localhost:3000". Defaults to "http://localhost:3000".
If you run paperless on docker, you can add those services to the docker-compose If you run paperless on docker, you can add those services to the docker-compose
file (see the provided ``docker-compose.tika.yml`` file for reference). The changes file (see the provided ``docker-compose.sqlite-tika.yml`` file for reference). The changes
requires are as follows: requires are as follows:
.. code:: yaml .. code:: yaml
@@ -460,19 +495,22 @@ requires are as follows:
# ... # ...
gotenberg: gotenberg:
image: gotenberg/gotenberg:7 image: gotenberg/gotenberg:7.4
restart: unless-stopped restart: unless-stopped
environment: command:
CHROMIUM_DISABLE_ROUTES: 1 - "gotenberg"
- "--chromium-disable-routes=true"
tika: tika:
image: apache/tika image: ghcr.io/paperless-ngx/tika:latest
restart: unless-stopped restart: unless-stopped
Add the configuration variables to the environment of the webserver (alternatively Add the configuration variables to the environment of the webserver (alternatively
put the configuration in the ``docker-compose.env`` file) and add the additional put the configuration in the ``docker-compose.env`` file) and add the additional
services below the webserver service. Watch out for indentation. services below the webserver service. Watch out for indentation.
Make sure to use the correct format `PAPERLESS_TIKA_ENABLED = 1` so python_dotenv can parse the statement correctly.
Software tweaks Software tweaks
############### ###############
@@ -528,6 +566,10 @@ PAPERLESS_WORKER_TIMEOUT=<num>
large documents within the default 1800 seconds. So extending this timeout large documents within the default 1800 seconds. So extending this timeout
may prove to be useful on weak hardware setups. may prove to be useful on weak hardware setups.
PAPERLESS_WORKER_RETRY=<num>
If PAPERLESS_WORKER_TIMEOUT has been configured, the retry time for a task can
also be configured. By default, this value will be set to 10s more than the
worker timeout. This value should never be set less than the worker timeout.
PAPERLESS_TIME_ZONE=<timezone> PAPERLESS_TIME_ZONE=<timezone>
Set the time zone here. Set the time zone here.
@@ -576,6 +618,38 @@ PAPERLESS_CONSUMER_SUBDIRS_AS_TAGS=<bool>
Defaults to false. Defaults to false.
PAPERLESS_CONSUMER_ENABLE_BARCODES=<bool>
Enables the scanning and page separation based on detected barcodes.
This allows for scanning and adding multiple documents per uploaded
file, which are separated by one or multiple barcode pages.
For ease of use, it is suggested to use a standardized separation page,
e.g. `here <https://www.alliancegroup.co.uk/patch-codes.htm>`_.
If no barcodes are detected in the uploaded file, no page separation
will happen.
The original document will be removed and the separated pages will be
saved as pdf.
Defaults to false.
PAPERLESS_CONSUMER_BARCODE_TIFF_SUPPORT=<bool>
Whether TIFF image files should be scanned for barcodes.
This will automatically convert any TIFF image(s) to pdfs for later
processing.
This only has an effect, if PAPERLESS_CONSUMER_ENABLE_BARCODES has been
enabled.
Defaults to false.
PAPERLESS_CONSUMER_BARCODE_STRING=PATCHT
Defines the string to be detected as a separator barcode.
If paperless is used with the PATCH-T separator pages, users
shouldn't change this.
Defaults to "PATCHT"
PAPERLESS_CONVERT_MEMORY_LIMIT=<num> PAPERLESS_CONVERT_MEMORY_LIMIT=<num>
On smaller systems, or even in the case of Very Large Documents, the consumer On smaller systems, or even in the case of Very Large Documents, the consumer
@@ -659,7 +733,7 @@ PAPERLESS_CONSUMER_IGNORE_PATTERNS=<json>
This can be adjusted by configuring a custom json array with patterns to exclude. This can be adjusted by configuring a custom json array with patterns to exclude.
Defautls to ``[".DS_STORE/*", "._*", ".stfolder/*"]``. Defaults to ``[".DS_STORE/*", "._*", ".stfolder/*", ".stversions/*", ".localized/*", "desktop.ini"]``.
Binaries Binaries
######## ########
@@ -752,3 +826,26 @@ PAPERLESS_OCR_LANGUAGES=<list>
PAPERLESS_OCR_LANGUAGE=tur PAPERLESS_OCR_LANGUAGE=tur
Defaults to none, which does not install any additional languages. Defaults to none, which does not install any additional languages.
.. _configuration-update-checking:
Update Checking
###############
PAPERLESS_ENABLE_UPDATE_CHECK=<bool>
Enable (or disable) the automatic check for available updates. This feature is disabled
by default but if it is not explicitly set Paperless-ngx will show a message about this.
If enabled, the feature works by pinging the the Github API for the latest release e.g.
https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest
to determine whether a new version is available.
Actual updating of the app must still be performed manually.
Note that for users of thirdy-party containers e.g. linuxserver.io this notification
may be 'ahead' of a new release from the third-party maintainers.
In either case, no tracking data is collected by the app in any way.
Defaults to none, which disables the feature.

View File

@@ -34,6 +34,8 @@ it fixed for everyone!
Before contributing please review our `code of conduct`_ and other important Before contributing please review our `code of conduct`_ and other important
information in the `contributing guidelines`_. information in the `contributing guidelines`_.
.. _code-formatting-with-pre-commit-hooks:
Code formatting with pre-commit Hooks Code formatting with pre-commit Hooks
===================================== =====================================
@@ -85,6 +87,7 @@ To do the setup you need to perform the steps from the following chapters in a c
docker run -d -p 6379:6379 --restart unless-stopped redis:latest docker run -d -p 6379:6379 --restart unless-stopped redis:latest
7. Install the python dependencies by performing in the src/ directory. 7. Install the python dependencies by performing in the src/ directory.
.. code:: shell-session .. code:: shell-session
pipenv install --dev pipenv install --dev
@@ -139,8 +142,9 @@ Testing and code style:
* Run ``pytest`` in the src/ directory to execute all tests. This also generates a HTML coverage * Run ``pytest`` in the src/ directory to execute all tests. This also generates a HTML coverage
report. When runnings test, paperless.conf is loaded as well. However: the tests rely on the default report. When runnings test, paperless.conf is loaded as well. However: the tests rely on the default
configuration. This is not ideal. But for now, make sure no settings except for DEBUG are overridden when testing. configuration. This is not ideal. But for now, make sure no settings except for DEBUG are overridden when testing.
* Run ``black`` to format your code. * Coding style is enforced by the Git pre-commit hooks. These will ensure your code is formatted and do some
* Run ``pycodestyle`` to test your code for issues with the configured code style settings. linting when you do a `git commit`.
* You can also run ``black`` manually to format your code
.. note:: .. note::
@@ -182,6 +186,31 @@ X-Frame-Options are in place so that the front end behaves exactly as in product
relies on you being logged into the back end. Without a valid session, The front end will simply relies on you being logged into the back end. Without a valid session, The front end will simply
not work. not work.
Testing and code style:
* The frontend code (.ts, .html, .scss) use ``prettier`` for code formatting via the Git
``pre-commit`` hooks which run automatically on commit. See
:ref:`above <code-formatting-with-pre-commit-hooks>` for installation. You can also run this
via cli with a command such as
.. code:: shell-session
$ git ls-files -- '*.ts' | xargs pre-commit run prettier --files
* Frontend testing uses jest and cypress. There is currently a need for significantly more
frontend tests. Unit tests and e2e tests, respectively, can be run non-interactively with:
.. code:: shell-session
$ ng test
$ npm run e2e:ci
Cypress also includes a UI which can be run from within the ``src-ui`` directory with
.. code:: shell-session
$ ./node_modules/.bin/cypress open
In order to build the front end and serve it as part of django, execute In order to build the front end and serve it as part of django, execute
.. code:: shell-session .. code:: shell-session
@@ -305,11 +334,17 @@ directory.
Building the Docker image Building the Docker image
========================= =========================
The docker image is primarily built by the GitHub actions workflow, but it can be
faster when developing to build and tag an image locally.
To provide the build arguments automatically, build the image using the helper
script ``build-docker-image.sh``.
Building the docker image from source: Building the docker image from source:
.. code:: shell-session .. code:: shell-session
docker build . -t <your-tag> ./build-docker-image.sh Dockerfile -t <your-tag>
Extending Paperless Extending Paperless
=================== ===================

View File

@@ -5,11 +5,11 @@ Frequently asked questions
**Q:** *What's the general plan for Paperless-ngx?* **Q:** *What's the general plan for Paperless-ngx?*
**A:** While Paperless-ngx is already considered largely "feature-complete" it is a community-driven **A:** While Paperless-ngx is already considered largely "feature-complete" it is a community-driven
project and development will be guided in this way. New features can be submitted via project and development will be guided in this way. New features can be submitted via
GitHub discussions and "up-voted" by the community but this is not a garauntee the feature GitHub discussions and "up-voted" by the community but this is not a guarantee the feature
will be implemented. This project will always be open to collaboration in the form of PRs, will be implemented. This project will always be open to collaboration in the form of PRs,
ideas etc. ideas etc.
**Q:** *I'm using docker. Where are my documents?* **Q:** *I'm using docker. Where are my documents?*
@@ -81,11 +81,10 @@ python requirements do not have precompiled packages for ARM / ARM64. Installati
of these will require additional development libraries and compilation will take of these will require additional development libraries and compilation will take
a long time. a long time.
**Q:** *How do I run this on unRaid?* **Q:** *How do I run this on Unraid?*
**A:** Head over to `<https://github.com/selfhosters/unRAID-CA-templates>`_, **A:** Paperless-ngx is available as `community app <https://unraid.net/community/apps?q=paperless-ngx>`_
`Uli Fahrer <https://github.com/Tooa>`_ created a container template for that. in Unraid. `Uli Fahrer <https://github.com/Tooa>`_ created a container template for that.
I don't exactly know how to use that though, since I don't use unRaid.
**Q:** *How do I run this on my toaster?* **Q:** *How do I run this on my toaster?*

View File

@@ -13,43 +13,43 @@ that works right for you based on recommendations from other Paperless users.
Physical scanners Physical scanners
================= =================
+---------+----------------+-----+-----+-----+------+----------+----------------+ +---------+----------------+-----+------+-----+-----+------+----------+----------------+
| Brand | Model | Supports | Recommended By | | Brand | Model | Supports | Recommended By |
+---------+----------------+-----+-----+-----+------+----------+----------------+ +---------+----------------+-----+------+-----+-----+------+----------+----------------+
| | | FTP | NFS | SMB | SMTP | API [1]_ | | | | | FTP | SFTP | NFS | SMB | SMTP | API [1]_ | |
+=========+================+=====+=====+=====+======+==========+================+ +=========+================+=====+======+=====+=====+======+==========+================+
| Brother | `ADS-1700W`_ | yes | | yes | yes | |`holzhannes`_ | | Brother | `ADS-1700W`_ | yes | | | yes | yes | |`holzhannes`_ |
+---------+----------------+-----+-----+-----+------+----------+----------------+ +---------+----------------+-----+------+-----+-----+------+----------+----------------+
| Brother | `ADS-1600W`_ | yes | | yes | yes | |`holzhannes`_ | | Brother | `ADS-1600W`_ | yes | | | yes | yes | |`holzhannes`_ |
+---------+----------------+-----+-----+-----+------+----------+----------------+ +---------+----------------+-----+------+-----+-----+------+----------+----------------+
| Brother | `ADS-1500W`_ | yes | | yes | yes | |`danielquinn`_ | | Brother | `ADS-1500W`_ | yes | | | yes | yes | |`danielquinn`_ |
+---------+----------------+-----+-----+-----+------+----------+----------------+ +---------+----------------+-----+------+-----+-----+------+----------+----------------+
| Brother | `ADS-1100W`_ | yes | | | | |`ytzelf`_ | | Brother | `ADS-1100W`_ | yes | | | | | |`ytzelf`_ |
+---------+----------------+-----+-----+-----+------+----------+----------------+ +---------+----------------+-----+------+-----+-----+------+----------+----------------+
| Brother | `ADS-2800W`_ | yes | yes | | yes | yes |`philpagel`_ | | Brother | `ADS-2800W`_ | yes | yes | | yes | yes | |`philpagel`_ |
+---------+----------------+-----+-----+-----+------+----------+----------------+ +---------+----------------+-----+------+-----+-----+------+----------+----------------+
| Brother | `MFC-J6930DW`_ | yes | | | | |`ayounggun`_ | | Brother | `MFC-J6930DW`_ | yes | | | | | |`ayounggun`_ |
+---------+----------------+-----+-----+-----+------+----------+----------------+ +---------+----------------+-----+------+-----+-----+------+----------+----------------+
| Brother | `MFC-L5850DW`_ | yes | | | yes | |`holzhannes`_ | | Brother | `MFC-L5850DW`_ | yes | | | | yes | |`holzhannes`_ |
+---------+----------------+-----+-----+-----+------+----------+----------------+ +---------+----------------+-----+------+-----+-----+------+----------+----------------+
| Brother | `MFC-L2750DW`_ | yes | | yes | yes | |`muued`_ | | Brother | `MFC-L2750DW`_ | yes | | | yes | yes | |`muued`_ |
+---------+----------------+-----+-----+-----+------+----------+----------------+ +---------+----------------+-----+------+-----+-----+------+----------+----------------+
| Brother | `MFC-J5910DW`_ | yes | | | | |`bmsleight`_ | | Brother | `MFC-J5910DW`_ | yes | | | | | |`bmsleight`_ |
+---------+----------------+-----+-----+-----+------+----------+----------------+ +---------+----------------+-----+------+-----+-----+------+----------+----------------+
| Brother | `MFC-8950DW`_ | yes | | | yes | yes |`philpagel`_ | | Brother | `MFC-8950DW`_ | yes | | | yes | yes | |`philpagel`_ |
+---------+----------------+-----+-----+-----+------+----------+----------------+ +---------+----------------+-----+------+-----+-----+------+----------+----------------+
| Brother | `MFC-9142CDN`_ | yes | | yes | | |`REOLDEV`_ | | Brother | `MFC-9142CDN`_ | yes | | | yes | | |`REOLDEV`_ |
+---------+----------------+-----+-----+-----+------+----------+----------------+ +---------+----------------+-----+------+-----+-----+------+----------+----------------+
| Fujitsu | `ix500`_ | yes | | yes | | |`eonist`_ | | Fujitsu | `ix500`_ | yes | | | yes | | |`eonist`_ |
+---------+----------------+-----+-----+-----+------+----------+----------------+ +---------+----------------+-----+------+-----+-----+------+----------+----------------+
| Epson | `ES-580W`_ | yes | | yes | yes | |`fignew`_ | | Epson | `ES-580W`_ | yes | | | yes | yes | |`fignew`_ |
+---------+----------------+-----+-----+-----+------+----------+----------------+ +---------+----------------+-----+------+-----+-----+------+----------+----------------+
| Epson | `WF-7710DWF`_ | yes | | yes | | |`Skylinar`_ | | Epson | `WF-7710DWF`_ | yes | | | yes | | |`Skylinar`_ |
+---------+----------------+-----+-----+-----+------+----------+----------------+ +---------+----------------+-----+------+-----+-----+------+----------+----------------+
| Fujitsu | `S1300i`_ | yes | | yes | | |`jonaswinkler`_ | | Fujitsu | `S1300i`_ | yes | | | yes | | |`jonaswinkler`_ |
+---------+----------------+-----+-----+-----+------+----------+----------------+ +---------+----------------+-----+------+-----+-----+------+----------+----------------+
| Doxie | `Q2`_ | | | | | yes |`Unkn0wnCat`_ | | Doxie | `Q2`_ | | | | | | yes |`Unkn0wnCat`_ |
+---------+----------------+-----+-----+-----+------+----------+----------------+ +---------+----------------+-----+------+-----+-----+------+----------+----------------+
.. _MFC-L5850DW: https://www.brother-usa.com/products/mfcl5850dw .. _MFC-L5850DW: https://www.brother-usa.com/products/mfcl5850dw
.. _MFC-L2750DW: https://www.brother.de/drucker/laserdrucker/mfc-l2750dw .. _MFC-L2750DW: https://www.brother.de/drucker/laserdrucker/mfc-l2750dw
@@ -131,4 +131,3 @@ This part assumes your Doxie is connected to WiFi and you know its IP.
6. Click *Submit* at the bottom of the page 6. Click *Submit* at the bottom of the page
Congrats, you can now scan directly from your Doxie to your Paperless-ngx instance! Congrats, you can now scan directly from your Doxie to your Paperless-ngx instance!

View File

@@ -110,7 +110,7 @@ performs all the steps described in :ref:`setup-docker_hub` automatically.
.. code:: shell-session .. code:: shell-session
$ bash -c "$(curl -L https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/master/install-paperless-ngx.sh)" $ bash -c "$(curl -L https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/install-paperless-ngx.sh)"
.. _setup-docker_hub: .. _setup-docker_hub:
@@ -291,12 +291,14 @@ writing. Windows is not and will never be supported.
* ``libpq-dev`` for PostgreSQL * ``libpq-dev`` for PostgreSQL
* ``libmagic-dev`` for mime type detection * ``libmagic-dev`` for mime type detection
* ``mime-support`` for mime type detection * ``mime-support`` for mime type detection
* ``libzbar0`` for barcode detection
* ``poppler-utils`` for barcode detection
Use this list for your preferred package management: Use this list for your preferred package management:
.. code:: .. code::
python3 python3-pip python3-dev imagemagick fonts-liberation optipng gnupg libpq-dev libmagic-dev mime-support python3 python3-pip python3-dev imagemagick fonts-liberation optipng gnupg libpq-dev libmagic-dev mime-support libzbar0 poppler-utils
These dependencies are required for OCRmyPDF, which is used for text recognition. These dependencies are required for OCRmyPDF, which is used for text recognition.
@@ -345,6 +347,8 @@ writing. Windows is not and will never be supported.
paperless stores its data. If you like, you can point both to the same directory. paperless stores its data. If you like, you can point both to the same directory.
* ``PAPERLESS_SECRET_KEY`` should be a random sequence of characters. It's used for authentication. Failure * ``PAPERLESS_SECRET_KEY`` should be a random sequence of characters. It's used for authentication. Failure
to do so allows third parties to forge authentication credentials. to do so allows third parties to forge authentication credentials.
* ``PAPERLESS_URL`` if you are behind a reverse proxy. This should point to your domain. Please see
:ref:`configuration` for more information.
Many more adjustments can be made to paperless, especially the OCR part. The following options are recommended Many more adjustments can be made to paperless, especially the OCR part. The following options are recommended
for everyone: for everyone:
@@ -477,7 +481,7 @@ Migrating from Paperless-ng
=========================== ===========================
Paperless-ngx is meant to be a drop-in replacement for Paperless-ng and thus upgrading should be Paperless-ngx is meant to be a drop-in replacement for Paperless-ng and thus upgrading should be
trivial for most users, especially when using docker. However, as with any major change, it is trivial for most users, especially when using docker. However, as with any major change, it is
recommended to take a full backup first. Once you are ready, simply change the docker image to recommended to take a full backup first. Once you are ready, simply change the docker image to
point to the new source. E.g. if using Docker Compose, edit ``docker-compose.yml`` and change: point to the new source. E.g. if using Docker Compose, edit ``docker-compose.yml`` and change:
@@ -490,12 +494,12 @@ to
.. code:: .. code::
image: ghcr.io/paperless-ngx/paperless-ngx:latest image: ghcr.io/paperless-ngx/paperless-ngx:latest
and then run ``docker-compose up -d`` which will pull the new image recreate the container. and then run ``docker-compose up -d`` which will pull the new image recreate the container.
That's it! That's it!
Users who installed with the bare-metal route should also update their Git clone to point to Users who installed with the bare-metal route should also update their Git clone to point to
``https://github.com/paperless-ngx/paperless-ngx``, e.g. using the command ``https://github.com/paperless-ngx/paperless-ngx``, e.g. using the command
``git remote set-url origin https://github.com/paperless-ngx/paperless-ngx`` and then pull the ``git remote set-url origin https://github.com/paperless-ngx/paperless-ngx`` and then pull the
lastest version. lastest version.
@@ -782,4 +786,6 @@ the following configuration is required for paperless to operate:
} }
} }
The ``PAPERLESS_URL`` configuration variable is also required when using a reverse proxy. Please refer to the :ref:`hosting-and-security` docs.
Also read `this <https://channels.readthedocs.io/en/stable/deploying.html#nginx-supervisor-ubuntu>`__, towards the end of the section. Also read `this <https://channels.readthedocs.io/en/stable/deploying.html#nginx-supervisor-ubuntu>`__, towards the end of the section.

View File

@@ -119,17 +119,18 @@ You may experience these errors when using the optional TIKA integration:
Gotenberg is a server that converts Office documents into PDF documents and has a default timeout of 30 seconds. Gotenberg is a server that converts Office documents into PDF documents and has a default timeout of 30 seconds.
When conversion takes longer, Gotenberg raises this error. When conversion takes longer, Gotenberg raises this error.
You can increase the timeout by configuring an environment variable for Gotenberg (see also `here <https://gotenberg.dev/docs/modules/api#properties>`__). You can increase the timeout by configuring a command flag for Gotenberg (see also `here <https://gotenberg.dev/docs/modules/api#properties>`__).
If using docker-compose, this is achieved by the following configuration change in the ``docker-compose.yml`` file: If using docker-compose, this is achieved by the following configuration change in the ``docker-compose.yml`` file:
.. code:: yaml .. code:: yaml
gotenberg: gotenberg:
image: gotenberg/gotenberg:7 image: gotenberg/gotenberg:7.4
restart: unless-stopped restart: unless-stopped
environment: command:
CHROMIUM_DISABLE_ROUTES: 1 - "gotenberg"
API_PROCESS_TIMEOUT: 60 - "--chromium-disable-routes=true"
- "--api-timeout=60"
Permission denied errors in the consumption directory Permission denied errors in the consumption directory
##################################################### #####################################################

View File

@@ -62,7 +62,7 @@ your documents:
1. OCR the document, if it has no text. Digital documents usually have text, 1. OCR the document, if it has no text. Digital documents usually have text,
and this step will be skipped for those documents. and this step will be skipped for those documents.
2. Paperless will create an archiveable PDF/A document from your document. 2. Paperless will create an archivable PDF/A document from your document.
If this document is coming from your scanner, it will have embedded selectable text. If this document is coming from your scanner, it will have embedded selectable text.
3. Paperless performs automatic matching of tags, correspondents and types on the 3. Paperless performs automatic matching of tags, correspondents and types on the
document before storing it in the database. document before storing it in the database.
@@ -180,6 +180,15 @@ These are as follows:
automatically or manually and tell paperless to move them to yet another folder automatically or manually and tell paperless to move them to yet another folder
after consumption. It's up to you. after consumption. It's up to you.
.. note::
When defining a mail rule with a folder, you may need to try different characters to
define how the sub-folders are separated. Common values include ".", "/" or "|", but
this varies by the mail server. Check the documentation for your mail server. In the
event of an error fetching mail from a certain folder, check the Paperless logs. When
a folder is not located, Paperless will attempt to list all folders found in the account
to the Paperless logs.
.. note:: .. note::
Paperless will process the rules in the order defined in the admin page. Paperless will process the rules in the order defined in the admin page.

View File

@@ -24,7 +24,7 @@ def worker_int(worker):
## get traceback info ## get traceback info
import threading, sys, traceback import threading, sys, traceback
id2name = dict([(th.ident, th.name) for th in threading.enumerate()]) id2name = {th.ident: th.name for th in threading.enumerate()}
code = [] code = []
for threadId, stack in sys._current_frames().items(): for threadId, stack in sys._current_frames().items():
code.append("\n# Thread: %s(%d)" % (id2name.get(threadId, ""), threadId)) code.append("\n# Thread: %s(%d)" % (id2name.get(threadId, ""), threadId))

View File

@@ -1,18 +1,18 @@
#!/bin/bash #!/usr/bin/env bash
ask() { ask() {
while true ; do while true ; do
if [[ -z $3 ]] ; then if [[ -z $3 ]] ; then
read -p "$1 [$2]: " result read -r -p "$1 [$2]: " result
else else
read -p "$1 ($3) [$2]: " result read -r -p "$1 ($3) [$2]: " result
fi fi
if [[ -z $result ]]; then if [[ -z $result ]]; then
ask_result=$2 ask_result=$2
return return
fi fi
array=$3 array=$3
if [[ -z $3 || " ${array[@]} " =~ " ${result} " ]]; then if [[ -z $3 || " ${array[*]} " =~ ${result} ]]; then
ask_result=$result ask_result=$result
return return
else else
@@ -24,7 +24,7 @@ ask() {
ask_docker_folder() { ask_docker_folder() {
while true ; do while true ; do
read -p "$1 [$2]: " result read -r -p "$1 [$2]: " result
if [[ -z $result ]]; then if [[ -z $result ]]; then
ask_result=$2 ask_result=$2
@@ -47,25 +47,29 @@ if [[ $(id -u) == "0" ]] ; then
exit 1 exit 1
fi fi
if [[ -z $(which wget) ]] ; then if ! command -v wget &> /dev/null ; then
echo "wget executable not found. Is wget installed?" echo "wget executable not found. Is wget installed?"
exit 1 exit 1
fi fi
if [[ -z $(which docker) ]] ; then if ! command -v docker &> /dev/null ; then
echo "docker executable not found. Is docker installed?" echo "docker executable not found. Is docker installed?"
exit 1 exit 1
fi fi
if [[ -z $(which docker-compose) ]] ; then DOCKER_COMPOSE_CMD="docker-compose"
echo "docker-compose executable not found. Is docker-compose installed?" if ! command -v ${DOCKER_COMPOSE_CMD} ; then
exit 1 if docker compose version &> /dev/null ; then
DOCKER_COMPOSE_CMD="docker compose"
else
echo "docker-compose executable not found. Is docker-compose installed?"
exit 1
fi
fi fi
# Check if user has permissions to run Docker by trying to get the status of Docker (docker status). # Check if user has permissions to run Docker by trying to get the status of Docker (docker status).
# If this fails, the user probably does not have permissions for Docker. # If this fails, the user probably does not have permissions for Docker.
docker stats --no-stream 2>/dev/null 1>&2 if ! docker stats --no-stream &> /dev/null ; then
if [ $? -ne 0 ] ; then
echo "" echo ""
echo "WARN: It look like the current user does not have Docker permissions." echo "WARN: It look like the current user does not have Docker permissions."
echo "WARN: Use 'sudo usermod -aG docker $USER' to assign Docker permissions to the user." echo "WARN: Use 'sudo usermod -aG docker $USER' to assign Docker permissions to the user."
@@ -88,6 +92,14 @@ echo ""
echo "1. Application configuration" echo "1. Application configuration"
echo "============================" echo "============================"
echo ""
echo "The URL paperless will be available at. This is required if the"
echo "installation will be accessible via the web, otherwise can be left blank."
echo ""
ask "URL" ""
URL=$ask_result
echo "" echo ""
echo "The port on which the paperless webserver will listen for incoming" echo "The port on which the paperless webserver will listen for incoming"
echo "connections." echo "connections."
@@ -162,7 +174,7 @@ ask "Target folder" "$(pwd)/paperless-ngx"
TARGET_FOLDER=$ask_result TARGET_FOLDER=$ask_result
echo "" echo ""
echo "The consume folder is where paperles will search for new documents." echo "The consume folder is where paperless will search for new documents."
echo "Point this to a folder where your scanner is able to put your scanned" echo "Point this to a folder where your scanner is able to put your scanned"
echo "documents." echo "documents."
echo "" echo ""
@@ -228,7 +240,7 @@ ask "Paperless username" "$(whoami)"
USERNAME=$ask_result USERNAME=$ask_result
while true; do while true; do
read -sp "Paperless password: " PASSWORD read -r -sp "Paperless password: " PASSWORD
echo "" echo ""
if [[ -z $PASSWORD ]] ; then if [[ -z $PASSWORD ]] ; then
@@ -236,7 +248,7 @@ while true; do
continue continue
fi fi
read -sp "Paperless password (again): " PASSWORD_REPEAT read -r -sp "Paperless password (again): " PASSWORD_REPEAT
echo "" echo ""
if [[ ! "$PASSWORD" == "$PASSWORD_REPEAT" ]] ; then if [[ ! "$PASSWORD" == "$PASSWORD_REPEAT" ]] ; then
@@ -274,6 +286,7 @@ if [[ "$DATABASE_BACKEND" == "postgres" ]] ; then
fi fi
fi fi
echo "" echo ""
echo "URL: $URL"
echo "Port: $PORT" echo "Port: $PORT"
echo "Database: $DATABASE_BACKEND" echo "Database: $DATABASE_BACKEND"
echo "Tika enabled: $TIKA_ENABLED" echo "Tika enabled: $TIKA_ENABLED"
@@ -285,7 +298,7 @@ echo "Paperless username: $USERNAME"
echo "Paperless email: $EMAIL" echo "Paperless email: $EMAIL"
echo "" echo ""
read -p "Press any key to install." read -r -p "Press any key to install."
echo "" echo ""
echo "Installing paperless..." echo "Installing paperless..."
@@ -301,14 +314,20 @@ if [[ $TIKA_ENABLED == "yes" ]] ; then
DOCKER_COMPOSE_VERSION="$DOCKER_COMPOSE_VERSION-tika" DOCKER_COMPOSE_VERSION="$DOCKER_COMPOSE_VERSION-tika"
fi fi
wget "https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/master/docker/compose/docker-compose.$DOCKER_COMPOSE_VERSION.yml" -O docker-compose.yml wget "https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/docker/compose/docker-compose.$DOCKER_COMPOSE_VERSION.yml" -O docker-compose.yml
wget "https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/master/docker/compose/.env" -O .env wget "https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/docker/compose/.env" -O .env
SECRET_KEY=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 64 | head -n 1) SECRET_KEY=$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 64 | head -n 1)
DEFAULT_LANGUAGES="deu eng fra ita spa" DEFAULT_LANGUAGES=("deu eng fra ita spa")
_split_langs="${OCR_LANGUAGE//+/ }"
read -r -a OCR_LANGUAGES_ARRAY <<< "${_split_langs}"
{ {
if [[ ! $URL == "" ]] ; then
echo "PAPERLESS_URL=$URL"
fi
if [[ ! $USERMAP_UID == "1000" ]] ; then if [[ ! $USERMAP_UID == "1000" ]] ; then
echo "USERMAP_UID=$USERMAP_UID" echo "USERMAP_UID=$USERMAP_UID"
fi fi
@@ -318,8 +337,8 @@ DEFAULT_LANGUAGES="deu eng fra ita spa"
echo "PAPERLESS_TIME_ZONE=$TIME_ZONE" echo "PAPERLESS_TIME_ZONE=$TIME_ZONE"
echo "PAPERLESS_OCR_LANGUAGE=$OCR_LANGUAGE" echo "PAPERLESS_OCR_LANGUAGE=$OCR_LANGUAGE"
echo "PAPERLESS_SECRET_KEY=$SECRET_KEY" echo "PAPERLESS_SECRET_KEY=$SECRET_KEY"
if [[ ! " ${DEFAULT_LANGUAGES[@]} " =~ " ${OCR_LANGUAGE} " ]] ; then if [[ ! ${DEFAULT_LANGUAGES[*]} =~ ${OCR_LANGUAGES_ARRAY[*]} ]] ; then
echo "PAPERLESS_OCR_LANGUAGES=$OCR_LANGUAGE" echo "PAPERLESS_OCR_LANGUAGES=${OCR_LANGUAGES_ARRAY[*]}"
fi fi
} > docker-compose.env } > docker-compose.env
@@ -329,18 +348,31 @@ sed -i "s#- \./consume:/usr/src/paperless/consume#- $CONSUME_FOLDER:/usr/src/pap
if [[ -n $MEDIA_FOLDER ]] ; then if [[ -n $MEDIA_FOLDER ]] ; then
sed -i "s#- media:/usr/src/paperless/media#- $MEDIA_FOLDER:/usr/src/paperless/media#g" docker-compose.yml sed -i "s#- media:/usr/src/paperless/media#- $MEDIA_FOLDER:/usr/src/paperless/media#g" docker-compose.yml
sed -i "/^\s*media:/d" docker-compose.yml
fi fi
if [[ -n $DATA_FOLDER ]] ; then if [[ -n $DATA_FOLDER ]] ; then
sed -i "s#- data:/usr/src/paperless/data#- $DATA_FOLDER:/usr/src/paperless/data#g" docker-compose.yml sed -i "s#- data:/usr/src/paperless/data#- $DATA_FOLDER:/usr/src/paperless/data#g" docker-compose.yml
sed -i "/^\s*data:/d" docker-compose.yml
fi fi
if [[ -n $POSTGRES_FOLDER ]] ; then if [[ -n $POSTGRES_FOLDER ]] ; then
sed -i "s#- pgdata:/var/lib/postgresql/data#- $POSTGRES_FOLDER:/var/lib/postgresql/data#g" docker-compose.yml sed -i "s#- pgdata:/var/lib/postgresql/data#- $POSTGRES_FOLDER:/var/lib/postgresql/data#g" docker-compose.yml
sed -i "/^\s*pgdata:/d" docker-compose.yml
fi fi
docker-compose pull # remove trailing blank lines from end of file
sed -i -e :a -e '/^\n*$/{$d;N;};/\n$/ba' docker-compose.yml
# if last line in file contains "volumes:", remove that line since no more named volumes are left
l1=$(grep -n '^volumes:' docker-compose.yml | cut -d : -f 1) # get line number containing volume: at begin of line
l2=$(wc -l < docker-compose.yml) # get total number of lines
if [ "$l1" -eq "$l2" ] ; then
sed -i "/^volumes:/d" docker-compose.yml
fi
docker-compose run --rm -e DJANGO_SUPERUSER_PASSWORD="$PASSWORD" webserver createsuperuser --noinput --username "$USERNAME" --email "$EMAIL"
docker-compose up -d ${DOCKER_COMPOSE_CMD} pull
${DOCKER_COMPOSE_CMD} run --rm -e DJANGO_SUPERUSER_PASSWORD="$PASSWORD" webserver createsuperuser --noinput --username "$USERNAME" --email "$EMAIL"
${DOCKER_COMPOSE_CMD} up -d

View File

@@ -27,8 +27,10 @@
# Security and hosting # Security and hosting
#PAPERLESS_SECRET_KEY=change-me #PAPERLESS_SECRET_KEY=change-me
#PAPERLESS_ALLOWED_HOSTS=example.com,www.example.com #PAPERLESS_URL=https://example.com
#PAPERLESS_CORS_ALLOWED_HOSTS=http://example.com,http://localhost:8000 #PAPERLESS_CSRF_TRUSTED_ORIGINS=https://example.com # can be set using PAPERLESS_URL
#PAPERLESS_ALLOWED_HOSTS=example.com,www.example.com # can be set using PAPERLESS_URL
#PAPERLESS_CORS_ALLOWED_HOSTS=https://localhost:8080,https://example.com # can be set using PAPERLESS_URL
#PAPERLESS_FORCE_SCRIPT_NAME= #PAPERLESS_FORCE_SCRIPT_NAME=
#PAPERLESS_STATIC_URL=/static/ #PAPERLESS_STATIC_URL=/static/
#PAPERLESS_AUTO_LOGIN_USERNAME= #PAPERLESS_AUTO_LOGIN_USERNAME=
@@ -58,8 +60,10 @@
#PAPERLESS_CONSUMER_POLLING=10 #PAPERLESS_CONSUMER_POLLING=10
#PAPERLESS_CONSUMER_DELETE_DUPLICATES=false #PAPERLESS_CONSUMER_DELETE_DUPLICATES=false
#PAPERLESS_CONSUMER_RECURSIVE=false #PAPERLESS_CONSUMER_RECURSIVE=false
#PAPERLESS_CONSUMER_IGNORE_PATTERNS=[".DS_STORE/*", "._*", ".stfolder/*"] #PAPERLESS_CONSUMER_IGNORE_PATTERNS=[".DS_STORE/*", "._*", ".stfolder/*", ".stversions/*", ".localized/*", "desktop.ini"]
#PAPERLESS_CONSUMER_SUBDIRS_AS_TAGS=false #PAPERLESS_CONSUMER_SUBDIRS_AS_TAGS=false
#PAPERLESS_CONSUMER_ENABLE_BARCODES=false
#PAPERLESS_CONSUMER_ENABLE_BARCODES=PATCHT
#PAPERLESS_OPTIMIZE_THUMBNAILS=true #PAPERLESS_OPTIMIZE_THUMBNAILS=true
#PAPERLESS_PRE_CONSUME_SCRIPT=/path/to/an/arbitrary/script.sh #PAPERLESS_PRE_CONSUME_SCRIPT=/path/to/an/arbitrary/script.sh
#PAPERLESS_POST_CONSUME_SCRIPT=/path/to/an/arbitrary/script.sh #PAPERLESS_POST_CONSUME_SCRIPT=/path/to/an/arbitrary/script.sh
@@ -67,6 +71,7 @@
#PAPERLESS_FILENAME_PARSE_TRANSFORMS=[] #PAPERLESS_FILENAME_PARSE_TRANSFORMS=[]
#PAPERLESS_THUMBNAIL_FONT_NAME= #PAPERLESS_THUMBNAIL_FONT_NAME=
#PAPERLESS_IGNORE_DATES= #PAPERLESS_IGNORE_DATES=
#PAPERLESS_ENABLE_UPDATE_CHECK=
# Tika settings # Tika settings

View File

@@ -8,46 +8,47 @@
-i https://pypi.python.org/simple -i https://pypi.python.org/simple
--extra-index-url https://www.piwheels.org/simple --extra-index-url https://www.piwheels.org/simple
aioredis==1.3.1 aioredis==1.3.1
anyio==3.5.0; python_full_version >= '3.6.2'
arrow==1.2.2; python_version >= '3.6' arrow==1.2.2; python_version >= '3.6'
asgiref==3.5.0; python_version >= '3.7' asgiref==3.5.1; python_version >= '3.7'
async-timeout==4.0.2; python_version >= '3.6' async-timeout==4.0.2; python_version >= '3.6'
attrs==21.4.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' attrs==21.4.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
autobahn==22.2.2; python_version >= '3.7' autobahn==22.3.2; python_version >= '3.7'
automat==20.2.0 automat==20.2.0
backports.zoneinfo==0.2.1 backports.zoneinfo==0.2.1; python_version < '3.9'
blessed==1.19.1; python_version >= '2.7' blessed==1.19.1; python_version >= '2.7'
certifi==2021.10.8 certifi==2021.10.8
cffi==1.15.0 cffi==1.15.0
channels-redis==3.3.1 channels-redis==3.4.0
channels==3.0.4 channels==3.0.4
chardet==4.0.0; python_version >= '3.1' chardet==4.0.0; python_version >= '3.1'
charset-normalizer==2.0.12; python_version >= '3' charset-normalizer==2.0.12; python_version >= '3'
click==8.0.4; python_version >= '3.6' click==8.1.3; python_version >= '3.7'
coloredlogs==15.0.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' coloredlogs==15.0.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
concurrent-log-handler==0.9.20 concurrent-log-handler==0.9.20
constantly==15.1.0 constantly==15.1.0
cryptography==36.0.1 cryptography==37.0.1; python_version >= '3.6'
daphne==3.0.2; python_version >= '3.6' daphne==3.0.2; python_version >= '3.6'
dateparser==1.1.0 dateparser==1.1.1
django-cors-headers==3.11.0 django-cors-headers==3.11.0
django-extensions==3.1.5 django-extensions==3.1.5
django-filter==21.1 django-filter==21.1
django-picklefield==3.0.1; python_version >= '3' django-picklefield==3.0.1; python_version >= '3'
django-q==1.3.9 django-q==1.3.9
django==3.2.12 django==4.0.4
djangorestframework==3.13.1 djangorestframework==3.13.1
filelock==3.6.0 filelock==3.6.0
fuzzywuzzy[speedup]==0.18.0 fuzzywuzzy[speedup]==0.18.0
gunicorn==20.1.0 gunicorn==20.1.0
h11==0.13.0; python_version >= '3.6' h11==0.13.0; python_version >= '3.6'
hiredis==2.0.0; python_version >= '3.6' hiredis==2.0.0; python_version >= '3.6'
httptools==0.3.0 httptools==0.4.0
humanfriendly==10.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' humanfriendly==10.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
hyperlink==21.0.0 hyperlink==21.0.0
idna==3.3; python_version >= '3.5' idna==3.3; python_version >= '3'
imap-tools==0.51.1 imap-tools==0.54.0
img2pdf==0.4.3 img2pdf==0.4.4
importlib-resources==5.4.0; python_version < '3.9' importlib-resources==5.7.1; python_version < '3.9'
incremental==21.3.0 incremental==21.3.0
inotify-simple==1.3.5; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' inotify-simple==1.3.5; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
inotifyrecursive==0.3.5 inotifyrecursive==0.3.5
@@ -55,55 +56,58 @@ joblib==1.1.0; python_version >= '3.6'
langdetect==1.0.9 langdetect==1.0.9
lxml==4.8.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' lxml==4.8.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
msgpack==1.0.3 msgpack==1.0.3
numpy==1.22.2 numpy==1.22.3; python_version >= '3.8'
ocrmypdf==13.4.0 ocrmypdf==13.4.3
packaging==21.3; python_version >= '3.6' packaging==21.3; python_version >= '3.6'
pathvalidate==2.5.0 pathvalidate==2.5.0
pdfminer.six==20211012 pdf2image==1.16.0
pikepdf==5.0.1 pdfminer.six==20220319
pillow==9.0.1 pikepdf==5.1.2
pillow==9.1.0
pluggy==1.0.0; python_version >= '3.6' pluggy==1.0.0; python_version >= '3.6'
portalocker==2.4.0; python_version >= '3' portalocker==2.4.0; python_version >= '3'
psycopg2-binary==2.9.3 psycopg2==2.9.3
pyasn1-modules==0.2.8 pyasn1-modules==0.2.8
pyasn1==0.4.8 pyasn1==0.4.8
pycparser==2.21; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' pycparser==2.21
pyopenssl==22.0.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' pyopenssl==22.0.0
pyparsing==3.0.7; python_version >= '3.6' pyparsing==3.0.8; python_full_version >= '3.6.8'
python-dateutil==2.8.2 python-dateutil==2.8.2
python-dotenv==0.19.2 python-dotenv==0.20.0
python-gnupg==0.4.8 python-gnupg==0.4.8
python-levenshtein==0.12.2 python-levenshtein==0.12.2
python-magic==0.4.25 python-magic==0.4.25
pytz-deprecation-shim==0.1.0.post0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' pytz-deprecation-shim==0.1.0.post0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
pytz==2021.3 pytz==2022.1
pyyaml==6.0 pyyaml==6.0
pyzbar==0.1.9
redis==3.5.3 redis==3.5.3
regex==2022.1.18 regex==2022.3.2; python_version >= '3.6'
reportlab==3.6.7; python_version >= '3.6' and python_version < '4' reportlab==3.6.9; python_version >= '3.7' and python_version < '4'
requests==2.27.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' requests==2.27.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
scikit-learn==0.24.0 scikit-learn==1.0.2
scipy==1.8.0; python_version < '3.11' and python_version >= '3.8' scipy==1.8.0; python_version < '3.11' and python_version >= '3.8'
service-identity==21.1.0 service-identity==21.1.0
setuptools==60.9.3; python_version >= '3.7' setuptools==62.1.0; python_version >= '3.7'
six==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' six==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
sniffio==1.2.0; python_version >= '3.5'
sqlparse==0.4.2; python_version >= '3.5' sqlparse==0.4.2; python_version >= '3.5'
threadpoolctl==3.1.0; python_version >= '3.6' threadpoolctl==3.1.0; python_version >= '3.6'
tika==1.24 tika==1.24
tqdm==4.62.3 tqdm==4.64.0
twisted[tls]==22.1.0; python_full_version >= '3.6.7' twisted[tls]==22.4.0; python_full_version >= '3.6.7'
txaio==22.2.1; python_version >= '3.6' txaio==22.2.1; python_version >= '3.6'
typing-extensions==4.1.1; python_version >= '3.6' typing-extensions==4.2.0; python_version >= '3.7'
tzdata==2021.5; python_version >= '3.6' tzdata==2022.1; python_version >= '3.6'
tzlocal==4.1; python_version >= '3.6' tzlocal==4.2; python_version >= '3.6'
urllib3==1.26.8; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4' urllib3==1.26.9; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'
uvicorn[standard]==0.17.5 uvicorn[standard]==0.17.6
uvloop==0.16.0 uvloop==0.16.0
watchdog==2.1.6 watchdog==2.1.7
watchgod==0.7 watchgod==0.8.2
wcwidth==0.2.5 wcwidth==0.2.5
websockets==10.2 websockets==10.3
whitenoise==6.0.0 whitenoise==6.0.0
whoosh==2.7.4 whoosh==2.7.4
zipp==3.7.0; python_version < '3.10' zipp==3.8.0; python_version < '3.9'
zope.interface==5.4.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' zope.interface==5.4.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'

View File

@@ -1,4 +1,6 @@
#!/usr/bin/env bash
docker run -p 5432:5432 -e POSTGRES_PASSWORD=password -v paperless_pgdata:/var/lib/postgresql/data -d postgres:13 docker run -p 5432:5432 -e POSTGRES_PASSWORD=password -v paperless_pgdata:/var/lib/postgresql/data -d postgres:13
docker run -d -p 6379:6379 redis:latest docker run -d -p 6379:6379 redis:latest
docker run -p 3000:3000 -d gotenberg/gotenberg:7 docker run -p 3000:3000 -d gotenberg/gotenberg:7.4
docker run -p 9998:9998 -d apache/tika docker run -p 9998:9998 -d ghcr.io/paperless-ngx/tika:latest

4
src-ui/.gitignore vendored
View File

@@ -45,3 +45,7 @@ testem.log
# System Files # System Files
.DS_Store .DS_Store
Thumbs.db Thumbs.db
# Cypress
cypress/videos/**/*
cypress/screenshots/**/*

View File

@@ -16,6 +16,7 @@
"i18n": { "i18n": {
"sourceLocale": "en-US", "sourceLocale": "en-US",
"locales": { "locales": {
"be-BY": "src/locale/messages.be_BY.xlf",
"cs-CZ": "src/locale/messages.cs_CZ.xlf", "cs-CZ": "src/locale/messages.cs_CZ.xlf",
"da-DK": "src/locale/messages.da_DK.xlf", "da-DK": "src/locale/messages.da_DK.xlf",
"de-DE": "src/locale/messages.de_DE.xlf", "de-DE": "src/locale/messages.de_DE.xlf",
@@ -30,8 +31,12 @@
"pt-PT": "src/locale/messages.pt_PT.xlf", "pt-PT": "src/locale/messages.pt_PT.xlf",
"ro-RO": "src/locale/messages.ro_RO.xlf", "ro-RO": "src/locale/messages.ro_RO.xlf",
"ru-RU": "src/locale/messages.ru_RU.xlf", "ru-RU": "src/locale/messages.ru_RU.xlf",
"sv-SE": "src/locale/messages.sv_SE.xlf" "sl-SI": "src/locale/messages.sl_SI.xlf",
} "sr-CS": "src/locale/messages.sr_CS.xlf",
"sv-SE": "src/locale/messages.sv_SE.xlf",
"tr-TR": "src/locale/messages.tr_TR.xlf",
"zh-CN": "src/locale/messages.zh_CN.xlf"
}
}, },
"architect": { "architect": {
"build": { "build": {
@@ -121,12 +126,9 @@
} }
}, },
"test": { "test": {
"builder": "@angular-devkit/build-angular:karma", "builder": "@angular-builders/jest:run",
"options": { "options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json", "tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [ "assets": [
"src/favicon.ico", "src/favicon.ico",
"src/apple-touch-icon.png", "src/apple-touch-icon.png",
@@ -140,9 +142,21 @@
} }
}, },
"e2e": { "e2e": {
"builder": "@angular-devkit/build-angular:protractor", "builder": "@cypress/schematic:cypress",
"options": {
"devServerTarget": "paperless-ui:serve",
"watch": true,
"headless": false
},
"configurations": {
"production": {
"devServerTarget": "paperless-ui:serve:production"
}
}
},
"cypress-run": {
"builder": "@cypress/schematic:cypress",
"options": { "options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "paperless-ui:serve" "devServerTarget": "paperless-ui:serve"
}, },
"configurations": { "configurations": {
@@ -150,6 +164,13 @@
"devServerTarget": "paperless-ui:serve:production" "devServerTarget": "paperless-ui:serve:production"
} }
} }
},
"cypress-open": {
"builder": "@cypress/schematic:cypress",
"options": {
"watch": true,
"headless": false
}
} }
} }
} }

9
src-ui/cypress.json Normal file
View File

@@ -0,0 +1,9 @@
{
"integrationFolder": "cypress/integration",
"supportFile": "cypress/support/index.ts",
"videosFolder": "cypress/videos",
"screenshotsFolder": "cypress/screenshots",
"pluginsFile": "cypress/plugins/index.ts",
"fixturesFolder": "cypress/fixtures",
"baseUrl": "http://localhost:4200"
}

View File

@@ -0,0 +1 @@
{"count":27,"next":"http://localhost:8000/api/correspondents/?page=2","previous":null,"results":[{"id":9,"slug":"abc-test-correspondent","name":"ABC Test Correspondent","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":13,"slug":"corresp-10","name":"Corresp 10","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":14,"slug":"corresp-11","name":"Corresp 11","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":15,"slug":"corresp-12","name":"Corresp 12","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":16,"slug":"corresp-13","name":"Corresp 13","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":18,"slug":"corresp-15","name":"Corresp 15","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":19,"slug":"corresp-16","name":"Corresp 16","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":20,"slug":"corresp-17","name":"Corresp 17","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":21,"slug":"corresp-18","name":"Corresp 18","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":22,"slug":"corresp-19","name":"Corresp 19","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":23,"slug":"corresp-20","name":"Corresp 20","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":24,"slug":"corresp-21","name":"Corresp 21","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":25,"slug":"corresp-22","name":"Corresp 22","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":26,"slug":"corresp-23","name":"Corresp 23","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":5,"slug":"corresp-3","name":"Corresp 3","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":6,"slug":"corresp-4","name":"Corresp 4","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":7,"slug":"corresp-5","name":"Corresp 5","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":8,"slug":"corresp-6","name":"Corresp 6","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":10,"slug":"corresp-7","name":"Corresp 7","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":11,"slug":"corresp-8","name":"Corresp 8","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":12,"slug":"corresp-9","name":"Corresp 9","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":17,"slug":"correspondent-14","name":"Correspondent 14","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0,"last_correspondence":null},{"id":2,"slug":"correspondent-2","name":"Correspondent 2","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":7,"last_correspondence":"2021-01-20T23:37:58.204614Z"},{"id":27,"slug":"michael-shamoon","name":"Michael Shamoon","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":1,"last_correspondence":"2022-03-16T03:48:50.089624Z"},{"id":4,"slug":"newest-correspondent","name":"Newest Correspondent","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":1,"last_correspondence":"2021-02-07T08:00:00Z"}]}

View File

@@ -0,0 +1 @@
{"count":1,"next":null,"previous":null,"results":[{"id":1,"slug":"test","name":"Test Doc Type","match":"","matching_algorithm":1,"is_insensitive":true,"document_count":0}]}

View File

@@ -0,0 +1 @@
{"original_checksum":"e959bc7d593245d92685213264e962ba","original_size":963754,"original_mime_type":"application/pdf","media_filename":"2022/lorem-ipsum.pdf","has_archive_version":true,"original_metadata":[],"archive_checksum":"5a1f46a9150bcade978c764b039ce4d0","archive_media_filename":"2022/lorem-ipsum.pdf","archive_size":351160,"archive_metadata":[{"namespace":"http://ns.adobe.com/pdf/1.3/","prefix":"pdf","key":"Producer","value":"pikepdf5.0.1"},{"namespace":"http://ns.adobe.com/xap/1.0/","prefix":"xmp","key":"ModifyDate","value":"2022-03-22T04:53:18+00:00"},{"namespace":"http://ns.adobe.com/xap/1.0/","prefix":"xmp","key":"CreateDate","value":"2022-03-22T18:05:43+00:00"},{"namespace":"http://ns.adobe.com/xap/1.0/","prefix":"xmp","key":"CreatorTool","value":"ocrmypdf13.4.0/TesseractOCR-PDF4.1.1"},{"namespace":"http://ns.adobe.com/xap/1.0/mm/","prefix":"xmpMM","key":"DocumentID","value":"uuid:df27edcf-e34a-11f7-0000-8fa6067a3c04"},{"namespace":"http://purl.org/dc/elements/1.1/","prefix":"dc","key":"format","value":"application/pdf"},{"namespace":"http://purl.org/dc/elements/1.1/","prefix":"dc","key":"title","value":"ScannedDocument"},{"namespace":"http://www.aiim.org/pdfa/ns/id/","prefix":"pdfaid","key":"part","value":"2"},{"namespace":"http://www.aiim.org/pdfa/ns/id/","prefix":"pdfaid","key":"conformance","value":"B"},{"namespace":"http://purl.org/dc/elements/1.1/","prefix":"dc","key":"creator","value":"None"},{"namespace":"http://ns.adobe.com/xap/1.0/","prefix":"xmp","key":"MetadataDate","value":"2022-03-22T21:53:18.882551-07:00"}]}

View File

@@ -0,0 +1 @@
{"correspondents":[],"tags":[3],"document_types":[1]}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

View File

@@ -0,0 +1 @@
{"count":3,"next":null,"previous":null,"results":[{"id":1,"name":"Inbox","show_on_dashboard":true,"show_in_sidebar":true,"sort_field":"created","sort_reverse":true,"filter_rules":[{"rule_type":6,"value":"18"}]},{"id":2,"name":"Recently Added","show_on_dashboard":true,"show_in_sidebar":false,"sort_field":"created","sort_reverse":true,"filter_rules":[]},{"id":11,"name":"Taxes","show_on_dashboard":false,"show_in_sidebar":true,"sort_field":"created","sort_reverse":true,"filter_rules":[{"rule_type":6,"value":"39"}]}]}

View File

@@ -0,0 +1 @@
{"count":8,"next":null,"previous":null,"results":[{"id":4,"slug":"another-sample-tag","name":"Another Sample Tag","color":"#a6cee3","text_color":"#000000","match":"","matching_algorithm":6,"is_insensitive":true,"is_inbox_tag":false,"document_count":3},{"id":7,"slug":"newone","name":"NewOne","color":"#9e4ad1","text_color":"#ffffff","match":"","matching_algorithm":1,"is_insensitive":true,"is_inbox_tag":false,"document_count":2},{"id":6,"slug":"partial-tag","name":"Partial Tag","color":"#72dba7","text_color":"#000000","match":"","matching_algorithm":1,"is_insensitive":true,"is_inbox_tag":false,"document_count":1},{"id":2,"slug":"tag-2","name":"Tag 2","color":"#612db7","text_color":"#ffffff","match":"","matching_algorithm":1,"is_insensitive":true,"is_inbox_tag":false,"document_count":3},{"id":3,"slug":"tag-3","name":"Tag 3","color":"#b2df8a","text_color":"#000000","match":"","matching_algorithm":1,"is_insensitive":true,"is_inbox_tag":false,"document_count":4},{"id":5,"slug":"tagwithpartial","name":"TagWithPartial","color":"#3b2db4","text_color":"#ffffff","match":"","matching_algorithm":6,"is_insensitive":true,"is_inbox_tag":false,"document_count":2},{"id":8,"slug":"test-another","name":"Test Another","color":"#3ccea5","text_color":"#000000","match":"","matching_algorithm":4,"is_insensitive":true,"is_inbox_tag":false,"document_count":0},{"id":1,"slug":"test-tag","name":"Test Tag","color":"#fb9a99","text_color":"#000000","match":"","matching_algorithm":1,"is_insensitive":true,"is_inbox_tag":false,"document_count":4}]}

View File

@@ -0,0 +1,64 @@
describe('document-detail', () => {
beforeEach(() => {
this.modifiedDocuments = []
cy.fixture('documents/documents.json').then((documentsJson) => {
cy.intercept('GET', 'http://localhost:8000/api/documents/1/', (req) => {
let response = { ...documentsJson }
response = response.results.find((d) => d.id == 1)
req.reply(response)
})
})
cy.intercept('PUT', 'http://localhost:8000/api/documents/1/', (req) => {
this.modifiedDocuments.push(req.body) // store this for later
req.reply({ result: 'OK' })
}).as('saveDoc')
cy.intercept('http://localhost:8000/api/documents/1/metadata/', {
fixture: 'documents/1/metadata.json',
})
cy.intercept('http://localhost:8000/api/documents/1/suggestions/', {
fixture: 'documents/1/suggestions.json',
})
cy.intercept('http://localhost:8000/api/saved_views/*', {
fixture: 'saved_views/savedviews.json',
})
cy.intercept('http://localhost:8000/api/tags/*', {
fixture: 'tags/tags.json',
})
cy.intercept('http://localhost:8000/api/correspondents/*', {
fixture: 'correspondents/correspondents.json',
})
cy.intercept('http://localhost:8000/api/document_types/*', {
fixture: 'document_types/doctypes.json',
})
cy.viewport(1024, 1024)
cy.visit('/documents/1/')
})
it('should activate / deactivate save button when changes are saved', () => {
cy.contains('button', 'Save').should('be.disabled')
cy.get('app-input-text[formcontrolname="title"]')
.type(' additional')
.wait(1500) // this delay is for frontend debounce
cy.contains('button', 'Save').should('not.be.disabled')
})
it('should warn on unsaved changes', () => {
cy.get('app-input-text[formcontrolname="title"]')
.type(' additional')
.wait(1500) // this delay is for frontend debounce
cy.get('button[title="Close"]').click()
cy.contains('You have unsaved changes')
cy.contains('button', 'Cancel').click().wait(150)
cy.contains('button', 'Save').click().wait('@saveDoc').wait(2000) // navigates away after saving
cy.contains('You have unsaved changes').should('not.exist')
})
})

View File

@@ -0,0 +1,143 @@
describe('documents-list', () => {
beforeEach(() => {
this.bulkEdits = {}
// mock API methods
cy.fixture('documents/documents.json').then((documentsJson) => {
// bulk edit
cy.intercept(
'POST',
'http://localhost:8000/api/documents/bulk_edit/',
(req) => {
this.bulkEdits = req.body // store this for later
req.reply({ result: 'OK' })
}
)
cy.intercept('GET', 'http://localhost:8000/api/documents/*', (req) => {
let response = { ...documentsJson }
// bulkEdits was set earlier by bulk_edit intercept
if (this.bulkEdits.hasOwnProperty('documents')) {
response.results = response.results.map((d) => {
if ((this.bulkEdits['documents'] as Array<number>).includes(d.id)) {
switch (this.bulkEdits['method']) {
case 'modify_tags':
d.tags = (d.tags as Array<number>).concat([
this.bulkEdits['parameters']['add_tags'],
])
break
case 'set_correspondent':
d.correspondent =
this.bulkEdits['parameters']['correspondent']
break
case 'set_document_type':
d.document_type =
this.bulkEdits['parameters']['document_type']
break
}
}
return d
})
} else if (req.query.hasOwnProperty('tags__id__all')) {
// filtering e.g. http://localhost:8000/api/documents/?page=1&page_size=50&ordering=-created&tags__id__all=2
const tag_id = +req.query['tags__id__all']
response.results = (documentsJson.results as Array<any>).filter((d) =>
(d.tags as Array<number>).includes(tag_id)
)
response.count = response.results.length
}
req.reply(response)
})
})
cy.intercept('http://localhost:8000/api/documents/1/thumb/', {
fixture: 'documents/lorem-ipsum.png',
})
cy.intercept('http://localhost:8000/api/tags/*', {
fixture: 'tags/tags.json',
})
cy.intercept('http://localhost:8000/api/correspondents/*', {
fixture: 'correspondents/correspondents.json',
})
cy.intercept('http://localhost:8000/api/document_types/*', {
fixture: 'document_types/doctypes.json',
})
cy.visit('/documents')
})
it('should show a list of documents rendered as cards with thumbnails', () => {
cy.contains('3 documents')
cy.contains('lorem-ipsum')
cy.get('app-document-card-small:first-of-type img')
.invoke('attr', 'src')
.should('eq', 'http://localhost:8000/api/documents/1/thumb/')
})
it('should change to table "details" view', () => {
cy.get('div.btn-group-toggle input[value="details"]').parent().click()
cy.get('table')
})
it('should change to large cards view', () => {
cy.get('div.btn-group-toggle input[value="largeCards"]').parent().click()
cy.get('app-document-card-large')
})
it('should filter tags', () => {
cy.get('app-filter-editor app-filterable-dropdown[title="Tags"]').within(
() => {
cy.contains('button', 'Tags').click()
cy.contains('button', 'Tag 2').click()
}
)
cy.contains('One document')
})
it('should apply tags', () => {
cy.get('app-document-card-small:first-of-type').click()
cy.get('app-bulk-editor app-filterable-dropdown[title="Tags"]').within(
() => {
cy.contains('button', 'Tags').click()
cy.contains('button', 'Test Tag').click()
cy.contains('button', 'Apply').click()
}
)
cy.contains('button', 'Confirm').click()
cy.get('app-document-card-small:first-of-type').contains('Test Tag')
})
it('should apply correspondent', () => {
cy.get('app-document-card-small:first-of-type').click()
cy.get(
'app-bulk-editor app-filterable-dropdown[title="Correspondent"]'
).within(() => {
cy.contains('button', 'Correspondent').click()
cy.contains('button', 'ABC Test Correspondent').click()
cy.contains('button', 'Apply').click()
})
cy.contains('button', 'Confirm').click()
cy.get('app-document-card-small:first-of-type').contains(
'ABC Test Correspondent'
)
})
it('should apply document type', () => {
cy.get('app-document-card-small:first-of-type').click()
cy.get(
'app-bulk-editor app-filterable-dropdown[title="Document type"]'
).within(() => {
cy.contains('button', 'Document type').click()
cy.contains('button', 'Test Doc Type').click()
cy.contains('button', 'Apply').click()
})
cy.contains('button', 'Confirm').click()
cy.get('app-document-card-small:first-of-type').contains('Test Doc Type')
})
})

View File

@@ -0,0 +1,32 @@
describe('manage', () => {
beforeEach(() => {
cy.intercept('http://localhost:8000/api/correspondents/*', {
fixture: 'correspondents/correspondents.json',
})
cy.intercept('http://localhost:8000/api/tags/*', {
fixture: 'tags/tags.json',
})
})
it('should show a list of correspondents with bottom pagination as well', () => {
cy.visit('/correspondents')
cy.get('tbody').find('tr').its('length').should('eq', 25)
cy.get('ngb-pagination').its('length').should('eq', 2)
})
it('should show a list of tags without bottom pagination', () => {
cy.visit('/tags')
cy.get('tbody').find('tr').its('length').should('eq', 8)
cy.get('ngb-pagination').its('length').should('eq', 1)
})
it('should show a list of documents filtered by tag', () => {
cy.intercept('http://localhost:8000/api/documents/*', (req) => {
if (req.url.indexOf('tags__id__all=4'))
req.reply({ count: 3, next: null, previous: null, results: [] })
})
cy.visit('/tags')
cy.get('tbody').find('button:visible').contains('Documents').first().click() // id = 4
cy.contains('3 documents')
})
})

View File

@@ -0,0 +1,91 @@
describe('settings', () => {
beforeEach(() => {
this.modifiedViews = []
// mock API methods
cy.fixture('saved_views/savedviews.json').then((savedViewsJson) => {
// saved views PATCH
cy.intercept(
'PATCH',
'http://localhost:8000/api/saved_views/*',
(req) => {
this.modifiedViews.push(req.body) // store this for later
req.reply({ result: 'OK' })
}
)
cy.intercept('GET', 'http://localhost:8000/api/saved_views/*', (req) => {
let response = { ...savedViewsJson }
if (this.modifiedViews.length) {
response.results = response.results.map((v) => {
if (this.modifiedViews.find((mv) => mv.id == v.id))
v = this.modifiedViews.find((mv) => mv.id == v.id)
return v
})
}
req.reply(response)
}).as('savedViews')
})
cy.fixture('documents/documents.json').then((documentsJson) => {
cy.intercept('GET', 'http://localhost:8000/api/documents/1/', (req) => {
let response = { ...documentsJson }
response = response.results.find((d) => d.id == 1)
req.reply(response)
})
})
cy.intercept('http://localhost:8000/api/documents/1/metadata/', {
fixture: 'documents/1/metadata.json',
})
cy.intercept('http://localhost:8000/api/documents/1/suggestions/', {
fixture: 'documents/1/suggestions.json',
})
cy.viewport(1024, 1024)
cy.visit('/settings')
cy.wait('@savedViews')
})
it('should activate / deactivate save button when settings change and are saved', () => {
cy.contains('button', 'Save').should('be.disabled')
cy.contains('Use system settings').click()
cy.contains('button', 'Save').should('not.be.disabled')
cy.contains('button', 'Save').click()
cy.contains('button', 'Save').should('be.disabled')
})
it('should warn on unsaved changes', () => {
cy.contains('Use system settings').click()
cy.contains('a', 'Dashboard').click()
cy.contains('You have unsaved changes')
cy.contains('button', 'Cancel').click()
cy.contains('button', 'Save').click().wait('@savedViews')
cy.contains('a', 'Dashboard').click()
cy.contains('You have unsaved changes').should('not.exist')
})
it('should apply appearance changes when set', () => {
cy.contains('Use system settings').click()
cy.get('body').should('not.have.class', 'color-scheme-system')
cy.contains('Enable dark mode').click()
cy.get('body').should('have.class', 'color-scheme-dark')
})
it('should remove saved view from sidebar when unset', () => {
cy.contains('a', 'Saved views').click()
cy.get('#show_in_sidebar_1').click()
cy.contains('button', 'Save').click().wait('@savedViews')
cy.contains('li', 'Inbox').should('not.exist')
})
it('should remove saved view from dashboard when unset', () => {
cy.contains('a', 'Saved views').click()
cy.get('#show_on_dashboard_1').click()
cy.contains('button', 'Save').click().wait('@savedViews')
cy.visit('/dashboard')
cy.get('app-saved-view-widget').contains('Inbox').should('not.exist')
})
})

View File

@@ -0,0 +1,3 @@
// Plugins enable you to tap into, modify, or extend the internal behavior of Cypress
// For more info, visit https://on.cypress.io/plugins-api
module.exports = (on, config) => {}

View File

@@ -0,0 +1,43 @@
// ***********************************************
// This example namespace declaration will help
// with Intellisense and code completion in your
// IDE or Text Editor.
// ***********************************************
// declare namespace Cypress {
// interface Chainable<Subject = any> {
// customCommand(param: any): typeof customCommand;
// }
// }
//
// function customCommand(param: any): void {
// console.warn(param);
// }
//
// NOTE: You can use it like so:
// Cypress.Commands.add('customCommand', customCommand);
//
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add("login", (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })

View File

@@ -0,0 +1,17 @@
// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************
// When a command from ./commands is ready to use, import with `import './commands'` syntax
// import './commands';

View File

@@ -0,0 +1,8 @@
{
"extends": "../tsconfig.json",
"include": ["**/*.ts"],
"compilerOptions": {
"sourceMap": false,
"types": ["cypress"]
}
}

View File

@@ -2,18 +2,16 @@
// Protractor configuration file, see link for more information // Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts // https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter'); const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter')
/** /**
* @type { import("protractor").Config } * @type { import("protractor").Config }
*/ */
exports.config = { exports.config = {
allScriptsTimeout: 11000, allScriptsTimeout: 11000,
specs: [ specs: ['./src/**/*.e2e-spec.ts'],
'./src/**/*.e2e-spec.ts'
],
capabilities: { capabilities: {
browserName: 'chrome' browserName: 'chrome',
}, },
directConnect: true, directConnect: true,
baseUrl: 'http://localhost:4200/', baseUrl: 'http://localhost:4200/',
@@ -21,16 +19,18 @@ exports.config = {
jasmineNodeOpts: { jasmineNodeOpts: {
showColors: true, showColors: true,
defaultTimeoutInterval: 30000, defaultTimeoutInterval: 30000,
print: function() {} print: function () {},
}, },
onPrepare() { onPrepare() {
require('ts-node').register({ require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.json') project: require('path').join(__dirname, './tsconfig.json'),
}); })
jasmine.getEnv().addReporter(new SpecReporter({ jasmine.getEnv().addReporter(
spec: { new SpecReporter({
displayStacktrace: StacktraceOption.PRETTY spec: {
} displayStacktrace: StacktraceOption.PRETTY,
})); },
} })
}; )
},
}

View File

@@ -1,23 +1,25 @@
import { AppPage } from './app.po'; import { AppPage } from './app.po'
import { browser, logging } from 'protractor'; import { browser, logging } from 'protractor'
describe('workspace-project App', () => { describe('workspace-project App', () => {
let page: AppPage; let page: AppPage
beforeEach(() => { beforeEach(() => {
page = new AppPage(); page = new AppPage()
}); })
it('should display welcome message', () => { it('should display welcome message', () => {
page.navigateTo(); page.navigateTo()
expect(page.getTitleText()).toEqual('paperless-ui app is running!'); expect(page.getTitleText()).toEqual('paperless-ui app is running!')
}); })
afterEach(async () => { afterEach(async () => {
// Assert that there are no errors emitted from the browser // Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER); const logs = await browser.manage().logs().get(logging.Type.BROWSER)
expect(logs).not.toContain(jasmine.objectContaining({ expect(logs).not.toContain(
level: logging.Level.SEVERE, jasmine.objectContaining({
} as logging.Entry)); level: logging.Level.SEVERE,
}); } as logging.Entry)
}); )
})
})

View File

@@ -1,11 +1,13 @@
import { browser, by, element } from 'protractor'; import { browser, by, element } from 'protractor'
export class AppPage { export class AppPage {
navigateTo(): Promise<unknown> { navigateTo(): Promise<unknown> {
return browser.get(browser.baseUrl) as Promise<unknown>; return browser.get(browser.baseUrl) as Promise<unknown>
} }
getTitleText(): Promise<string> { getTitleText(): Promise<string> {
return element(by.css('app-root .content span')).getText() as Promise<string>; return element(
by.css('app-root .content span')
).getText() as Promise<string>
} }
} }

8
src-ui/jest.config.js Normal file
View File

@@ -0,0 +1,8 @@
module.exports = {
moduleNameMapper: {
'@core/(.*)': '<rootDir>/src/app/core/$1',
},
preset: 'jest-preset-angular',
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
testPathIgnorePatterns: ['/node_modules/', '/cypress/'],
}

View File

@@ -1,32 +0,0 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/paperless-ui'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};

File diff suppressed because it is too large Load Diff

22652
src-ui/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -7,53 +7,54 @@
"build": "ng build", "build": "ng build",
"test": "ng test", "test": "ng test",
"lint": "ng lint", "lint": "ng lint",
"e2e": "ng e2e" "e2e": "ng e2e",
"cy:run": "cypress run",
"e2e:ci": "concurrently 'npm run start' 'wait-on http-get://localhost:4200 && npm run cy:run' --kill-others --success first"
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "~13.2.4", "@angular/common": "~13.3.5",
"@angular/common": "~13.2.5", "@angular/compiler": "~13.3.5",
"@angular/compiler": "~13.2.4", "@angular/core": "~13.3.5",
"@angular/core": "~13.2.4", "@angular/forms": "~13.3.5",
"@angular/forms": "~13.2.5", "@angular/localize": "~13.3.5",
"@angular/localize": "~13.2.4", "@angular/platform-browser": "~13.3.5",
"@angular/platform-browser": "~13.2.5", "@angular/platform-browser-dynamic": "~13.3.5",
"@angular/platform-browser-dynamic": "~13.2.4", "@angular/router": "~13.3.5",
"@angular/router": "~13.2.5", "@ng-bootstrap/ng-bootstrap": "^12.1.1",
"@ng-bootstrap/ng-bootstrap": "^12.0.0",
"@ng-select/ng-select": "^8.1.1", "@ng-select/ng-select": "^8.1.1",
"@ngneat/dirty-check-forms": "^1.1.0", "@ngneat/dirty-check-forms": "^3.0.2",
"@popperjs/core": "^2.11.2", "@popperjs/core": "^2.11.4",
"bootstrap": "^5.1.3", "bootstrap": "^5.1.3",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"ng2-pdf-viewer": "^8.0.1", "ng2-pdf-viewer": "^9.0.0",
"ngx-color": "^7.3.3", "ngx-color": "^7.3.3",
"ngx-cookie-service": "^13.1.2", "ngx-cookie-service": "^13.1.2",
"ngx-file-drop": "^13.0.0", "ngx-file-drop": "^13.0.0",
"ngx-infinite-scroll": "^10.0.1", "rxjs": "~7.5.5",
"rxjs": "~6.6.7",
"tslib": "^2.3.1", "tslib": "^2.3.1",
"uuid": "^8.3.1", "uuid": "^8.3.1",
"zone.js": "~0.11.4" "zone.js": "~0.11.4"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~13.2.5", "@angular-builders/jest": "13.0.3",
"@angular/cli": "~13.2.5", "@angular-devkit/build-angular": "~13.3.4",
"@angular/compiler-cli": "~13.2.4", "@angular/cli": "~13.3.4",
"@types/jasmine": "~3.10.3", "@angular/compiler-cli": "~13.3.5",
"@types/jasminewd2": "~2.0.10", "@types/jest": "27.4.1",
"@types/node": "^17.0.21", "@types/node": "^17.0.30",
"codelyzer": "^6.0.2", "codelyzer": "^6.0.2",
"jasmine-core": "~4.0.1", "concurrently": "7.1.0",
"jasmine-spec-reporter": "~7.0.0", "jest": "28.0.3",
"karma": "~6.3.16", "jest-environment-jsdom": "^28.0.2",
"karma-chrome-launcher": "~3.1.0", "jest-preset-angular": "^12.0.0-next.1",
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.7.0",
"protractor": "~7.0.0",
"ts-node": "~10.7.0", "ts-node": "~10.7.0",
"tslint": "~6.1.3", "tslint": "~6.1.3",
"typescript": "~4.5.5" "typescript": "~4.6.3",
"wait-on": "~6.0.1"
},
"optionalDependencies": {
"@cypress/schematic": "^1.6.0",
"cypress": "~9.6.0"
} }
} }

31
src-ui/setup-jest.ts Normal file
View File

@@ -0,0 +1,31 @@
import { jest } from '@jest/globals'
/* global mocks for jsdom */
const mock = () => {
let storage: { [key: string]: string } = {}
return {
getItem: (key: string) => (key in storage ? storage[key] : null),
setItem: (key: string, value: string) => (storage[key] = value || ''),
removeItem: (key: string) => delete storage[key],
clear: () => (storage = {}),
}
}
Object.defineProperty(window, 'localStorage', { value: mock() })
Object.defineProperty(window, 'sessionStorage', { value: mock() })
Object.defineProperty(window, 'getComputedStyle', {
value: () => ['-webkit-appearance'],
})
Object.defineProperty(document.body.style, 'transform', {
value: () => {
return {
enumerable: true,
configurable: true,
}
},
})
HTMLCanvasElement.prototype.getContext = <
typeof HTMLCanvasElement.prototype.getContext
>jest.fn()

View File

@@ -1,39 +1,47 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core'
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from '@angular/router'
import { AppFrameComponent } from './components/app-frame/app-frame.component'; import { AppFrameComponent } from './components/app-frame/app-frame.component'
import { DashboardComponent } from './components/dashboard/dashboard.component'; import { DashboardComponent } from './components/dashboard/dashboard.component'
import { DocumentDetailComponent } from './components/document-detail/document-detail.component'; import { DocumentDetailComponent } from './components/document-detail/document-detail.component'
import { DocumentListComponent } from './components/document-list/document-list.component'; import { DocumentListComponent } from './components/document-list/document-list.component'
import { CorrespondentListComponent } from './components/manage/correspondent-list/correspondent-list.component'; import { CorrespondentListComponent } from './components/manage/correspondent-list/correspondent-list.component'
import { DocumentTypeListComponent } from './components/manage/document-type-list/document-type-list.component'; import { DocumentTypeListComponent } from './components/manage/document-type-list/document-type-list.component'
import { LogsComponent } from './components/manage/logs/logs.component'; import { LogsComponent } from './components/manage/logs/logs.component'
import { SettingsComponent } from './components/manage/settings/settings.component'; import { SettingsComponent } from './components/manage/settings/settings.component'
import { TagListComponent } from './components/manage/tag-list/tag-list.component'; import { TagListComponent } from './components/manage/tag-list/tag-list.component'
import { NotFoundComponent } from './components/not-found/not-found.component'; import { NotFoundComponent } from './components/not-found/not-found.component'
import {DocumentAsnComponent} from "./components/document-asn/document-asn.component"; import { DocumentAsnComponent } from './components/document-asn/document-asn.component'
import { DirtyFormGuard } from './guards/dirty-form.guard'; import { DirtyFormGuard } from './guards/dirty-form.guard'
const routes: Routes = [ const routes: Routes = [
{path: '', redirectTo: 'dashboard', pathMatch: 'full'}, { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
{path: '', component: AppFrameComponent, children: [ {
{path: 'dashboard', component: DashboardComponent }, path: '',
{path: 'documents', component: DocumentListComponent }, component: AppFrameComponent,
{path: 'view/:id', component: DocumentListComponent }, children: [
{path: 'documents/:id', component: DocumentDetailComponent }, { path: 'dashboard', component: DashboardComponent },
{path: 'asn/:id', component: DocumentAsnComponent }, { path: 'documents', component: DocumentListComponent },
{path: 'tags', component: TagListComponent }, { path: 'view/:id', component: DocumentListComponent },
{path: 'documenttypes', component: DocumentTypeListComponent }, { path: 'documents/:id', component: DocumentDetailComponent },
{path: 'correspondents', component: CorrespondentListComponent }, { path: 'asn/:id', component: DocumentAsnComponent },
{path: 'logs', component: LogsComponent }, { path: 'tags', component: TagListComponent },
{path: 'settings', component: SettingsComponent, canDeactivate: [DirtyFormGuard] }, { path: 'documenttypes', component: DocumentTypeListComponent },
]}, { path: 'correspondents', component: CorrespondentListComponent },
{ path: 'logs', component: LogsComponent },
{
path: 'settings',
component: SettingsComponent,
canDeactivate: [DirtyFormGuard],
},
],
},
{path: '404', component: NotFoundComponent}, { path: '404', component: NotFoundComponent },
{path: '**', redirectTo: '/404', pathMatch: 'full'} { path: '**', redirectTo: '/404', pathMatch: 'full' },
]; ]
@NgModule({ @NgModule({
imports: [RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' })], imports: [RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' })],
exports: [RouterModule] exports: [RouterModule],
}) })
export class AppRoutingModule { } export class AppRoutingModule {}

View File

@@ -1,3 +1,13 @@
<app-toasts></app-toasts> <app-toasts></app-toasts>
<router-outlet></router-outlet> <ngx-file-drop dropZoneClassName="main-dropzone" contentClassName="main-content" [disabled]="!dragDropEnabled"
(onFileDrop)="dropped($event)" (onFileOver)="fileOver()" (onFileLeave)="fileLeave()">
<ng-template ngx-file-drop-content-tmp>
<div class="global-dropzone-overlay fade" [class.show]="fileIsOver" [class.hide]="hidden">
<h2 i18n>Drop files to begin upload</h2>
</div>
<div [class.inert]="fileIsOver">
<router-outlet></router-outlet>
</div>
</ng-template>
</ngx-file-drop>

View File

@@ -1,35 +0,0 @@
import { TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [
RouterTestingModule
],
declarations: [
AppComponent
],
}).compileComponents();
});
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
it(`should have as title 'paperless-ui'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('paperless-ui');
});
it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement;
expect(compiled.querySelector('.content span').textContent).toContain('paperless-ui app is running!');
});
});

View File

@@ -1,25 +1,36 @@
import { SettingsService, SETTINGS_KEYS } from './services/settings.service'; import { SettingsService, SETTINGS_KEYS } from './services/settings.service'
import { Component, OnDestroy, OnInit } from '@angular/core'; import { Component, OnDestroy, OnInit } from '@angular/core'
import { Router } from '@angular/router'; import { Router } from '@angular/router'
import { Subscription } from 'rxjs'; import { Subscription } from 'rxjs'
import { ConsumerStatusService } from './services/consumer-status.service'; import { ConsumerStatusService } from './services/consumer-status.service'
import { ToastService } from './services/toast.service'; import { ToastService } from './services/toast.service'
import { NgxFileDropEntry } from 'ngx-file-drop'
import { UploadDocumentsService } from './services/upload-documents.service'
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
templateUrl: './app.component.html', templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'] styleUrls: ['./app.component.scss'],
}) })
export class AppComponent implements OnInit, OnDestroy { export class AppComponent implements OnInit, OnDestroy {
newDocumentSubscription: Subscription
successSubscription: Subscription
failedSubscription: Subscription
newDocumentSubscription: Subscription; private fileLeaveTimeoutID: any
successSubscription: Subscription; fileIsOver: boolean = false
failedSubscription: Subscription; hidden: boolean = true
constructor (private settings: SettingsService, private consumerStatusService: ConsumerStatusService, private toastService: ToastService, private router: Router) { constructor(
let anyWindow = (window as any) private settings: SettingsService,
anyWindow.pdfWorkerSrc = 'assets/js/pdf.worker.min.js'; private consumerStatusService: ConsumerStatusService,
this.settings.updateDarkModeSettings() private toastService: ToastService,
private router: Router,
private uploadDocumentsService: UploadDocumentsService
) {
let anyWindow = window as any
anyWindow.pdfWorkerSrc = 'assets/js/pdf.worker.min.js'
this.settings.updateAppearanceSettings()
} }
ngOnDestroy(): void { ngOnDestroy(): void {
@@ -36,7 +47,12 @@ export class AppComponent implements OnInit, OnDestroy {
} }
private showNotification(key) { private showNotification(key) {
if (this.router.url == '/dashboard' && this.settings.get(SETTINGS_KEYS.NOTIFICATIONS_CONSUMER_SUPPRESS_ON_DASHBOARD)) { if (
this.router.url == '/dashboard' &&
this.settings.get(
SETTINGS_KEYS.NOTIFICATIONS_CONSUMER_SUPPRESS_ON_DASHBOARD
)
) {
return false return false
} }
return this.settings.get(key) return this.settings.get(key)
@@ -45,26 +61,82 @@ export class AppComponent implements OnInit, OnDestroy {
ngOnInit(): void { ngOnInit(): void {
this.consumerStatusService.connect() this.consumerStatusService.connect()
this.successSubscription = this.consumerStatusService
.onDocumentConsumptionFinished()
.subscribe((status) => {
if (
this.showNotification(SETTINGS_KEYS.NOTIFICATIONS_CONSUMER_SUCCESS)
) {
this.toastService.show({
title: $localize`Document added`,
delay: 10000,
content: $localize`Document ${status.filename} was added to paperless.`,
actionName: $localize`Open document`,
action: () => {
this.router.navigate(['documents', status.documentId])
},
})
}
})
this.successSubscription = this.consumerStatusService.onDocumentConsumptionFinished().subscribe(status => { this.failedSubscription = this.consumerStatusService
if (this.showNotification(SETTINGS_KEYS.NOTIFICATIONS_CONSUMER_SUCCESS)) { .onDocumentConsumptionFailed()
this.toastService.show({title: $localize`Document added`, delay: 10000, content: $localize`Document ${status.filename} was added to paperless.`, actionName: $localize`Open document`, action: () => { .subscribe((status) => {
this.router.navigate(['documents', status.documentId]) if (
}}) this.showNotification(SETTINGS_KEYS.NOTIFICATIONS_CONSUMER_FAILED)
} ) {
}) this.toastService.showError(
$localize`Could not add ${status.filename}\: ${status.message}`
)
}
})
this.failedSubscription = this.consumerStatusService.onDocumentConsumptionFailed().subscribe(status => { this.newDocumentSubscription = this.consumerStatusService
if (this.showNotification(SETTINGS_KEYS.NOTIFICATIONS_CONSUMER_FAILED)) { .onDocumentDetected()
this.toastService.showError($localize`Could not add ${status.filename}\: ${status.message}`) .subscribe((status) => {
} if (
}) this.showNotification(
SETTINGS_KEYS.NOTIFICATIONS_CONSUMER_NEW_DOCUMENT
this.newDocumentSubscription = this.consumerStatusService.onDocumentDetected().subscribe(status => { )
if (this.showNotification(SETTINGS_KEYS.NOTIFICATIONS_CONSUMER_NEW_DOCUMENT)) { ) {
this.toastService.show({title: $localize`New document detected`, delay: 5000, content: $localize`Document ${status.filename} is being processed by paperless.`}) this.toastService.show({
} title: $localize`New document detected`,
}) delay: 5000,
content: $localize`Document ${status.filename} is being processed by paperless.`,
})
}
})
} }
public get dragDropEnabled(): boolean {
return !this.router.url.includes('dashboard')
}
public fileOver() {
// allows transition
setTimeout(() => {
this.fileIsOver = true
}, 1)
this.hidden = false
// stop fileLeave timeout
clearTimeout(this.fileLeaveTimeoutID)
}
public fileLeave(immediate: boolean = false) {
const ms = immediate ? 0 : 500
this.fileLeaveTimeoutID = setTimeout(() => {
this.fileIsOver = false
// await transition completed
setTimeout(() => {
this.hidden = true
}, 150)
}, ms)
}
public dropped(files: NgxFileDropEntry[]) {
this.fileLeave(true)
this.uploadDocumentsService.uploadFiles(files)
this.toastService.showInfo($localize`Initiating upload...`, 3000)
}
} }

View File

@@ -1,86 +1,94 @@
import { BrowserModule } from '@angular/platform-browser'; import { BrowserModule } from '@angular/platform-browser'
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core'
import { AppRoutingModule } from './app-routing.module'
import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'
import { AppComponent } from './app.component'; import {
import { NgbDateAdapter, NgbDateParserFormatter, NgbModule } from '@ng-bootstrap/ng-bootstrap'; NgbDateAdapter,
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; NgbDateParserFormatter,
import { DocumentListComponent } from './components/document-list/document-list.component'; NgbModule,
import { DocumentDetailComponent } from './components/document-detail/document-detail.component'; } from '@ng-bootstrap/ng-bootstrap'
import { DashboardComponent } from './components/dashboard/dashboard.component'; import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'
import { TagListComponent } from './components/manage/tag-list/tag-list.component'; import { DocumentListComponent } from './components/document-list/document-list.component'
import { DocumentTypeListComponent } from './components/manage/document-type-list/document-type-list.component'; import { DocumentDetailComponent } from './components/document-detail/document-detail.component'
import { LogsComponent } from './components/manage/logs/logs.component'; import { DashboardComponent } from './components/dashboard/dashboard.component'
import { SettingsComponent } from './components/manage/settings/settings.component'; import { TagListComponent } from './components/manage/tag-list/tag-list.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { DocumentTypeListComponent } from './components/manage/document-type-list/document-type-list.component'
import { DatePipe, registerLocaleData } from '@angular/common'; import { CorrespondentListComponent } from './components/manage/correspondent-list/correspondent-list.component'
import { NotFoundComponent } from './components/not-found/not-found.component'; import { LogsComponent } from './components/manage/logs/logs.component'
import { CorrespondentListComponent } from './components/manage/correspondent-list/correspondent-list.component'; import { SettingsComponent } from './components/manage/settings/settings.component'
import { ConfirmDialogComponent } from './components/common/confirm-dialog/confirm-dialog.component'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { CorrespondentEditDialogComponent } from './components/manage/correspondent-list/correspondent-edit-dialog/correspondent-edit-dialog.component'; import { DatePipe, registerLocaleData } from '@angular/common'
import { TagEditDialogComponent } from './components/manage/tag-list/tag-edit-dialog/tag-edit-dialog.component'; import { NotFoundComponent } from './components/not-found/not-found.component'
import { DocumentTypeEditDialogComponent } from './components/manage/document-type-list/document-type-edit-dialog/document-type-edit-dialog.component'; import { ConfirmDialogComponent } from './components/common/confirm-dialog/confirm-dialog.component'
import { TagComponent } from './components/common/tag/tag.component'; import { CorrespondentEditDialogComponent } from './components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component'
import { PageHeaderComponent } from './components/common/page-header/page-header.component'; import { TagEditDialogComponent } from './components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component'
import { AppFrameComponent } from './components/app-frame/app-frame.component'; import { DocumentTypeEditDialogComponent } from './components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component'
import { ToastsComponent } from './components/common/toasts/toasts.component'; import { TagComponent } from './components/common/tag/tag.component'
import { FilterEditorComponent } from './components/document-list/filter-editor/filter-editor.component'; import { PageHeaderComponent } from './components/common/page-header/page-header.component'
import { FilterableDropdownComponent } from './components/common/filterable-dropdown/filterable-dropdown.component'; import { AppFrameComponent } from './components/app-frame/app-frame.component'
import { ToggleableDropdownButtonComponent } from './components/common/filterable-dropdown/toggleable-dropdown-button/toggleable-dropdown-button.component'; import { ToastsComponent } from './components/common/toasts/toasts.component'
import { DateDropdownComponent } from './components/common/date-dropdown/date-dropdown.component'; import { FilterEditorComponent } from './components/document-list/filter-editor/filter-editor.component'
import { DocumentCardLargeComponent } from './components/document-list/document-card-large/document-card-large.component'; import { FilterableDropdownComponent } from './components/common/filterable-dropdown/filterable-dropdown.component'
import { DocumentCardSmallComponent } from './components/document-list/document-card-small/document-card-small.component'; import { ToggleableDropdownButtonComponent } from './components/common/filterable-dropdown/toggleable-dropdown-button/toggleable-dropdown-button.component'
import { BulkEditorComponent } from './components/document-list/bulk-editor/bulk-editor.component'; import { DateDropdownComponent } from './components/common/date-dropdown/date-dropdown.component'
import { NgxFileDropModule } from 'ngx-file-drop'; import { DocumentCardLargeComponent } from './components/document-list/document-card-large/document-card-large.component'
import { TextComponent } from './components/common/input/text/text.component'; import { DocumentCardSmallComponent } from './components/document-list/document-card-small/document-card-small.component'
import { SelectComponent } from './components/common/input/select/select.component'; import { BulkEditorComponent } from './components/document-list/bulk-editor/bulk-editor.component'
import { CheckComponent } from './components/common/input/check/check.component'; import { NgxFileDropModule } from 'ngx-file-drop'
import { SaveViewConfigDialogComponent } from './components/document-list/save-view-config-dialog/save-view-config-dialog.component'; import { TextComponent } from './components/common/input/text/text.component'
import { InfiniteScrollModule } from 'ngx-infinite-scroll'; import { SelectComponent } from './components/common/input/select/select.component'
import { TagsComponent } from './components/common/input/tags/tags.component'; import { CheckComponent } from './components/common/input/check/check.component'
import { SortableDirective } from './directives/sortable.directive'; import { SaveViewConfigDialogComponent } from './components/document-list/save-view-config-dialog/save-view-config-dialog.component'
import { CookieService } from 'ngx-cookie-service'; import { TagsComponent } from './components/common/input/tags/tags.component'
import { CsrfInterceptor } from './interceptors/csrf.interceptor'; import { SortableDirective } from './directives/sortable.directive'
import { SavedViewWidgetComponent } from './components/dashboard/widgets/saved-view-widget/saved-view-widget.component'; import { CookieService } from 'ngx-cookie-service'
import { StatisticsWidgetComponent } from './components/dashboard/widgets/statistics-widget/statistics-widget.component'; import { CsrfInterceptor } from './interceptors/csrf.interceptor'
import { UploadFileWidgetComponent } from './components/dashboard/widgets/upload-file-widget/upload-file-widget.component'; import { SavedViewWidgetComponent } from './components/dashboard/widgets/saved-view-widget/saved-view-widget.component'
import { WidgetFrameComponent } from './components/dashboard/widgets/widget-frame/widget-frame.component'; import { StatisticsWidgetComponent } from './components/dashboard/widgets/statistics-widget/statistics-widget.component'
import { PdfViewerModule } from 'ng2-pdf-viewer'; import { UploadFileWidgetComponent } from './components/dashboard/widgets/upload-file-widget/upload-file-widget.component'
import { WelcomeWidgetComponent } from './components/dashboard/widgets/welcome-widget/welcome-widget.component'; import { WidgetFrameComponent } from './components/dashboard/widgets/widget-frame/widget-frame.component'
import { YesNoPipe } from './pipes/yes-no.pipe'; import { PdfViewerModule } from 'ng2-pdf-viewer'
import { FileSizePipe } from './pipes/file-size.pipe'; import { WelcomeWidgetComponent } from './components/dashboard/widgets/welcome-widget/welcome-widget.component'
import { FilterPipe } from './pipes/filter.pipe'; import { YesNoPipe } from './pipes/yes-no.pipe'
import { DocumentTitlePipe } from './pipes/document-title.pipe'; import { FileSizePipe } from './pipes/file-size.pipe'
import { MetadataCollapseComponent } from './components/document-detail/metadata-collapse/metadata-collapse.component'; import { FilterPipe } from './pipes/filter.pipe'
import { SelectDialogComponent } from './components/common/select-dialog/select-dialog.component'; import { DocumentTitlePipe } from './pipes/document-title.pipe'
import { NgSelectModule } from '@ng-select/ng-select'; import { MetadataCollapseComponent } from './components/document-detail/metadata-collapse/metadata-collapse.component'
import { NumberComponent } from './components/common/input/number/number.component'; import { SelectDialogComponent } from './components/common/select-dialog/select-dialog.component'
import { SafePipe } from './pipes/safe.pipe'; import { NgSelectModule } from '@ng-select/ng-select'
import { CustomDatePipe } from './pipes/custom-date.pipe'; import { NumberComponent } from './components/common/input/number/number.component'
import { DateComponent } from './components/common/input/date/date.component'; import { SafeUrlPipe } from './pipes/safeurl.pipe'
import { ISODateTimeAdapter } from './utils/ngb-iso-date-time-adapter'; import { SafeHtmlPipe } from './pipes/safehtml.pipe'
import { LocalizedDateParserFormatter } from './utils/ngb-date-parser-formatter'; import { CustomDatePipe } from './pipes/custom-date.pipe'
import { ApiVersionInterceptor } from './interceptors/api-version.interceptor'; import { DateComponent } from './components/common/input/date/date.component'
import { ColorSliderModule } from 'ngx-color/slider'; import { ISODateTimeAdapter } from './utils/ngb-iso-date-time-adapter'
import { ColorComponent } from './components/common/input/color/color.component'; import { LocalizedDateParserFormatter } from './utils/ngb-date-parser-formatter'
import { DocumentAsnComponent } from './components/document-asn/document-asn.component'; import { ApiVersionInterceptor } from './interceptors/api-version.interceptor'
import { ColorSliderModule } from 'ngx-color/slider'
import localeCs from '@angular/common/locales/cs'; import { ColorComponent } from './components/common/input/color/color.component'
import localeDa from '@angular/common/locales/da'; import { DocumentAsnComponent } from './components/document-asn/document-asn.component'
import localeDe from '@angular/common/locales/de';
import localeEnGb from '@angular/common/locales/en-GB';
import localeEs from '@angular/common/locales/es';
import localeFr from '@angular/common/locales/fr';
import localeIt from '@angular/common/locales/it';
import localeLb from '@angular/common/locales/lb';
import localeNl from '@angular/common/locales/nl';
import localePl from '@angular/common/locales/pl';
import localePt from '@angular/common/locales/pt';
import localeSv from '@angular/common/locales/sv';
import localeRo from '@angular/common/locales/ro';
import localeRu from '@angular/common/locales/ru';
import localeBe from '@angular/common/locales/be'
import localeCs from '@angular/common/locales/cs'
import localeDa from '@angular/common/locales/da'
import localeDe from '@angular/common/locales/de'
import localeEnGb from '@angular/common/locales/en-GB'
import localeEs from '@angular/common/locales/es'
import localeFr from '@angular/common/locales/fr'
import localeIt from '@angular/common/locales/it'
import localeLb from '@angular/common/locales/lb'
import localeNl from '@angular/common/locales/nl'
import localePl from '@angular/common/locales/pl'
import localePt from '@angular/common/locales/pt'
import localeRo from '@angular/common/locales/ro'
import localeRu from '@angular/common/locales/ru'
import localeSl from '@angular/common/locales/sl'
import localeSr from '@angular/common/locales/sr'
import localeSv from '@angular/common/locales/sv'
import localeTr from '@angular/common/locales/tr'
import localeZh from '@angular/common/locales/zh'
registerLocaleData(localeBe)
registerLocaleData(localeCs) registerLocaleData(localeCs)
registerLocaleData(localeDa) registerLocaleData(localeDa)
registerLocaleData(localeDe) registerLocaleData(localeDe)
@@ -91,11 +99,15 @@ registerLocaleData(localeIt)
registerLocaleData(localeLb) registerLocaleData(localeLb)
registerLocaleData(localeNl) registerLocaleData(localeNl)
registerLocaleData(localePl) registerLocaleData(localePl)
registerLocaleData(localePt, "pt-BR") registerLocaleData(localePt, 'pt-BR')
registerLocaleData(localePt, "pt-PT") registerLocaleData(localePt, 'pt-PT')
registerLocaleData(localeRo) registerLocaleData(localeRo)
registerLocaleData(localeRu) registerLocaleData(localeRu)
registerLocaleData(localeSl)
registerLocaleData(localeSr)
registerLocaleData(localeSv) registerLocaleData(localeSv)
registerLocaleData(localeTr)
registerLocaleData(localeZh)
@NgModule({ @NgModule({
declarations: [ declarations: [
@@ -104,8 +116,8 @@ registerLocaleData(localeSv)
DocumentDetailComponent, DocumentDetailComponent,
DashboardComponent, DashboardComponent,
TagListComponent, TagListComponent,
CorrespondentListComponent,
DocumentTypeListComponent, DocumentTypeListComponent,
CorrespondentListComponent,
LogsComponent, LogsComponent,
SettingsComponent, SettingsComponent,
NotFoundComponent, NotFoundComponent,
@@ -142,11 +154,12 @@ registerLocaleData(localeSv)
MetadataCollapseComponent, MetadataCollapseComponent,
SelectDialogComponent, SelectDialogComponent,
NumberComponent, NumberComponent,
SafePipe, SafeUrlPipe,
SafeHtmlPipe,
CustomDatePipe, CustomDatePipe,
DateComponent, DateComponent,
ColorComponent, ColorComponent,
DocumentAsnComponent DocumentAsnComponent,
], ],
imports: [ imports: [
BrowserModule, BrowserModule,
@@ -156,27 +169,28 @@ registerLocaleData(localeSv)
FormsModule, FormsModule,
ReactiveFormsModule, ReactiveFormsModule,
NgxFileDropModule, NgxFileDropModule,
InfiniteScrollModule,
PdfViewerModule, PdfViewerModule,
NgSelectModule, NgSelectModule,
ColorSliderModule ColorSliderModule,
], ],
providers: [ providers: [
DatePipe, DatePipe,
CookieService, { CookieService,
{
provide: HTTP_INTERCEPTORS, provide: HTTP_INTERCEPTORS,
useClass: CsrfInterceptor, useClass: CsrfInterceptor,
multi: true multi: true,
},{ },
{
provide: HTTP_INTERCEPTORS, provide: HTTP_INTERCEPTORS,
useClass: ApiVersionInterceptor, useClass: ApiVersionInterceptor,
multi: true multi: true,
}, },
FilterPipe, FilterPipe,
DocumentTitlePipe, DocumentTitlePipe,
{provide: NgbDateAdapter, useClass: ISODateTimeAdapter}, { provide: NgbDateAdapter, useClass: ISODateTimeAdapter },
{provide: NgbDateParserFormatter, useClass: LocalizedDateParserFormatter} { provide: NgbDateParserFormatter, useClass: LocalizedDateParserFormatter },
], ],
bootstrap: [AppComponent] bootstrap: [AppComponent],
}) })
export class AppModule { } export class AppModule {}

View File

@@ -12,7 +12,7 @@
</a> </a>
<div class="search-form-container flex-grow-1 py-2 pb-3 pb-sm-2 px-3 ps-md-4 me-sm-auto order-3 order-sm-1"> <div class="search-form-container flex-grow-1 py-2 pb-3 pb-sm-2 px-3 ps-md-4 me-sm-auto order-3 order-sm-1">
<form (ngSubmit)="search()" class="form-inline flex-grow-1"> <form (ngSubmit)="search()" class="form-inline flex-grow-1">
<svg width="1em" height="1em"> <svg width="1em" height="1em" fill="currentColor">
<use xlink:href="assets/bootstrap-icons.svg#search"/> <use xlink:href="assets/bootstrap-icons.svg#search"/>
</svg> </svg>
<input class="form-control form-control-sm" type="text" placeholder="Search documents" aria-label="Search" <input class="form-control form-control-sm" type="text" placeholder="Search documents" aria-label="Search"
@@ -25,7 +25,7 @@
<span *ngIf="displayName" class="navbar-text small me-2 text-light d-none d-sm-inline"> <span *ngIf="displayName" class="navbar-text small me-2 text-light d-none d-sm-inline">
{{displayName}} {{displayName}}
</span> </span>
<svg width="1.3em" height="1.3em"> <svg width="1.3em" height="1.3em" fill="currentColor">
<use xlink:href="assets/bootstrap-icons.svg#person-circle"/> <use xlink:href="assets/bootstrap-icons.svg#person-circle"/>
</svg> </svg>
</button> </button>
@@ -62,7 +62,7 @@
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" routerLink="documents" routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}" (click)="closeMenu()"> <a class="nav-link" routerLink="documents" routerLinkActive="active" (click)="closeMenu()">
<svg class="sidebaricon" fill="currentColor"> <svg class="sidebaricon" fill="currentColor">
<use xlink:href="assets/bootstrap-icons.svg#files"/> <use xlink:href="assets/bootstrap-icons.svg#files"/>
</svg>&nbsp;<ng-container i18n>Documents</ng-container> </svg>&nbsp;<ng-container i18n>Documents</ng-container>
@@ -92,7 +92,7 @@
<svg class="sidebaricon" fill="currentColor"> <svg class="sidebaricon" fill="currentColor">
<use xlink:href="assets/bootstrap-icons.svg#file-text"/> <use xlink:href="assets/bootstrap-icons.svg#file-text"/>
</svg>&nbsp;{{d.title | documentTitle}} </svg>&nbsp;{{d.title | documentTitle}}
<span class="close bg-light" (click)="closeDocument(d); $event.preventDefault()"> <span class="close" (click)="closeDocument(d); $event.preventDefault()">
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="bi bi-x" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="bi bi-x" viewBox="0 0 16 16">
<use xlink:href="assets/bootstrap-icons.svg#x"/> <use xlink:href="assets/bootstrap-icons.svg#x"/>
</svg> </svg>
@@ -169,22 +169,47 @@
</li> </li>
<li class="nav-item"> <li class="nav-item">
<div class="d-flex w-100 flex-wrap"> <div class="d-flex w-100 flex-wrap">
<a class="nav-link pe-0 pb-0" target="_blank" rel="noopener noreferrer" href="https://github.com/paperless-ngx/paperless-ngx"> <a class="nav-link pe-2 pb-1" target="_blank" rel="noopener noreferrer" href="https://github.com/paperless-ngx/paperless-ngx">
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="sidebaricon bi bi-github" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="sidebaricon" viewBox="0 0 16 16">
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"/> <use xlink:href="assets/bootstrap-icons.svg#github" />
</svg>&nbsp;<ng-container i18n>GitHub</ng-container> </svg>&nbsp;<ng-container i18n>GitHub</ng-container>
</a> </a>
<a class="nav-link-additional small text-muted ms-3" target="_blank" rel="noopener noreferrer" href="https://github.com/paperless-ngx/paperless-ngx/discussions/categories/feature-requests" title="Suggest an idea"> <a class="nav-link-additional small text-muted ms-3" target="_blank" rel="noopener noreferrer" href="https://github.com/paperless-ngx/paperless-ngx/discussions/categories/feature-requests" title="Suggest an idea">
<svg xmlns="http://www.w3.org/2000/svg" width="1.3em" height="1.3em" fill="currentColor" class="bi bi-lightbulb pe-1" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" width="1.1em" height="1.1em" fill="currentColor" class="me-1" viewBox="0 0 16 16">
<path d="M2 6a6 6 0 1 1 10.174 4.31c-.203.196-.359.4-.453.619l-.762 1.769A.5.5 0 0 1 10.5 13a.5.5 0 0 1 0 1 .5.5 0 0 1 0 1l-.224.447a1 1 0 0 1-.894.553H6.618a1 1 0 0 1-.894-.553L5.5 15a.5.5 0 0 1 0-1 .5.5 0 0 1 0-1 .5.5 0 0 1-.46-.302l-.761-1.77a1.964 1.964 0 0 0-.453-.618A5.984 5.984 0 0 1 2 6zm6-5a5 5 0 0 0-3.479 8.592c.263.254.514.564.676.941L5.83 12h4.342l.632-1.467c.162-.377.413-.687.676-.941A5 5 0 0 0 8 1z"/> <use xlink:href="assets/bootstrap-icons.svg#lightbulb" />
</svg> </svg>
<ng-container i18n>Suggest an idea</ng-container> <ng-container i18n>Suggest an idea</ng-container>
</a> </a>
</div> </div>
</li> </li>
<li class="nav-item mt-2"> <li class="nav-item mt-2">
<div class="px-3 py-2 text-muted small"> <div class="px-3 py-2 text-muted small d-flex align-items-center flex-wrap">
{{versionString}} <div class="me-3">{{ versionString }}</div>
<div *ngIf="appRemoteVersion" class="version-check">
<ng-template #updateAvailablePopContent>
<span class="small">Paperless-ngx v{{ appRemoteVersion.version }} <ng-container i18n>is available.</ng-container><br/><ng-container i18n>Click to view.</ng-container></span>
</ng-template>
<ng-template #updateCheckingNotEnabledPopContent>
<span class="small"><ng-container i18n>Checking for updates is disabled.</ng-container><br/><ng-container i18n>Click for more information.</ng-container></span>
</ng-template>
<ng-container *ngIf="appRemoteVersion.feature_is_set; else updateCheckNotSet">
<a *ngIf="appRemoteVersion.update_available" class="small text-decoration-none" target="_blank" rel="noopener noreferrer" href="https://github.com/paperless-ngx/paperless-ngx/releases"
[ngbPopover]="updateAvailablePopContent" popoverClass="shadow" triggers="mouseenter:mouseleave" container="body">
<svg fill="currentColor" class="me-1" width="1.2em" height="1.2em" style="vertical-align: text-top;" viewBox="0 0 16 16">
<use xlink:href="assets/bootstrap-icons.svg#info-circle" />
</svg>
<ng-container *ngIf="appRemoteVersion?.update_available" i18n>Update available</ng-container>
</a>
</ng-container>
<ng-template #updateCheckNotSet>
<a class="small text-decoration-none" target="_blank" rel="noopener noreferrer" href="https://paperless-ngx.readthedocs.io/en/latest/configuration.html#update-checking"
[ngbPopover]="updateCheckingNotEnabledPopContent" popoverClass="shadow" triggers="mouseenter:mouseleave" container="body">
<svg fill="currentColor" class="me-1" width="1.2em" height="1.2em" style="vertical-align: text-top;" viewBox="0 0 16 16">
<use xlink:href="assets/bootstrap-icons.svg#info-circle" />
</svg>
</a>
</ng-template>
</div>
</div> </div>
</li> </li>
</ul> </ul>

View File

@@ -1,4 +1,3 @@
@import "/src/theme";
/* /*
* Sidebar * Sidebar
*/ */
@@ -35,22 +34,24 @@
.sidebar .nav-link { .sidebar .nav-link {
font-weight: 500; font-weight: 500;
color: #333;
}
.sidebar .nav-link .sidebaricon { &:hover, &.active, &:focus {
margin-right: 4px; color: var(--bs-primary);
color: #999; }
}
.sidebar .nav-link.active { &:focus-visible {
color: $primary; outline: none;
font-weight: bold; background-color: var(--bs-body-bg);
} }
.sidebar .nav-link.active .sidebaricon, &.active {
.sidebar .nav-link:hover .sidebaricon { font-weight: bold;
color: inherit; }
.sidebaricon {
margin-right: 4px;
color: inherit;
}
} }
.sidebar-heading { .sidebar-heading {
@@ -172,10 +173,29 @@
} }
&:focus { &:focus {
background-color: #fff; background-color: rgba(0, 0, 0, 0.3);
color: #212529; color: var(--bs-light);
flex-grow: 1; flex-grow: 1;
padding-left: 0.5rem; padding-left: 0.5rem;
} }
} }
} }
.version-check {
animation: pulse 2s ease-in-out 0s 1;
}
@keyframes pulse {
0% {
opacity: 0;
}
25% {
opacity: 100%;
}
75% {
opacity: 0;
}
100% {
opacity: 100%;
}
}

View File

@@ -1,25 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AppFrameComponent } from './app-frame.component';
describe('AppFrameComponent', () => {
let component: AppFrameComponent;
let fixture: ComponentFixture<AppFrameComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ AppFrameComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(AppFrameComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -1,36 +1,55 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core'
import { FormControl } from '@angular/forms'; import { FormControl } from '@angular/forms'
import { ActivatedRoute, Router, Params } from '@angular/router'; import { ActivatedRoute, Router, Params } from '@angular/router'
import { from, Observable, Subscription, BehaviorSubject } from 'rxjs'; import { from, Observable, Subscription, BehaviorSubject } from 'rxjs'
import { debounceTime, distinctUntilChanged, map, switchMap, first } from 'rxjs/operators'; import {
import { PaperlessDocument } from 'src/app/data/paperless-document'; debounceTime,
import { OpenDocumentsService } from 'src/app/services/open-documents.service'; distinctUntilChanged,
import { SavedViewService } from 'src/app/services/rest/saved-view.service'; map,
import { SearchService } from 'src/app/services/rest/search.service'; switchMap,
import { environment } from 'src/environments/environment'; first,
import { DocumentDetailComponent } from '../document-detail/document-detail.component'; } from 'rxjs/operators'
import { Meta } from '@angular/platform-browser'; import { PaperlessDocument } from 'src/app/data/paperless-document'
import { DocumentListViewService } from 'src/app/services/document-list-view.service'; import { OpenDocumentsService } from 'src/app/services/open-documents.service'
import { FILTER_FULLTEXT_QUERY } from 'src/app/data/filter-rule-type'; import { SavedViewService } from 'src/app/services/rest/saved-view.service'
import { SearchService } from 'src/app/services/rest/search.service'
import { environment } from 'src/environments/environment'
import { DocumentDetailComponent } from '../document-detail/document-detail.component'
import { Meta } from '@angular/platform-browser'
import { DocumentListViewService } from 'src/app/services/document-list-view.service'
import { FILTER_FULLTEXT_QUERY } from 'src/app/data/filter-rule-type'
import {
RemoteVersionService,
AppRemoteVersion,
} from 'src/app/services/rest/remote-version.service'
import { QueryParamsService } from 'src/app/services/query-params.service'
@Component({ @Component({
selector: 'app-app-frame', selector: 'app-app-frame',
templateUrl: './app-frame.component.html', templateUrl: './app-frame.component.html',
styleUrls: ['./app-frame.component.scss'] styleUrls: ['./app-frame.component.scss'],
}) })
export class AppFrameComponent { export class AppFrameComponent {
constructor(
constructor (
public router: Router, public router: Router,
private activatedRoute: ActivatedRoute, private activatedRoute: ActivatedRoute,
private openDocumentsService: OpenDocumentsService, private openDocumentsService: OpenDocumentsService,
private searchService: SearchService, private searchService: SearchService,
public savedViewService: SavedViewService, public savedViewService: SavedViewService,
private list: DocumentListViewService, private list: DocumentListViewService,
private meta: Meta private meta: Meta,
) { } private remoteVersionService: RemoteVersionService,
private queryParamsService: QueryParamsService
) {
this.remoteVersionService
.checkForUpdates()
.subscribe((appRemoteVersion: AppRemoteVersion) => {
this.appRemoteVersion = appRemoteVersion
})
}
versionString = `${environment.appTitle} ${environment.version}` versionString = `${environment.appTitle} ${environment.version}`
appRemoteVersion
isMenuCollapsed: boolean = true isMenuCollapsed: boolean = true
@@ -48,14 +67,14 @@ export class AppFrameComponent {
text$.pipe( text$.pipe(
debounceTime(200), debounceTime(200),
distinctUntilChanged(), distinctUntilChanged(),
map(term => { map((term) => {
if (term.lastIndexOf(' ') != -1) { if (term.lastIndexOf(' ') != -1) {
return term.substring(term.lastIndexOf(' ') + 1) return term.substring(term.lastIndexOf(' ') + 1)
} else { } else {
return term return term
} }
}), }),
switchMap(term => switchMap((term) =>
term.length < 2 ? from([[]]) : this.searchService.autocomplete(term) term.length < 2 ? from([[]]) : this.searchService.autocomplete(term)
) )
) )
@@ -66,49 +85,63 @@ export class AppFrameComponent {
let lastSpaceIndex = currentSearch.lastIndexOf(' ') let lastSpaceIndex = currentSearch.lastIndexOf(' ')
if (lastSpaceIndex != -1) { if (lastSpaceIndex != -1) {
currentSearch = currentSearch.substring(0, lastSpaceIndex + 1) currentSearch = currentSearch.substring(0, lastSpaceIndex + 1)
currentSearch += event.item + " " currentSearch += event.item + ' '
} else { } else {
currentSearch = event.item + " " currentSearch = event.item + ' '
} }
this.searchField.patchValue(currentSearch) this.searchField.patchValue(currentSearch)
} }
search() { search() {
this.closeMenu() this.closeMenu()
this.list.quickFilter([{rule_type: FILTER_FULLTEXT_QUERY, value: this.searchField.value}]) this.queryParamsService.navigateWithFilterRules([
{
rule_type: FILTER_FULLTEXT_QUERY,
value: (this.searchField.value as string).trim(),
},
])
} }
closeDocument(d: PaperlessDocument) { closeDocument(d: PaperlessDocument) {
this.openDocumentsService.closeDocument(d).pipe(first()).subscribe(confirmed => { this.openDocumentsService
if (confirmed) { .closeDocument(d)
this.closeMenu() .pipe(first())
let route = this.activatedRoute.snapshot .subscribe((confirmed) => {
while (route.firstChild) { if (confirmed) {
route = route.firstChild this.closeMenu()
let route = this.activatedRoute.snapshot
while (route.firstChild) {
route = route.firstChild
}
if (
route.component == DocumentDetailComponent &&
route.params['id'] == d.id
) {
this.router.navigate([''])
}
} }
if (route.component == DocumentDetailComponent && route.params['id'] == d.id) { })
this.router.navigate([""])
}
}
})
} }
closeAll() { closeAll() {
// user may need to confirm losing unsaved changes // user may need to confirm losing unsaved changes
this.openDocumentsService.closeAll().pipe(first()).subscribe(confirmed => { this.openDocumentsService
if (confirmed) { .closeAll()
this.closeMenu() .pipe(first())
.subscribe((confirmed) => {
if (confirmed) {
this.closeMenu()
// TODO: is there a better way to do this? // TODO: is there a better way to do this?
let route = this.activatedRoute let route = this.activatedRoute
while (route.firstChild) { while (route.firstChild) {
route = route.firstChild route = route.firstChild
}
if (route.component === DocumentDetailComponent) {
this.router.navigate([''])
}
} }
if (route.component === DocumentDetailComponent) { })
this.router.navigate([""])
}
}
})
} }
get displayName() { get displayName() {
@@ -123,5 +156,4 @@ export class AppFrameComponent {
return null return null
} }
} }
} }

View File

@@ -8,9 +8,12 @@
<p *ngIf="message">{{message}}</p> <p *ngIf="message">{{message}}</p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-outline-dark" (click)="cancel()" [disabled]="!buttonsEnabled" i18n>Cancel</button> <button type="button" class="btn btn-outline-secondary" (click)="cancel()" [disabled]="!buttonsEnabled" i18n>
<span class="d-inline-block" style="padding-bottom: 1px;" >Cancel</span>
</button>
<button type="button" class="btn" [class]="btnClass" (click)="confirm()" [disabled]="!confirmButtonEnabled || !buttonsEnabled"> <button type="button" class="btn" [class]="btnClass" (click)="confirm()" [disabled]="!confirmButtonEnabled || !buttonsEnabled">
{{btnCaption}} {{btnCaption}}
<span *ngIf="!confirmButtonEnabled"> ({{seconds}})</span> <ngb-progressbar *ngIf="!confirmButtonEnabled" style="height: 1px;" type="dark" [max]="secondsTotal" [value]="seconds"></ngb-progressbar>
<span class="visually-hidden">{{ seconds | number: '1.0-0' }} seconds</span>
</button> </button>
</div> </div>

View File

@@ -1,25 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ConfirmDialogComponent } from './confirm-dialog.component';
describe('ConfirmDialogComponent', () => {
let component: ConfirmDialogComponent;
let fixture: ComponentFixture<ConfirmDialogComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ ConfirmDialogComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(ConfirmDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

Some files were not shown because too many files have changed in this diff Show More