diff options
author | Wolfgang Mader | 2018-01-22 23:01:49 +0100 |
---|---|---|
committer | Wolfgang Mader | 2018-01-22 23:01:49 +0100 |
commit | 24ae56855272cfd76943e1e69373d69d5bad15f3 (patch) | |
tree | 67772c27551723558ebd867d2874062ac047eb7f | |
download | aur-24ae56855272cfd76943e1e69373d69d5bad15f3.tar.gz |
Initally package version 1.1.0 of paperless
-rw-r--r-- | .SRCINFO | 33 | ||||
-rw-r--r-- | PKGBUILD | 41 | ||||
-rw-r--r-- | paperless-consumer.service | 11 | ||||
-rw-r--r-- | paperless-webserver.service | 11 | ||||
-rw-r--r-- | paperless.conf | 175 |
5 files changed, 271 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..0553fb232d41 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,33 @@ +pkgbase = paperless + pkgdesc = Scan, index, and archive all of your paper documents + pkgver = 1.1.0 + pkgrel = 1 + url = https://github.com/danielquinn/paperless + arch = any + license = GPL3 + depends = python-django + depends = python-django-extensions + depends = python-django-rest-framework + depends = python-django-crispy-forms + depends = python-django-filter + depends = python-fuzzywuzzy + depends = python-pyocr + depends = python-gnupg + depends = python-pilkit + depends = python-dotenv + depends = python-django-flat-responsive + depends = python-langdetect + depends = tesseract + depends = unpaper + options = !buildflags + source = https://github.com/danielquinn/paperless/archive/1.1.0.tar.gz + source = paperless.conf + source = paperless-consumer.service + source = paperless-webserver.service + sha512sums = SKIP + sha512sums = SKIP + sha512sums = SKIP + sha512sums = SKIP + +pkgname = paperless + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c30b3938360b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Wolfgang Mader <Wolfgang dot Mader at brain-frog dot de> + +pkgname=paperless +pkgver=1.1.0 +pkgrel=1 +pkgdesc="Scan, index, and archive all of your paper documents" +arch=('any') +url="https://github.com/danielquinn/paperless" +license=('GPL3') +options=(!buildflags) +depends=('python-django' 'python-django-extensions' 'python-django-rest-framework' 'python-django-crispy-forms' 'python-django-filter' 'python-fuzzywuzzy' 'python-pyocr' 'python-gnupg' 'python-pilkit' 'python-dotenv' 'python-django-flat-responsive' 'python-langdetect' 'tesseract' 'unpaper') +#backup=("etc/webapps/${pkgname}/application.rb") +source=("https://github.com/danielquinn/${pkgname}/archive/${pkgver}.tar.gz" + paperless.conf + paperless-consumer.service + paperless-webserver.service) +#install='gitlab.install' +sha512sums=(SKIP + SKIP + SKIP + SKIP) + +_datadir="/usr/share/webapps/${pkgname}" +_systemddir="/usr/lib/systemd/system/" + +package() { + mkdir -p ${pkgdir}/etc + install -m600 paperless.conf ${pkgdir}/etc/paperless.conf + + mkdir -p ${pkgdir}/${_systemddir} + install -m644 paperless-consumer.service ${pkgdir}/${_systemddir} + install -m644 paperless-webserver.service ${pkgdir}/${_systemddir} + + cd ${srcdir}/${pkgname}-${pkgver} + mkdir -p ${pkgdir}/${_datadir} + cp -R src ${pkgdir}/${_datadir} + + install -m760 -d ${pkgdir}/${_datadir}/data + install -m760 -d -D ${pkgdir}/${_datadir}/media/documents/originals + install -m760 -d -D ${pkgdir}/${_datadir}/media/documents/thumbnails +} diff --git a/paperless-consumer.service b/paperless-consumer.service new file mode 100644 index 000000000000..1b24fce93698 --- /dev/null +++ b/paperless-consumer.service @@ -0,0 +1,11 @@ +[Unit] +Description=Paperless consumer + +[Service] +User=paperless +Group=paperless +ExecStart=python /usr/share/webapps/paperless/src/manage.py document_consumer + +[Install] +WantedBy=multi-user.target + diff --git a/paperless-webserver.service b/paperless-webserver.service new file mode 100644 index 000000000000..b080a41e9660 --- /dev/null +++ b/paperless-webserver.service @@ -0,0 +1,11 @@ +[Unit] +Description=Paperless webserver + +[Service] +User=httpdjg +Group=httpdjg +ExecStart=python /usr/share/webapps/paperless/src/manage.py runserver 127.0.0.1:8000 + +[Install] +WantedBy=multi-user.target + diff --git a/paperless.conf b/paperless.conf new file mode 100644 index 000000000000..3680d7cc9a2d --- /dev/null +++ b/paperless.conf @@ -0,0 +1,175 @@ +# paperless.conf +# Set at least the values for +# PAPERLESS_CONSUMPTION_DIR +# PAPERLESS_PASSPHRASE +# If you want to run the default django-webserver comming with paperless on a +# public network, also set +# PAPERLESS_ALLOWED_HOSTS + +############################################################################### +#### Paths & Folders #### +############################################################################### + +# This where your documents should go to be consumed. Make sure that it exists +# and that the user running the paperless service can read/write its contents +# before you start Paperless. +PAPERLESS_CONSUMPTION_DIR="" + + +# You can specify where you want the SQLite database to be stored instead of +# the default location of /data/ within the install directory. +#PAPERLESS_DBDIR=/path/to/database/file + + +# Override the default MEDIA_ROOT here. This is where all files are stored. +# The default location is /media/documents/ within the install folder. +#PAPERLESS_MEDIADIR=/path/to/media + + +# Override the default STATIC_ROOT here. This is where all static files +# created using "collectstatic" manager command are stored. +#PAPERLESS_STATICDIR="" + + +# These values are required if you want paperless to check a particular email +# box every 10 minutes and attempt to consume documents from there. If you +# don't define a HOST, mail checking will just be disabled. +PAPERLESS_CONSUME_MAIL_HOST="" +PAPERLESS_CONSUME_MAIL_PORT="" +PAPERLESS_CONSUME_MAIL_USER="" +PAPERLESS_CONSUME_MAIL_PASS="" + +# Override the default IMAP inbox here. If not set Paperless defaults to +# "INBOX". +#PAPERLESS_CONSUME_MAIL_INBOX="INBOX" + +# Any email sent to the target account that does not contain this text will be +# ignored. +PAPERLESS_EMAIL_SECRET="" + + +############################################################################### +#### Security #### +############################################################################### + +# You must have a passphrase in order for Paperless to work at all. If you set +# this to "", GNUGPG will "encrypt" your PDF by writing it out as a zero-byte +# file. +# +# The passphrase you use here will be used when storing your documents in +# Paperless, but you can always export them in an unencrypted format by using +# document exporter. See the documentation for more information. +# +# One final note about the passphrase. Once you've consumed a document with +# one passphrase, DON'T CHANGE IT. Paperless assumes this to be a constant and +# can't properly export documents that were encrypted with an old passphrase if +# you've since changed it to a new one. +PAPERLESS_PASSPHRASE="secret" + + +# The secret key has a default that should be fine so long as you're hosting +# Paperless on a closed network. However, if you're putting this anywhere +# public, you should change the key to something unique and verbose. +#PAPERLESS_SECRET_KEY="change-me" + + +# 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 +# so leaves you open to HTTP host header attacks: +# https://docs.djangoproject.com/en/1.10/topics/security/#host-headers-virtual-hosting +# +# 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," +#PAPERLESS_ALLOWED_HOSTS="example.com,www.example.com" + +# To host paperless under a subpath url like example.com/paperless you set +# this value to /paperless. No trailing slash! +# +# https://docs.djangoproject.com/en/1.11/ref/settings/#force-script-name +#PAPERLESS_FORCE_SCRIPT_NAME="" + +############################################################################### +#### Software Tweaks #### +############################################################################### + +# After a document is consumed, Paperless can trigger an arbitrary script if +# you like. This script will be passed a number of arguments for you to work +# with. The default is blank, which means nothing will be executed. For more +# information, take a look at the docs: +# http://paperless.readthedocs.org/en/latest/consumption.html#hooking-into-the-consumption-process +#PAPERLESS_POST_CONSUME_SCRIPT="/path/to/an/arbitrary/script.sh" + + +# +# The following values use sensible defaults for modern systems, but if you're +# running Paperless on a low-resource device (like a Raspberry Pi), modifying +# some of these values may be necessary. +# + + +# By default, Paperless will attempt to use all available CPU cores to process +# a document, but if you would like to limit that, you can set this value to +# an integer: +#PAPERLESS_OCR_THREADS=1 + + +# Customize the default language that tesseract will attempt to use when +# parsing documents. It should be a 3-letter language code consistent with ISO +# 639: https://www.loc.gov/standards/iso639-2/php/code_list.php +#PAPERLESS_OCR_LANGUAGE=eng + + +# On smaller systems, or even in the case of Very Large Documents, the consumer +# may explode, complaining about how it's "unable to extend pixel cache". In +# such cases, try setting this to a reasonably low value, like 32000000. The +# default is to use whatever is necessary to do everything without writing to +# disk, and units are in megabytes. +# +# For more information on how to use this value, you should probably search +# the web for "MAGICK_MEMORY_LIMIT". +#PAPERLESS_CONVERT_MEMORY_LIMIT=0 + + +# Similar to the memory limit, if you've got a small system and your OS mounts +# /tmp as tmpfs, you should set this to a path that's on a physical disk, like +# /home/your_user/tmp or something. ImageMagick will use this as scratch space +# when crunching through very large documents. +# +# For more information on how to use this value, you should probably search +# the web for "MAGICK_TMPDIR". +#PAPERLESS_CONVERT_TMPDIR=/var/tmp/paperless + + +# By default the conversion density setting for documents is 300DPI, in some +# cases it has proven useful to configure a lesser value. +# This setting has a high impact on the physical size of tmp page files, +# the speed of document conversion, and can affect the accuracy of OCR +# results. Individual results can vary and this setting should be tested +# thoroughly against the documents you are importing to see if it has any +# impacts either negative or positive. +# Testing on limited document sets has shown a setting of 200 can cut the +# size of tmp files by 1/3, and speed up conversion by up to 4x +# with little impact to OCR accuracy. +#PAPERLESS_CONVERT_DENSITY=300 + + +# The number of seconds that Paperless will wait between checking +# PAPERLESS_CONSUMPTION_DIR. If you tend to write documents to this directory +# rarely, you may want to use a higher value than the default (10). +#PAPERLESS_CONSUMER_LOOP_TIME=10 + + +############################################################################### +#### Interface #### +############################################################################### + +# Override the default UTC time zone here. +# See https://docs.djangoproject.com/en/1.10/ref/settings/#std:setting-TIME_ZONE +# for details on how to set it. +#PAPERLESS_TIME_ZONE=UTC + + +# The number of items on each page in the web UI. This value must be a +# positive integer, but if you don't define one in paperless.conf, a default of +# 100 will be used. +#PAPERLESS_LIST_PER_PAGE=100 |