Skip to content

Commit

Permalink
Merge branch 'beta' into l10n_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
shamoon committed Nov 20, 2022
2 parents 9ec8976 + 27f7f0a commit 25d014d
Show file tree
Hide file tree
Showing 66 changed files with 8,103 additions and 6,848 deletions.
10 changes: 9 additions & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,15 @@ body:
id: logs
attributes:
label: Webserver logs
description: If available, post any logs from the web server related to your issue.
description: Logs from the web server related to your issue.
render: bash
validations:
required: true
- type: textarea
id: logs_browser
attributes:
label: Browser logs
description: Logs from the web browser related to your issue, if needed
render: bash
- type: input
id: version
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ repos:
hooks:
- id: add-trailing-comma
exclude: "(migrations)"
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
files: ^src/
Expand All @@ -63,7 +63,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/asottile/pyupgrade
rev: v3.1.0
rev: v3.2.2
hooks:
- id: pyupgrade
exclude: "(migrations)"
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[![Crowdin](https://badges.crowdin.net/paperless-ngx/localized.svg)](https://crowdin.com/project/paperless-ngx)
[![Documentation Status](https://readthedocs.org/projects/paperless-ngx/badge/?version=latest)](https://paperless-ngx.readthedocs.io/en/latest/?badge=latest)
[![Coverage Status](https://coveralls.io/repos/github/paperless-ngx/paperless-ngx/badge.svg?branch=master)](https://coveralls.io/github/paperless-ngx/paperless-ngx?branch=master)
[![Chat on Matrix](https://matrix.to/img/matrix-badge.svg)](https://matrix.to/#/#paperless:adnidor.de)
[![Chat on Matrix](https://matrix.to/img/matrix-badge.svg)](https://matrix.to/#/%23paperlessngx%3Amatrix.org)

<p align="center">
<img src="https://github.com/paperless-ngx/paperless-ngx/raw/main/resources/logo/web/png/Black%20logo%20-%20no%20background.png#gh-light-mode-only" width="50%" />
Expand Down Expand Up @@ -105,6 +105,7 @@ Paperless has been around a while now, and people are starting to build stuff on
- [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 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.
- [Paperless Mobile](https://github.com/astubenbord/paperless-mobile): A modern, feature rich mobile application for Paperless.

These projects also exist, but their status and compatibility with paperless-ngx is unknown.

Expand Down
4 changes: 2 additions & 2 deletions docker/compose/docker-compose.mariadb-tika.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ services:
PAPERLESS_REDIS: redis://broker:6379
PAPERLESS_DBENGINE: mariadb
PAPERLESS_DBHOST: db
PAPERLESS_DBUSER: paperless
PAPERLESS_DBPASSWORD: paperless
PAPERLESS_DBUSER: paperless # only needed if non-default username
PAPERLESS_DBPASS: paperless # only needed if non-default password
PAPERLESS_DBPORT: 3306
PAPERLESS_TIKA_ENABLED: 1
PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000
Expand Down
4 changes: 2 additions & 2 deletions docker/compose/docker-compose.mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ services:
PAPERLESS_REDIS: redis://broker:6379
PAPERLESS_DBENGINE: mariadb
PAPERLESS_DBHOST: db
PAPERLESS_DBUSER: paperless
PAPERLESS_DBPASSWORD: paperless
PAPERLESS_DBUSER: paperless # only needed if non-default username
PAPERLESS_DBPASS: paperless # only needed if non-default password
PAPERLESS_DBPORT: 3306


Expand Down
3 changes: 1 addition & 2 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ initialize() {
install_languages() {
echo "Installing languages..."

local -r langs="$1"
read -ra langs <<<"$langs"
read -ra langs <<<"$1"

# Check that it is not empty
if [ ${#langs[@]} -eq 0 ]; then
Expand Down
8 changes: 8 additions & 0 deletions docs/administration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,14 @@ command:
The command takes no arguments and processes all your mail accounts and rules.

.. note::

As of October 2022 Microsoft no longer supports IMAP authentication for Exchange
servers, thus Exchange is no longer supported until a solution is implemented in
the Python IMAP library used by Paperless. See `learn.microsoft.com`_

.. _learn.microsoft.com: https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/deprecation-of-basic-authentication-exchange-online

.. _utilities-archiver:

Creating archived documents
Expand Down
7 changes: 7 additions & 0 deletions docs/advanced_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ which will in turn call `pdf2pdfocr.py`_ on your document, which will then
overwrite the file with an OCR'd version of the file and exit. At which point,
the consumption process will begin with the newly modified file.

The script's stdout and stderr will be logged line by line to the webserver log, along
with the exit code of the script.

.. _pdf2pdfocr.py: https://github.com/LeoFCardoso/pdf2pdfocr

.. _advanced-post_consume_script:
Expand Down Expand Up @@ -178,6 +181,10 @@ example, you can take a look at `post-consumption-example.sh`_ in this project.

The post consumption script cannot cancel the consumption process.

The script's stdout and stderr will be logged line by line to the webserver log, along
with the exit code of the script.


Docker
------
Assumed you have ``/home/foo/paperless-ngx/scripts/post-consumption-example.sh``.
Expand Down
14 changes: 14 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
# Changelog

## paperless-ngx 1.9.2

### Bug Fixes

- Bugfix: Allow PAPERLESS_OCR_CLEAN=none [@shamoon](https://github.com/shamoon) ([#1670](https://github.com/paperless-ngx/paperless-ngx/pull/1670))

### All App Changes

- Chore: Bumps version numbers to 1.9.2 [@stumpylog](https://github.com/stumpylog) ([#1666](https://github.com/paperless-ngx/paperless-ngx/pull/1666))

## paperless-ngx 1.9.1

### Notes

- Version 1.9.1 incorrectly displays the version string as 1.9.0

### Bug Fixes

- Bugfix: Fixes missing OCR mode skip_noarchive [@stumpylog](https://github.com/stumpylog) ([#1645](https://github.com/paperless-ngx/paperless-ngx/pull/1645))
Expand Down
42 changes: 42 additions & 0 deletions docs/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,48 @@ Migration to paperless-ngx is then performed in a few simple steps:
10. Optionally, follow the instructions below to migrate your existing data to PostgreSQL.


Migrating from LinuxServer.io Docker Image
========================

As with any upgrades and large changes, it is highly recommended to create a backup before
starting. This assumes the image was running using Docker Compose, but the instructions
are translatable to Docker commands as well.

1. Stop and remove the paperless container
2. If using an external database, stop the container
3. Update Redis configuration

a) If ``REDIS_URL`` is already set, change it to ``PAPERLESS_REDIS`` and continue
to step 4.
b) Otherwise, in the ``docker-compose.yml`` add a new service for Redis,
following `the example compose files <https://github.com/paperless-ngx/paperless-ngx/tree/main/docker/compose>`_
b) Set the environment variable ``PAPERLESS_REDIS`` so it points to the new Redis container

4. Update user mapping

a) If set, change the environment variable ``PUID`` to ``USERMAP_UID``
b) If set, change the environment variable ``PGID`` to ``USERMAP_GID``

5. Update configuration paths

a) Set the environment variable ``PAPERLESS_DATA_DIR``
to ``/config``

6. Update media paths

a) Set the environment variable ``PAPERLESS_MEDIA_ROOT``
to ``/data/media``

7. Update timezone

a) Set the environment variable ``PAPERLESS_TIME_ZONE``
to the same value as ``TZ``

8. Modify the ``image:`` to point to ``ghcr.io/paperless-ngx/paperless-ngx:latest`` or
a specific version if preferred.

9. Start the containers as before, using ``docker-compose``.

.. _setup-sqlite_to_psql:

Moving data from SQLite to PostgreSQL
Expand Down
9 changes: 9 additions & 0 deletions docs/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -317,3 +317,12 @@ Uploading or consuming multiple files at once results in many workers attempting
Consider changing to the PostgreSQL database if you will be processing many documents at once often. Otherwise,
try tweaking the ``PAPERLESS_DB_TIMEOUT`` setting to allow more time for the database to unlock. This may have
minor performance implications.


gunicorn fails to start with "is not a valid port number"
#########################################################

You are likely running using Kubernetes, which automatically creates an environment variable named `${serviceName}_PORT`.
This is the same environment variable which is used by Paperless to optionally change the port gunicorn listens on.

To fix this, set `PAPERLESS_PORT` again to your desired port, or the default of 8000.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</svg>
<input class="form-control form-control-sm" type="text" placeholder="Search documents" aria-label="Search"
[formControl]="searchField" [ngbTypeahead]="searchAutoComplete" (keyup)="searchFieldKeyup($event)" (selectItem)="itemSelected($event)" i18n-placeholder>
<button *ngIf="!searchFieldEmpty" class="btn btn-link btn-sm px-0 position-absolute top-0 end-0" (click)="resetSearchField()">
<button type="button" *ngIf="!searchFieldEmpty" class="btn btn-link btn-sm px-0 position-absolute top-0 end-0" (click)="resetSearchField()">
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-x me-1" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/>
</svg>
Expand Down
18 changes: 9 additions & 9 deletions src-ui/src/app/components/app-frame/app-frame.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ export class AppFrameComponent implements OnInit, ComponentCanDeactivate {
this.isMenuCollapsed = true
}

get openDocuments(): PaperlessDocument[] {
return this.openDocumentsService.getOpenDocuments()
}

@HostListener('window:beforeunload')
canDeactivate(): Observable<boolean> | boolean {
return !this.openDocumentsService.hasDirty()
}

searchField = new FormControl('')

get searchFieldEmpty(): boolean {
Expand All @@ -107,15 +116,6 @@ export class AppFrameComponent implements OnInit, ComponentCanDeactivate {
}
}

get openDocuments(): PaperlessDocument[] {
return this.openDocumentsService.getOpenDocuments()
}

@HostListener('window:beforeunload')
canDeactivate(): Observable<boolean> | boolean {
return !this.openDocumentsService.hasDirty()
}

searchAutoComplete = (text$: Observable<string>) =>
text$.pipe(
debounceTime(200),
Expand Down
2 changes: 1 addition & 1 deletion src-ui/src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const environment = {
apiBaseUrl: document.baseURI + 'api/',
apiVersion: '2',
appTitle: 'Paperless-ngx',
version: '1.9.2-dev',
version: '1.10.0-beta',
webSocketHost: window.location.host,
webSocketProtocol: window.location.protocol == 'https:' ? 'wss:' : 'ws:',
webSocketBaseUrl: base_url.pathname + 'ws/',
Expand Down

0 comments on commit 25d014d

Please sign in to comment.