558 Commits

Author SHA1 Message Date
David Martin
a82fb87e82 Add config settings to set the start and the end of the financial year.
Now we allow to filter for any financial year dates. Note that we also
only show the financial year filter if the dates are actually set.
2017-08-24 20:51:09 +10:00
David Martin
44f2a71f74 Add a basic financial year filter for the document overview.
For now we simply hardcode the dates for the AU financial years. We
simply show a list of financial years and filter the documents
accordingly.
2017-08-24 20:20:00 +10:00
Daniel Quinn
667b73f6cc Merge pull request #250 from brightdroid/master
create documents subfolder folder if they do not exist
2017-08-12 14:39:22 +01:00
Christoph Roeder
182637f6f6 create documents subfolder folder if they do not exist 2017-07-31 21:35:41 +02:00
Daniel Quinn
0ceac9ac61 Merge pull request #247 from danielquinn/issue/235
Allow correspondents to be deleted without deleting their documents
2017-07-15 19:41:33 +01:00
Daniel Quinn
fb4407fe65 Allow correspondents to be deleted without deleting their documents
Fixes #235
2017-07-15 19:13:10 +01:00
Daniel Quinn
cd21c9c451 Detect .tif files properly
Fixes #232
2017-07-15 19:02:11 +01:00
Daniel Quinn
09b8810600 Merge pull request #246 from kskyten/vb_memory
Add memory to the virtual machine
2017-07-10 15:02:45 +01:00
Kusti Skytén
96f072379f Add memory to the virtual machine
Fixes #244
2017-07-10 16:55:51 +03:00
Daniel Quinn
21e588cd35 Merge pull request #245 from tooomm/patch-1
README: unify badges (versioneye)
2017-07-09 18:25:28 +01:00
tooomm
6c36158857 unify badges (versioneye)
normal > flat style
2017-07-09 15:17:42 +02:00
Daniel Quinn
bce8373de8 Merge pull request #242 from MasterofJOKers/setup_collectstatic
Mention "collectstatic" in the docs
2017-06-27 13:07:07 +01:00
MasterofJOKers
94c24137c7 Mention "collectstatic" in the docs
When using the built-in webserver in debug mode, the static files are
handled automatically. From the Django docs:

	During development, if you use django.contrib.staticfiles, this will
	be done automatically by runserver when DEBUG is set to True (see
	django.contrib.staticfiles.views.serve()).

	This method is grossly inefficient and probably insecure, so it is
	unsuitable for production.

This means, when using a real webserver, it also has to serve the static
files, i.e.  CSS and JavaScript. For that, one needs to run `./manage.py
collectstatic` first.
2017-06-26 17:08:37 +02:00
Daniel Quinn
33bd9fb44b Merge pull request #240 from ddddavidmartin/timezone_documentation_clarification
Add link to Django documentation for time zone setting in example config.
2017-06-24 09:24:42 +01:00
David Martin
07652b6be0 Add link to documentation for time zone setting in example config.
It is not obvious which time zones the option in the config file
accepts. Having a link to the official django documentation makes it
clear.
2017-06-24 12:27:26 +10:00
Daniel Quinn
d9abee48f2 Move testing ENV vars into pytest.ini 2017-06-19 10:57:30 +01:00
Daniel Quinn
1cb5b62ead Fix test for new email secret 2017-06-19 10:24:23 +01:00
Daniel Quinn
215e4b4556 Remove debugging info 2017-06-19 09:22:26 +01:00
Daniel Quinn
2d83a2f013 Drop SHARED_SECRET in favour of EMAIL_SECRET
Originally we used SHARED secret both for email and for the API.  That
was a bad idea, and now that we're only using this value for one case,
I've renamed it to reflect its actual use.
2017-06-18 22:08:42 +01:00
Daniel Quinn
f04bada2b7 Merge pull request #237 from danielquinn/fix-http-post
Fix http post
2017-06-13 17:52:48 +01:00
Daniel Quinn
9c664b12b3 Merge pull request #238 from Strubbl/fix-shellcheck-issues
docker-entrypoint.sh: fix shellcheck issues
2017-06-13 17:51:49 +01:00
Sven Fischer
951477224e docker-entrypoint.sh: fix shellcheck issues
issues found by shellcheck were:

```
$ shellcheck docker-entrypoint.sh

In docker-entrypoint.sh line 10:
    if [[ ${USERMAP_UID} != ${USERMAP_ORIG_UID} || ${USERMAP_GID} != ${USERMAP_ORIG_GID} ]]; then
                            ^-- SC2053: Quote the rhs of != in [[ ]] to prevent glob matching.
                                                                     ^-- SC2053: Quote the rhs of != in [[ ]] to prevent glob matching.

In docker-entrypoint.sh line 12:
        groupmod -g ${USERMAP_GID} paperless
                    ^-- SC2086: Double quote to prevent globbing and word splitting.

In docker-entrypoint.sh line 65:
        if dpkg -s "$pkg" 2>&1 > /dev/null; then
                          ^-- SC2069: The order of the 2>&1 and the redirect matters. The 2>&1 has to be last.

In docker-entrypoint.sh line 69:
        if ! apt-cache show "$pkg" 2>&1 > /dev/null; then
                                   ^-- SC2069: The order of the 2>&1 and the redirect matters. The 2>&1 has to be last.
```
2017-06-12 21:09:59 +02:00
Daniel Quinn
14c3e9d509 Fix HTTP POST of documents
After tinkering with this for about 2 hours, I'm reasonably sure this
ever worked.  This feature was added by me in haste and poked by by the
occasional contributor, and it suffered from neglect.

* Removed the requirement for signature generation in favour of simply
  requiring BasicAuth or a valid session id.
* Fixed a number of bugs in the form itself that would have ensured that
  the form never accepted anything.
* Documented it all properly so now (hopefully) people will have less
  trouble figuring it out in the future.
2017-06-11 01:23:37 +01:00
Daniel Quinn
5509918524 Remove unused imports & comments 2017-06-11 01:23:08 +01:00
Daniel Quinn
2234068b30 Merge pull request #233 from lucaskolstad/django_filters_installed_app
Add django_filters to INSTALLED_APPS
2017-05-31 10:39:49 +01:00
Lucas Kolstad
45d564e527 Add django_filters to INSTALLED_APPS 2017-05-30 15:05:34 -07:00
Daniel Quinn
1e958fa6f6 Preparing for 0.5.0
I hadn't realised that I hadn't released 0.5.0 yet, so I've amended the version numbers
2017-05-27 13:23:25 +01:00
Daniel Quinn
770d8ef2ee Update changelog for 0.5.1 2017-05-27 13:21:04 +01:00
Daniel Quinn
becf316e8e Merge pull request #228 from ddddavidmartin/extend_email_handling
Set email inbox in config file, fetch email at consumer startup and bring documentation up to date
2017-05-27 13:07:17 +01:00
Daniel Quinn
114efe703a Merge pull request #230 from ddddavidmartin/webserver_paperless_titles
Refer to Paperless in Django webserver titles and update Django documentation URLs
2017-05-27 13:00:46 +01:00
Daniel Quinn
799cf17c01 Merge pull request #229 from ddddavidmartin/clarify_systemd_instructions
Copy Paperless service files to systemd directory before enabling them.
2017-05-27 12:59:00 +01:00
Daniel Quinn
45dd138d8c Merge pull request #227 from ddddavidmartin/fix_forms_typos
Fix clened_data typos in forms.py.
2017-05-27 12:57:43 +01:00
Daniel Quinn
637f771791 Merge pull request #226 from ddddavidmartin/bump_pyocr_requirement_for_tesseract_4_support
Bump pyocr requirement to version 0.4.7 to support tesseract 4.0.0alpha.
2017-05-27 12:56:54 +01:00
David Martin
85564483ad Update version of remaining weblinks to Django documentation.
We are using Django 1.10 as per requirements.txt and should refer to its
documentation as well.
2017-05-27 08:49:03 +10:00
David Martin
b4c2e1b385 Update link to Django documentation in urls.py.
As per requirements.txt we are using Django version 1.10. It makes sense
to link to the documentation for that version as well.
Also, the documentation for the previous version has a notice on the top
that informs about the version being unsafe which is a bit disconcerting
when seeing it.
2017-05-25 20:22:05 +10:00
David Martin
344543b73c Refer to Paperless instead of Django in webserver pages.
It looks better to have the page titles refer to Paperless rather than
Django. The same with the login. Setting it in urls.py is based on this
stackoverflow response [0]. The proper documentation for the admin page
is under [1].

[0] https://stackoverflow.com/a/24983231
[1] https://docs.djangoproject.com/en/1.10/ref/contrib/admin/#adminsite-attributes
2017-05-25 20:16:59 +10:00
David Martin
7881bd4078 Copy Paperless service files to systemd directory before enabling them.
The problem with the original instruction is that systemd creates a
symlink pointing to the service file in the paperless directory. A user
is unlikely to leave the changes in the service files committed
(especially not on a master branch checkout) and they are easily lost and
the services fail to start without obvious reason.

To avoid this we simply copy the service files to the systemd directory
directly and use the files in the repository only as an example.
2017-05-24 22:48:35 +10:00
David Martin
92f23b1092 Mention safe characters for email titles in documentation.
This makes it clear that only a specific set of characters is allowed to
be used for email titles. It is worth mentioning this in the
documentation as it otherwise needs to be figured out from the Paperless
sources [0].

[0] SAFE_REGEX in src/documents/models.py
2017-05-23 11:16:38 +10:00
David Martin
5cb6fc3aec Clarify consumption documentation to match the current Paperless behaviour.
The configuration does not have to be hardcoded in settings.py anymore,
and instead happens in the config file. Also, we added that the emails
are checked at startup [0].

[0] see commit 3153bbd6a8d674362eccb4d48b8458b33298f6a9
2017-05-23 11:15:33 +10:00
David Martin
00c30e362d Fix clened_data typos in forms.py.
This is where linters shine. Either pylint or pyflake discovered these
typos and even suggested the correct name.
2017-05-21 17:05:49 +10:00
David Martin
91cebb5567 Fetch emails right at startup instead of waiting for 10 minutes.
Especially when first setting up the configuration for consuming
documents from emails it makes sense to quickly test the changes. Having
to wait for 10 minutes is not acceptable.

There are two ways around it that come to my mind: the simple approach
is to always fetch the emails when Paperless first starts. This way the
fetching of emails can be tested straight away.
The alternative would be to have a configuration option that allows to
set the interval in which emails are checked. The user could then reduce
it to test the setup and increase it again later on. This seems
needlessly complicated though, so fetching at startup it is.
2017-05-21 14:23:46 +10:00
David Martin
c6b1bce991 Capitalise Paperless in example config.
This is in line with how it is spelled in the rest of the config file.
2017-05-21 08:44:41 +10:00
David Martin
a9425b5e97 Connect to configured inbox instead of hardcoded one.
Now the retrieving of emails from the inbox set in the config file works
as expected.
2017-05-21 08:34:49 +10:00
David Martin
9d4c90199f Allow to configure the email inbox via config file.
Same as all the other parameters it makes sense to set it in the config
file as well.
2017-05-20 16:48:40 +10:00
David Martin
ca4c91794f Bump pyocr requirement to version 0.4.7 to support tesseract 4.0.0alpha.
The latest pyocr version now allows running it with the latest tesseract
version. Hopefully this means better OCR results.

I am not sure about whether there are binary packages for the latest
tesseract. But on my setup it was simply a case of checking out the
master branch [0] and compiling + installing from there. It seems to work
fine with paperless as well.

[0] https://github.com/tesseract-ocr/tesseract
2017-05-14 12:59:32 +10:00
Daniel Quinn
700b7fe257 add: migration for fuzzy matching 2017-05-11 22:09:30 -07:00
Daniel Quinn
8647674aad Merge branch 'master' of github.com:danielquinn/paperless 2017-05-10 16:14:14 -07:00
Daniel Quinn
04b423fe95 add: credit for ckut's import/export changes 2017-05-10 16:14:05 -07:00
Daniel Quinn
a21e64e98e fix: formatting cleanup 2017-05-10 17:38:00 -07:00
Daniel Quinn
d090ec6ead Merge pull request #224 from CkuT/exporter_improvements
WIP : Exporter improvements
2017-05-10 16:09:11 -07:00