diff --git a/.travis.yml b/.travis.yml index aac58606d..8773c486c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,21 @@ matrix: - python: "3.5" - python: "3.6" - python: "3.7-dev" + - env: + - BUILD_DOCKER=1 + # Variable to add to publish the Docker image: + # * DOCKER_USERNAME + # * DOCKER_PASSWORD, to be encrypted, use `travis encrypt DOCKER_PASSWORD=` + services: + - docker + before_install: + - true + install: + - true + script: + - docker build --tag=the-paperless-project/paperless . + after_success: + - true install: - pip install --upgrade pip pipenv sphinx @@ -26,3 +41,17 @@ script: after_success: - coveralls + +deploy: + - provider: script + skip_cleanup: true + script: ci/deploy-docker + on: + tags: true + condition: '"${BUILD_DOCKER}" = 1' + - provider: script + skip_cleanup: true + script: ci/deploy-docker + on: + branch: master + condition: '"${BUILD_DOCKER}" = 1' diff --git a/Dockerfile b/Dockerfile index 3e8c731b9..cfcfbd25c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:3.8 -LABEL maintainer="The Paperless Project https://github.com/danielquinn/paperless" \ +LABEL maintainer="The Paperless Project https://github.com/the-paperless-project/paperless" \ contributors="Guy Addadi , Pit Kleyersburg , \ Sven Fischer " @@ -12,11 +12,30 @@ COPY scripts/docker-entrypoint.sh /sbin/docker-entrypoint.sh ENV PAPERLESS_EXPORT_DIR=/export \ PAPERLESS_CONSUMPTION_DIR=/consume - -RUN apk update --no-cache && apk add python3 gnupg libmagic libpq bash shadow curl \ - sudo poppler tesseract-ocr imagemagick ghostscript unpaper optipng && \ - apk add --virtual .build-dependencies \ - python3-dev poppler-dev postgresql-dev gcc g++ musl-dev zlib-dev jpeg-dev && \ +RUN apk add --no-cache \ + bash \ + curl \ + ghostscript \ + gnupg \ + imagemagick \ + libmagic \ + libpq \ + optipng \ + poppler \ + python3 \ + shadow \ + sudo \ + tesseract-ocr \ + unpaper && \ + apk add --no-cache --virtual .build-dependencies \ + g++ \ + gcc \ + jpeg-dev \ + musl-dev \ + poppler-dev \ + postgresql-dev \ + python3-dev \ + zlib-dev && \ # Install python dependencies python3 -m ensurepip && \ rm -r /usr/lib/python*/ensurepip && \ diff --git a/README-de.md b/README-de.md index 6fae95d74..e3314836a 100644 --- a/README-de.md +++ b/README-de.md @@ -1,8 +1,8 @@ [ [en](README.md) | de | [el](README-el.md) ] -![Paperless](https://raw.githubusercontent.com/danielquinn/paperless/master/src/paperless/static/paperless/img/logo-dark.png) +![Paperless](https://raw.githubusercontent.com/the-paperless-project/paperless/master/src/paperless/static/paperless/img/logo-dark.png) -[![Dokumentation](https://readthedocs.org/projects/paperless/badge/?version=latest)](https://paperless.readthedocs.org/) [![Chat](https://badges.gitter.im/danielquinn/paperless.svg)](https://gitter.im/danielquinn/paperless) [![Travis](https://travis-ci.org/danielquinn/paperless.svg?branch=master)](https://travis-ci.org/danielquinn/paperless) [![Coverage Status](https://coveralls.io/repos/github/danielquinn/paperless/badge.svg?branch=master)](https://coveralls.io/github/danielquinn/paperless?branch=master) [![Danke](https://img.shields.io/badge/THANKS-md-ff69b4.svg)](https://github.com/danielquinn/paperless/blob/master/THANKS.md) +[![Dokumentation](https://readthedocs.org/projects/paperless/badge/?version=latest)](https://paperless.readthedocs.org/) [![Chat](https://badges.gitter.im/the-paperless-project/paperless.svg)](https://gitter.im/danielquinn/paperless) [![Travis](https://travis-ci.org/the-paperless-project/paperless.svg?branch=master)](https://travis-ci.org/the-paperless-project/paperless) [![Coverage Status](https://coveralls.io/repos/github/the-paperless-project/paperless/badge.svg?branch=master)](https://coveralls.io/github/the-paperless-project/paperless?branch=master) [![Danke](https://img.shields.io/badge/THANKS-md-ff69b4.svg)](https://github.com/the-paperless-project/paperless/blob/master/THANKS.md) Indexiere und archiviere alle deine eingescannten Papierdokumente @@ -28,7 +28,7 @@ Paperless steuert nicht deinen Scanner, es hilft nur damit umzugehen, was der Sc Hier das, was du bekommt: -![Vorher und Nachher](https://raw.githubusercontent.com/danielquinn/paperless/master/docs/_static/screenshot.png) +![Vorher und Nachher](https://raw.githubusercontent.com/the-paperless-project/paperless/master/docs/_static/screenshot.png) ## Dokumentation diff --git a/README-el.md b/README-el.md index 027d987b6..de62a7516 100644 --- a/README-el.md +++ b/README-el.md @@ -1,8 +1,8 @@ [ [en](README.md) | [de](README-de.md) | el ] -![Paperless](https://raw.githubusercontent.com/danielquinn/paperless/master/src/paperless/static/paperless/img/logo-dark.png) +![Paperless](https://raw.githubusercontent.com/the-paperless-project/paperless/master/src/paperless/static/paperless/img/logo-dark.png) -[![Documentation](https://readthedocs.org/projects/paperless/badge/?version=latest)](https://paperless.readthedocs.org/) [![Chat](https://badges.gitter.im/danielquinn/paperless.svg)](https://gitter.im/danielquinn/paperless) [![Travis](https://travis-ci.org/danielquinn/paperless.svg?branch=master)](https://travis-ci.org/danielquinn/paperless) [![Coverage Status](https://coveralls.io/repos/github/danielquinn/paperless/badge.svg?branch=master)](https://coveralls.io/github/danielquinn/paperless?branch=master) [![Thanks](https://img.shields.io/badge/THANKS-md-ff69b4.svg)](https://github.com/danielquinn/paperless/blob/master/THANKS.md) +[![Documentation](https://readthedocs.org/projects/paperless/badge/?version=latest)](https://paperless.readthedocs.org/) [![Chat](https://badges.gitter.im/the-paperless-project/paperless.svg)](https://gitter.im/danielquinn/paperless) [![Travis](https://travis-ci.org/the-paperless-project/paperless.svg?branch=master)](https://travis-ci.org/the-paperless-project/paperless) [![Coverage Status](https://coveralls.io/repos/github/the-paperless-project/paperless/badge.svg?branch=master)](https://coveralls.io/github/the-paperless-project/paperless?branch=master) [![Thanks](https://img.shields.io/badge/THANKS-md-ff69b4.svg)](https://github.com/the-paperless-project/paperless/blob/master/THANKS.md) Ευρετήριο και αρχείο για όλα σας τα σκαναρισμένα έγγραφα @@ -27,7 +27,7 @@ Αυτό είναι που θα πάρετε: -![Το πριν και το μετά](https://raw.githubusercontent.com/danielquinn/paperless/master/docs/_static/screenshot.png) +![Το πριν και το μετά](https://raw.githubusercontent.com/the-paperless-project/paperless/master/docs/_static/screenshot.png) ## Documentation diff --git a/README.md b/README.md index a258eca9f..002b857d0 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,13 @@ [ en | [de](README-de.md) | [el](README-el.md) ] -![Paperless](https://raw.githubusercontent.com/danielquinn/paperless/master/src/paperless/static/paperless/img/logo-dark.png) +![Paperless](https://raw.githubusercontent.com/the-paperless-project/paperless/master/src/paperless/static/paperless/img/logo-dark.png) -[![Documentation](https://readthedocs.org/projects/paperless/badge/?version=latest)](https://paperless.readthedocs.org/) [![Chat](https://badges.gitter.im/danielquinn/paperless.svg)](https://gitter.im/danielquinn/paperless) [![Travis](https://travis-ci.org/danielquinn/paperless.svg?branch=master)](https://travis-ci.org/danielquinn/paperless) [![Coverage Status](https://coveralls.io/repos/github/danielquinn/paperless/badge.svg?branch=master)](https://coveralls.io/github/danielquinn/paperless?branch=master) [![Thanks](https://img.shields.io/badge/THANKS-md-ff69b4.svg)](https://github.com/danielquinn/paperless/blob/master/THANKS.md) +[![Documentation](https://readthedocs.org/projects/paperless/badge/?version=latest)](https://paperless.readthedocs.org/) +[![Chat](https://badges.gitter.im/the-paperless-project/paperless.svg)](https://gitter.im/danielquinn/paperless) +[![Travis](https://travis-ci.org/the-paperless-project/paperless.svg?branch=master)](https://travis-ci.org/the-paperless-project/paperless) +[![Coverage Status](https://coveralls.io/repos/github/the-paperless-project/paperless/badge.svg?branch=master)](https://coveralls.io/github/the-paperless-project/paperless?branch=master) +[![StackShare](https://img.shields.io/badge/tech-stack-0690fa.svg?style=flat)](https://stackshare.io/the-paperless-project/the-paperless-project) +[![Thanks](https://img.shields.io/badge/THANKS-md-ff69b4.svg)](https://github.com/the-paperless-project/paperless/blob/master/THANKS.md) Index and archive all of your scanned paper documents @@ -27,12 +32,12 @@ Paperless does not control your scanner, it only helps you deal with what your s Here's what you get: -![The before and after](https://raw.githubusercontent.com/danielquinn/paperless/master/docs/_static/screenshot.png) +![The before and after](https://raw.githubusercontent.com/the-paperless-project/paperless/master/docs/_static/screenshot.png) ## Documentation -It's all available on [ReadTheDocs](https://paperless.readthedocs.org/). +It's all available on [ReadTheDocs](https://paperless.readthedocs.io/). ## Requirements @@ -63,11 +68,11 @@ Paperless has been around a while now, and people are starting to build stuff on * [Paperless Desktop](https://github.com/thomasbrueggemann/paperless-desktop): A desktop UI for your Paperless installation. Runs on Mac, Linux, and Windows. * [ansible-role-paperless](https://github.com/ovv/ansible-role-paperless): An easy way to get Paperless running via Ansible. - +* [paperless-cli](https://github.com/stgarf/paperless-cli): A golang command line binary to interact with a Paperless instance. ## Similar Projects -There's another project out there called [Mayan EDMS](https://mayan.readthedocs.org/en/latest/) that has a surprising amount of technical overlap with Paperless. Also based on Django and using a consumer model with Tesseract and Unpaper, Mayan EDMS is *much* more featureful and comes with a slick UI as well, but still in Python 2. It may be that Paperless consumes fewer resources, but to be honest, this is just a guess as I haven't tested this myself. One thing's for certain though, *Paperless* is a **way** better name. +There's another project out there called [Mayan EDMS](https://www.mayan-edms.com/) that has a surprising amount of technical overlap with Paperless. Also based on Django and using a consumer model with Tesseract and Unpaper, Mayan EDMS is *much* more featureful and comes with a slick UI as well, but still in Python 2. It may be that Paperless consumes fewer resources, but to be honest, this is just a guess as I haven't tested this myself. One thing's for certain though, *Paperless* is a **way** better name. ## Important Note diff --git a/ci/deploy-docker b/ci/deploy-docker new file mode 100755 index 000000000..f8de0666a --- /dev/null +++ b/ci/deploy-docker @@ -0,0 +1,15 @@ +#!/bin/bash + +if [ "${DOCKER_USERNAME}" == "" -o "${DOCKER_PASSWORD}" == "" ] +then + exit 0 +fi + +docker login --username=${DOCKER_USERNAME} --password=${DOCKER_PASSWORD} +if [ "${TRAVIS_TAG}" != "" ] +then + docker tag the-paperless-project/paperless the-paperless-project/paperless:${TRAVIS_TAG} + docker push the-paperless-project/paperless:${TRAVIS_TAG} +else + docker push the-paperless-project/paperless +fi diff --git a/docs/changelog.rst b/docs/changelog.rst index b5ffece99..8a0528a88 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -627,117 +627,117 @@ bulk of the work on this big change. .. _Colin Frei: https://github.com/colinfrei .. _khrise: https://github.com/khrise .. _syntonym: https://github.com/syntonym -.. _JOKer: https://github.com/JOKer +.. _JOKer: https://github.com/MasterofJOKers .. _Brian Cribbs: https://github.com/cribbstechnolog .. _Brendan M. Sleight: https://github.com/bmsleight -.. _#20: https://github.com/danielquinn/paperless/issues/20 -.. _#44: https://github.com/danielquinn/paperless/issues/44 -.. _#45: https://github.com/danielquinn/paperless/issues/45 -.. _#47: https://github.com/danielquinn/paperless/issues/47 -.. _#48: https://github.com/danielquinn/paperless/issues/48 -.. _#53: https://github.com/danielquinn/paperless/issues/53 -.. _#54: https://github.com/danielquinn/paperless/issues/54 -.. _#57: https://github.com/danielquinn/paperless/issues/57 -.. _#60: https://github.com/danielquinn/paperless/issues/60 -.. _#67: https://github.com/danielquinn/paperless/issues/67 -.. _#68: https://github.com/danielquinn/paperless/issues/68 -.. _#71: https://github.com/danielquinn/paperless/issues/71 -.. _#81: https://github.com/danielquinn/paperless/issues/81 -.. _#89: https://github.com/danielquinn/paperless/issues/89 -.. _#94: https://github.com/danielquinn/paperless/issues/94 -.. _#98: https://github.com/danielquinn/paperless/issues/98 -.. _#112: https://github.com/danielquinn/paperless/issues/112 -.. _#121: https://github.com/danielquinn/paperless/issues/121 -.. _#131: https://github.com/danielquinn/paperless/issues/131 -.. _#146: https://github.com/danielquinn/paperless/issues/146 -.. _#148: https://github.com/danielquinn/paperless/pull/148 -.. _#150: https://github.com/danielquinn/paperless/pull/150 -.. _#158: https://github.com/danielquinn/paperless/issues/158 -.. _#171: https://github.com/danielquinn/paperless/issues/171 -.. _#172: https://github.com/danielquinn/paperless/issues/172 -.. _#179: https://github.com/danielquinn/paperless/pull/179 -.. _#199: https://github.com/danielquinn/paperless/issues/199 -.. _#200: https://github.com/danielquinn/paperless/issues/200 -.. _#206: https://github.com/danielquinn/paperless/issues/206 -.. _#212: https://github.com/danielquinn/paperless/pull/212 -.. _#220: https://github.com/danielquinn/paperless/pull/220 -.. _#224: https://github.com/danielquinn/paperless/pull/224 -.. _#226: https://github.com/danielquinn/paperless/pull/226 -.. _#227: https://github.com/danielquinn/paperless/pull/227 -.. _#228: https://github.com/danielquinn/paperless/pull/228 -.. _#229: https://github.com/danielquinn/paperless/pull/229 -.. _#230: https://github.com/danielquinn/paperless/pull/230 -.. _#232: https://github.com/danielquinn/paperless/issues/232 -.. _#235: https://github.com/danielquinn/paperless/issues/235 -.. _#236: https://github.com/danielquinn/paperless/issues/236 -.. _#255: https://github.com/danielquinn/paperless/pull/255 -.. _#268: https://github.com/danielquinn/paperless/pull/268 -.. _#277: https://github.com/danielquinn/paperless/pull/277 -.. _#272: https://github.com/danielquinn/paperless/issues/272 -.. _#248: https://github.com/danielquinn/paperless/issues/248 -.. _#278: https://github.com/danielquinn/paperless/issues/248 -.. _#283: https://github.com/danielquinn/paperless/issues/283 -.. _#256: https://github.com/danielquinn/paperless/pull/256 -.. _#285: https://github.com/danielquinn/paperless/pull/285 -.. _#291: https://github.com/danielquinn/paperless/pull/291 -.. _#295: https://github.com/danielquinn/paperless/pull/295 -.. _#299: https://github.com/danielquinn/paperless/issues/299 -.. _#300: https://github.com/danielquinn/paperless/pull/300 -.. _#301: https://github.com/danielquinn/paperless/issues/301 -.. _#303: https://github.com/danielquinn/paperless/issues/303 -.. _#305: https://github.com/danielquinn/paperless/issues/305 -.. _#306: https://github.com/danielquinn/paperless/issues/306 -.. _#308: https://github.com/danielquinn/paperless/issues/308 -.. _#311: https://github.com/danielquinn/paperless/pull/311 -.. _#312: https://github.com/danielquinn/paperless/pull/312 -.. _#313: https://github.com/danielquinn/paperless/pull/313 -.. _#322: https://github.com/danielquinn/paperless/pull/322 -.. _#328: https://github.com/danielquinn/paperless/pull/328 -.. _#253: https://github.com/danielquinn/paperless/issues/253 -.. _#262: https://github.com/danielquinn/paperless/issues/262 -.. _#323: https://github.com/danielquinn/paperless/issues/323 -.. _#344: https://github.com/danielquinn/paperless/pull/344 -.. _#351: https://github.com/danielquinn/paperless/pull/351 -.. _#352: https://github.com/danielquinn/paperless/pull/352 -.. _#354: https://github.com/danielquinn/paperless/issues/354 -.. _#371: https://github.com/danielquinn/paperless/issues/371 -.. _#374: https://github.com/danielquinn/paperless/pull/374 -.. _#375: https://github.com/danielquinn/paperless/pull/375 -.. _#376: https://github.com/danielquinn/paperless/pull/376 -.. _#383: https://github.com/danielquinn/paperless/pull/383 -.. _#384: https://github.com/danielquinn/paperless/issues/384 -.. _#386: https://github.com/danielquinn/paperless/issues/386 -.. _#387: https://github.com/danielquinn/paperless/pull/387 -.. _#391: https://github.com/danielquinn/paperless/pull/391 -.. _#390: https://github.com/danielquinn/paperless/pull/390 -.. _#392: https://github.com/danielquinn/paperless/issues/392 -.. _#393: https://github.com/danielquinn/paperless/issues/393 -.. _#395: https://github.com/danielquinn/paperless/pull/395 -.. _#394: https://github.com/danielquinn/paperless/issues/394 -.. _#396: https://github.com/danielquinn/paperless/pull/396 -.. _#399: https://github.com/danielquinn/paperless/pull/399 -.. _#400: https://github.com/danielquinn/paperless/pull/400 -.. _#401: https://github.com/danielquinn/paperless/pull/401 -.. _#405: https://github.com/danielquinn/paperless/pull/405 -.. _#406: https://github.com/danielquinn/paperless/issues/406 -.. _#412: https://github.com/danielquinn/paperless/issues/412 -.. _#413: https://github.com/danielquinn/paperless/pull/413 -.. _#414: https://github.com/danielquinn/paperless/issues/414 -.. _#423: https://github.com/danielquinn/paperless/issues/423 -.. _#433: https://github.com/danielquinn/paperless/issues/433 -.. _#440: https://github.com/danielquinn/paperless/pull/440 -.. _#441: https://github.com/danielquinn/paperless/pull/441 -.. _#442: https://github.com/danielquinn/paperless/pull/442 -.. _#466: https://github.com/danielquinn/paperless/pull/466 -.. _#471: https://github.com/danielquinn/paperless/pull/471 -.. _#475: https://github.com/danielquinn/paperless/pull/475 -.. _#481: https://github.com/danielquinn/paperless/pull/481 -.. _#483: https://github.com/danielquinn/paperless/pull/483 -.. _#484: https://github.com/danielquinn/paperless/pull/484 -.. _#488: https://github.com/danielquinn/paperless/pull/488 -.. _#489: https://github.com/danielquinn/paperless/pull/489 -.. _#492: https://github.com/danielquinn/paperless/pull/492 +.. _#20: https://github.com/the-paperless-project/paperless/issues/20 +.. _#44: https://github.com/the-paperless-project/paperless/issues/44 +.. _#45: https://github.com/the-paperless-project/paperless/issues/45 +.. _#47: https://github.com/the-paperless-project/paperless/issues/47 +.. _#48: https://github.com/the-paperless-project/paperless/issues/48 +.. _#53: https://github.com/the-paperless-project/paperless/issues/53 +.. _#54: https://github.com/the-paperless-project/paperless/issues/54 +.. _#57: https://github.com/the-paperless-project/paperless/issues/57 +.. _#60: https://github.com/the-paperless-project/paperless/issues/60 +.. _#67: https://github.com/the-paperless-project/paperless/issues/67 +.. _#68: https://github.com/the-paperless-project/paperless/issues/68 +.. _#71: https://github.com/the-paperless-project/paperless/issues/71 +.. _#81: https://github.com/the-paperless-project/paperless/issues/81 +.. _#89: https://github.com/the-paperless-project/paperless/issues/89 +.. _#94: https://github.com/the-paperless-project/paperless/issues/94 +.. _#98: https://github.com/the-paperless-project/paperless/issues/98 +.. _#112: https://github.com/the-paperless-project/paperless/issues/112 +.. _#121: https://github.com/the-paperless-project/paperless/issues/121 +.. _#131: https://github.com/the-paperless-project/paperless/issues/131 +.. _#146: https://github.com/the-paperless-project/paperless/issues/146 +.. _#148: https://github.com/the-paperless-project/paperless/pull/148 +.. _#150: https://github.com/the-paperless-project/paperless/pull/150 +.. _#158: https://github.com/the-paperless-project/paperless/issues/158 +.. _#171: https://github.com/the-paperless-project/paperless/issues/171 +.. _#172: https://github.com/the-paperless-project/paperless/issues/172 +.. _#179: https://github.com/the-paperless-project/paperless/pull/179 +.. _#199: https://github.com/the-paperless-project/paperless/issues/199 +.. _#200: https://github.com/the-paperless-project/paperless/issues/200 +.. _#206: https://github.com/the-paperless-project/paperless/issues/206 +.. _#212: https://github.com/the-paperless-project/paperless/pull/212 +.. _#220: https://github.com/the-paperless-project/paperless/pull/220 +.. _#224: https://github.com/the-paperless-project/paperless/pull/224 +.. _#226: https://github.com/the-paperless-project/paperless/pull/226 +.. _#227: https://github.com/the-paperless-project/paperless/pull/227 +.. _#228: https://github.com/the-paperless-project/paperless/pull/228 +.. _#229: https://github.com/the-paperless-project/paperless/pull/229 +.. _#230: https://github.com/the-paperless-project/paperless/pull/230 +.. _#232: https://github.com/the-paperless-project/paperless/issues/232 +.. _#235: https://github.com/the-paperless-project/paperless/issues/235 +.. _#236: https://github.com/the-paperless-project/paperless/issues/236 +.. _#255: https://github.com/the-paperless-project/paperless/pull/255 +.. _#268: https://github.com/the-paperless-project/paperless/pull/268 +.. _#277: https://github.com/the-paperless-project/paperless/pull/277 +.. _#272: https://github.com/the-paperless-project/paperless/issues/272 +.. _#248: https://github.com/the-paperless-project/paperless/issues/248 +.. _#278: https://github.com/the-paperless-project/paperless/issues/248 +.. _#283: https://github.com/the-paperless-project/paperless/issues/283 +.. _#256: https://github.com/the-paperless-project/paperless/pull/256 +.. _#285: https://github.com/the-paperless-project/paperless/pull/285 +.. _#291: https://github.com/the-paperless-project/paperless/pull/291 +.. _#295: https://github.com/the-paperless-project/paperless/pull/295 +.. _#299: https://github.com/the-paperless-project/paperless/issues/299 +.. _#300: https://github.com/the-paperless-project/paperless/pull/300 +.. _#301: https://github.com/the-paperless-project/paperless/issues/301 +.. _#303: https://github.com/the-paperless-project/paperless/issues/303 +.. _#305: https://github.com/the-paperless-project/paperless/issues/305 +.. _#306: https://github.com/the-paperless-project/paperless/issues/306 +.. _#308: https://github.com/the-paperless-project/paperless/issues/308 +.. _#311: https://github.com/the-paperless-project/paperless/pull/311 +.. _#312: https://github.com/the-paperless-project/paperless/pull/312 +.. _#313: https://github.com/the-paperless-project/paperless/pull/313 +.. _#322: https://github.com/the-paperless-project/paperless/pull/322 +.. _#328: https://github.com/the-paperless-project/paperless/pull/328 +.. _#253: https://github.com/the-paperless-project/paperless/issues/253 +.. _#262: https://github.com/the-paperless-project/paperless/issues/262 +.. _#323: https://github.com/the-paperless-project/paperless/issues/323 +.. _#344: https://github.com/the-paperless-project/paperless/pull/344 +.. _#351: https://github.com/the-paperless-project/paperless/pull/351 +.. _#352: https://github.com/the-paperless-project/paperless/pull/352 +.. _#354: https://github.com/the-paperless-project/paperless/issues/354 +.. _#371: https://github.com/the-paperless-project/paperless/issues/371 +.. _#374: https://github.com/the-paperless-project/paperless/pull/374 +.. _#375: https://github.com/the-paperless-project/paperless/pull/375 +.. _#376: https://github.com/the-paperless-project/paperless/pull/376 +.. _#383: https://github.com/the-paperless-project/paperless/pull/383 +.. _#384: https://github.com/the-paperless-project/paperless/issues/384 +.. _#386: https://github.com/the-paperless-project/paperless/issues/386 +.. _#387: https://github.com/the-paperless-project/paperless/pull/387 +.. _#391: https://github.com/the-paperless-project/paperless/pull/391 +.. _#390: https://github.com/the-paperless-project/paperless/pull/390 +.. _#392: https://github.com/the-paperless-project/paperless/issues/392 +.. _#393: https://github.com/the-paperless-project/paperless/issues/393 +.. _#395: https://github.com/the-paperless-project/paperless/pull/395 +.. _#394: https://github.com/the-paperless-project/paperless/issues/394 +.. _#396: https://github.com/the-paperless-project/paperless/pull/396 +.. _#399: https://github.com/the-paperless-project/paperless/pull/399 +.. _#400: https://github.com/the-paperless-project/paperless/pull/400 +.. _#401: https://github.com/the-paperless-project/paperless/pull/401 +.. _#405: https://github.com/the-paperless-project/paperless/pull/405 +.. _#406: https://github.com/the-paperless-project/paperless/issues/406 +.. _#412: https://github.com/the-paperless-project/paperless/issues/412 +.. _#413: https://github.com/the-paperless-project/paperless/pull/413 +.. _#414: https://github.com/the-paperless-project/paperless/issues/414 +.. _#423: https://github.com/the-paperless-project/paperless/issues/423 +.. _#433: https://github.com/the-paperless-project/paperless/issues/433 +.. _#440: https://github.com/the-paperless-project/paperless/pull/440 +.. _#441: https://github.com/the-paperless-project/paperless/pull/441 +.. _#442: https://github.com/the-paperless-project/paperless/pull/442 +.. _#466: https://github.com/the-paperless-project/paperless/pull/466 +.. _#471: https://github.com/the-paperless-project/paperless/pull/471 +.. _#475: https://github.com/the-paperless-project/paperless/pull/475 +.. _#481: https://github.com/the-paperless-project/paperless/pull/481 +.. _#483: https://github.com/the-paperless-project/paperless/pull/483 +.. _#484: https://github.com/the-paperless-project/paperless/pull/484 +.. _#488: https://github.com/the-paperless-project/paperless/pull/488 +.. _#489: https://github.com/the-paperless-project/paperless/pull/489 +.. _#492: https://github.com/the-paperless-project/paperless/pull/492 .. _pipenv: https://docs.pipenv.org/ .. _a new home on Docker Hub: https://hub.docker.com/r/danielquinn/paperless/ diff --git a/docs/contributing.rst b/docs/contributing.rst index 4678ff3aa..9b18861a8 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -136,6 +136,6 @@ there, with a few small changes, but basically it boils down to: I'm proud to say that the CoC has never had to be enforced because everyone has been awesome, friendly, and professional. -.. _GitHub: https://github.com/danielquinn/paperless/issues +.. _GitHub: https://github.com/the-paperless-project/paperless/issues .. _very well documented: https://www.python.org/dev/peps/pep-0008/ -.. _code of conduct: https://github.com/danielquinn/paperless/blob/master/CODE_OF_CONDUCT.md +.. _code of conduct: https://github.com/the-paperless-project/paperless/blob/master/CODE_OF_CONDUCT.md diff --git a/docs/extending.rst b/docs/extending.rst index 25e05274f..2afc6367b 100644 --- a/docs/extending.rst +++ b/docs/extending.rst @@ -8,7 +8,7 @@ managed by way of modifying the code directly and issuing a pull request on `GitHub`_. However, over time the project has been evolving to be a little more "pluggable" so that users can write their own stuff that talks to it. -.. _GitHub: https://github.com/danielquinn/paperless +.. _GitHub: https://github.com/the-paperless-project/paperless .. _extending-parsers: @@ -106,7 +106,7 @@ The core Paperless functionality is based on this design, so if you want to see what a parser module should look like, have a look at `parsers.py`_, `signals.py`_, and `apps.py`_ in the `paperless_tesseract`_ module. -.. _parsers.py: https://github.com/danielquinn/paperless/blob/master/src/paperless_tesseract/parsers.py -.. _signals.py: https://github.com/danielquinn/paperless/blob/master/src/paperless_tesseract/signals.py -.. _apps.py: https://github.com/danielquinn/paperless/blob/master/src/paperless_tesseract/apps.py -.. _paperless_tesseract: https://github.com/danielquinn/paperless/blob/master/src/paperless_tesseract/ +.. _parsers.py: https://github.com/the-paperless-project/paperless/blob/master/src/paperless_tesseract/parsers.py +.. _signals.py: https://github.com/the-paperless-project/paperless/blob/master/src/paperless_tesseract/signals.py +.. _apps.py: https://github.com/the-paperless-project/paperless/blob/master/src/paperless_tesseract/apps.py +.. _paperless_tesseract: https://github.com/the-paperless-project/paperless/blob/master/src/paperless_tesseract/ diff --git a/docs/requirements.rst b/docs/requirements.rst index 2bfc5cdec..e528fdae7 100644 --- a/docs/requirements.rst +++ b/docs/requirements.rst @@ -52,7 +52,7 @@ with PDFs. Often this is the case with Apple systems using HomeBrew, but other Linuxes have been a problem as well. The solution appears to be to install ghostscript as well as ImageMagick: -.. _run into problems: https://github.com/danielquinn/paperless/issues/25 +.. _run into problems: https://github.com/the-paperless-project/paperless/issues/25 .. code:: bash @@ -92,7 +92,7 @@ enter it, and install the requirements using the ``requirements.txt`` file: $ . /path/to/arbitrary/directory/bin/activate $ pip install --requirement /path/to/paperless/requirements.txt -Now you're ready to go. Just remember to enter (activate) your virtualenv +Now you're ready to go. Just remember to enter (activate) your virtualenv whenever you want to use Paperless. diff --git a/docs/setup.rst b/docs/setup.rst index e679d0b30..3cf43f353 100644 --- a/docs/setup.rst +++ b/docs/setup.rst @@ -8,7 +8,7 @@ basic documentation is in order. If you follow along in this document and still have trouble, please open an `issue on GitHub`_ so I can fill in the gaps. -.. _issue on GitHub: https://github.com/danielquinn/paperless/issues +.. _issue on GitHub: https://github.com/the-paperless-project/paperless/issues .. _setup-download: @@ -21,7 +21,7 @@ either by using ``git``: .. code:: bash - $ git clone https://github.com/danielquinn/paperless.git + $ git clone https://github.com/the-paperless-project/paperless.git $ cd paperless or just download the tarball and go that route: @@ -29,7 +29,7 @@ or just download the tarball and go that route: .. code:: bash $ cd to the directory where you want to run Paperless - $ wget https://github.com/danielquinn/paperless/archive/master.zip + $ wget https://github.com/the-paperless-project/paperless/archive/master.zip $ unzip master.zip $ cd paperless-master @@ -152,15 +152,15 @@ Docker Method instructions in comments in the file. The only change that is a hard requirement is to specify where the consumption directory should mount.[#dockercomposeyml]_ - + .. caution:: - + If you are using NFS mounts for the consume directory you also need to change the command to turn off inotify as it doesn't work with NFS - + `command: ["document_consumer", "--no-inotify"]` - - + + 5. Modify ``docker-compose.env`` and adapt the following environment variables: ``PAPERLESS_PASSPHRASE`` diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index 99f3f1e55..944977f1d 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -72,15 +72,4 @@ with a DPI of 300, then merging the images into the single PDF with For more information on this and situations like it, you should take a look at `Issue #118`_ as that's where this tip originated. -.. _Issue #118: https://github.com/danielquinn/paperless/issues/118 - - -.. _troubleshooting-consumerlogs - - -Viewing Consumer logs ---------------------- - -.. code:: bash - - $ sudo journalctl -u paperless-consumer +.. _Issue #118: https://github.com/the-paperless-project/paperless/issues/118 \ No newline at end of file diff --git a/docs/utilities.rst b/docs/utilities.rst index f0ab76d26..e95ef4725 100644 --- a/docs/utilities.rst +++ b/docs/utilities.rst @@ -216,3 +216,62 @@ That's it. It'll loop over all of the documents in your database and attempt to match all of your tags to them. If one matches, it'll be applied. And don't worry, you can run this as often as you like, it won't double-tag a document. + +.. _utilities-encyption: + +Enabling Encrpytion +------------------- + +Let's say you've imported a few documents to play around with paperless and now +you are using it more seriously and want to enable encryption of your files. + +.. utilities-encryption-howto: + +Basic Syntax +............. + +Again we'll use the ``manage.py`` script, passing ``change_storage_type``: + +.. code:: bash + + $ /path/to/paperless/src/manage.py change_storage_type --help + usage: manage.py change_storage_type [-h] [--version] [-v {0,1,2,3}] + [--settings SETTINGS] + [--pythonpath PYTHONPATH] [--traceback] + [--no-color] [--passphrase PASSPHRASE] + {gpg,unencrypted} {gpg,unencrypted} + + This is how you migrate your stored documents from an encrypted state to an + unencrypted one (or vice-versa) + + positional arguments: + {gpg,unencrypted} The state you want to change your documents from + {gpg,unencrypted} The state you want to change your documents to + + optional arguments: + --passphrase PASSPHRASE + If PAPERLESS_PASSPHRASE isn't set already, you need to + specify it here + +Enabling Encryption +................... + +Basic usage to enable encryption of your document store (**USE A MORE SECURE PASSPHRASE**): + +(Note: If ``PAPERLESS_PASSPHRASE`` isn't set already, you need to specify it here) + +.. code:: bash + + $ /path/to/paperless/src/manage.py change_storage_type [--passphrase SECR3TP4SSPHRA$E] unencrypted gpg + + +Disabling Encryption +.................... + +Basic usage to enable encryption of your document store: + +(Note: Again, if ``PAPERLESS_PASSPHRASE`` isn't set already, you need to specify it here) + +.. code:: bash + + $ /path/to/paperless/src/manage.py change_storage_type [--passphrase SECR3TP4SSPHRA$E] gpg unencrypted diff --git a/paperless.conf.example b/paperless.conf.example index aed2eee71..05a6c9cca 100644 --- a/paperless.conf.example +++ b/paperless.conf.example @@ -247,6 +247,9 @@ PAPERLESS_EMAIL_SECRET="" # Convert (part of the ImageMagick suite) #PAPERLESS_CONVERT_BINARY=/usr/bin/convert +# Ghostscript +#PAPERLESS_GS_BINARY = /usr/bin/gs + # Unpaper #PAPERLESS_UNPAPER_BINARY=/usr/bin/unpaper diff --git a/presentation/index.html b/presentation/index.html index 25ce83ad9..4bb4b7cf5 100644 --- a/presentation/index.html +++ b/presentation/index.html @@ -177,7 +177,7 @@

Fork Me

  - https://github.com/danielquinn/paperless + https://github.com/the-paperless-project/paperless


diff --git a/requirements.txt b/requirements.txt index b98b44651..0885215c4 100755 --- a/requirements.txt +++ b/requirements.txt @@ -27,7 +27,7 @@ fuzzywuzzy[speedup]==0.15.0 gunicorn==19.9.0 idna==2.8 imagesize==1.1.0 -inotify-simple==1.1.8 +inotify-simple==1.1.8; sys_platform == 'linux' jinja2==2.10 langdetect==1.0.7 markupsafe==1.1.0 diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.sh index 76d87ec5b..5cfcd4023 100644 --- a/scripts/docker-entrypoint.sh +++ b/scripts/docker-entrypoint.sh @@ -82,7 +82,7 @@ install_languages() { if apk info -e "$pkg" > /dev/null 2>&1; then continue fi - if ! apk info "$pkg" > /dev/null 2>&1; then + if ! apk --no-cache info "$pkg" > /dev/null 2>&1; then continue fi diff --git a/src/documents/management/commands/change_storage_type.py b/src/documents/management/commands/change_storage_type.py index 668f534a9..344d3388d 100644 --- a/src/documents/management/commands/change_storage_type.py +++ b/src/documents/management/commands/change_storage_type.py @@ -75,7 +75,8 @@ class Command(BaseCommand): for document in encrypted_files: - print(coloured("Decrypting {}".format(document), "green")) + print(coloured("Decrypting {}".format( + document).encode('utf-8'), "green")) old_paths = [document.source_path, document.thumbnail_path] raw_document = GnuPG.decrypted(document.source_file, passphrase) diff --git a/src/paperless/settings.py b/src/paperless/settings.py index eee727287..917d1e64f 100644 --- a/src/paperless/settings.py +++ b/src/paperless/settings.py @@ -263,6 +263,9 @@ CONVERT_TMPDIR = os.getenv("PAPERLESS_CONVERT_TMPDIR") CONVERT_MEMORY_LIMIT = os.getenv("PAPERLESS_CONVERT_MEMORY_LIMIT") CONVERT_DENSITY = os.getenv("PAPERLESS_CONVERT_DENSITY") +# Ghostscript +GS_BINARY = os.getenv("PAPERLESS_GS_BINARY", "gs") + # OptiPNG OPTIPNG_BINARY = os.getenv("PAPERLESS_OPTIPNG_BINARY", "optipng") diff --git a/src/paperless_tesseract/parsers.py b/src/paperless_tesseract/parsers.py index fb8c1c3ec..fd7077834 100644 --- a/src/paperless_tesseract/parsers.py +++ b/src/paperless_tesseract/parsers.py @@ -29,6 +29,7 @@ class RasterisedDocumentParser(DocumentParser): """ CONVERT = settings.CONVERT_BINARY + GHOSTSCRIPT = settings.GS_BINARY DENSITY = settings.CONVERT_DENSITY if settings.CONVERT_DENSITY else 300 THREADS = int(settings.OCR_THREADS) if settings.OCR_THREADS else None UNPAPER = settings.UNPAPER_BINARY @@ -47,13 +48,40 @@ class RasterisedDocumentParser(DocumentParser): out_path = os.path.join(self.tempdir, "convert.png") # Run convert to get a decent thumbnail - run_convert( - self.CONVERT, - "-scale", "500x5000", - "-alpha", "remove", - "{}[0]".format(self.document_path), - out_path - ) + try: + run_convert( + self.CONVERT, + "-scale", "500x5000", + "-alpha", "remove", + "-strip", "-trim", + "{}[0]".format(self.document_path), + out_path + ) + except ParseError: + # if convert fails, fall back to extracting + # the first PDF page as a PNG using Ghostscript + self.log( + "warning", + "Thumbnail generation with ImageMagick failed, " + "falling back to Ghostscript." + ) + gs_out_path = os.path.join(self.tempdir, "gs_out.png") + cmd = [self.GHOSTSCRIPT, + "-q", + "-sDEVICE=pngalpha", + "-o", gs_out_path, + self.document_path] + if not subprocess.Popen(cmd).wait() == 0: + raise ParseError("Thumbnail (gs) failed at {}".format(cmd)) + # then run convert on the output from gs + run_convert( + self.CONVERT, + "-scale", "500x5000", + "-alpha", "remove", + "-strip", "-trim", + gs_out_path, + out_path + ) return out_path