1007 Commits

Author SHA1 Message Date
Daniel Quinn
1a044972a9 Minor dependency updates 2018-05-20 18:07:53 +01:00
Daniel Quinn
e4dacb8daa Update for project status 2018-05-20 17:52:46 +01:00
Daniel Quinn
d9b42c081d Add notes for #352 and #354 2018-05-20 17:28:10 +01:00
Daniel Quinn
3ac2e32bcf Allow the searching of documents by tag #354 2018-05-20 17:28:00 +01:00
Daniel Quinn
9d2252618c Merge pull request #352 from Strubbl/fix-unwanted-exit-in-docker-entrypoint.sh
fix bug where docker-entrypoint.sh exits w/o notice
2018-05-20 17:16:01 +01:00
Daniel Quinn
999475e4c6 Add hack to allow for logentries to show for all users. 2018-05-20 16:29:00 +01:00
Daniel Quinn
c2a7d043a4 Include changelog notes for better clickable area. 2018-05-20 16:28:42 +01:00
Daniel Quinn
8e7e7c3490 Merge pull request #344 from erikarvstedt/increase_link_area
[Help needed] Increase link area in documents listing
2018-05-20 14:58:08 +01:00
Sven Fischer
1c0801a3ec fix bug where docker-entrypoint.sh exits w/o notice
This commit fixes a nasty bug, where the docker-entrypoint.sh silently
exits without any error message. The test for a lock file can fail and
due to the `set -e` at the beginning of the file the bash script exists
without starting the paperless application.
It is fixed by moving the check for the existence of the lock file into
the if statement, where the `set -e` does not trigger an exit in case
the statement fails.

Additionally this commit enables the script to trap exit signals and in
that case deletes the lock file.
2018-05-15 19:34:21 +02:00
Erik Arvstedt
3db175dfe2 Add inotify support 2018-05-11 14:14:50 +02:00
Erik Arvstedt
b74b47423d Consumer loop: make sleep duration dynamic
Make the sleep duration dynamic to account for the time spent in
loop_step.
This improves responsiveness when repeatedly consuming newly
arriving docs.

Use float epoch seconds (time.time()) as the time type for
MailFetcher.last_checked to allow for natural time arithmetic.
2018-05-11 14:14:50 +02:00
Erik Arvstedt
aac17670de Refactor: renamings, extract fn 'loop'
Renamings:
loop -> loop_step
delta -> next_mail_time (this variable names a point in time, not a duration)

Extracting the 'loop' fn is a preparation for later commits where a
second type of loop is added.
2018-05-11 14:14:25 +02:00
Erik Arvstedt
8b37af994a Consider mtime of ignored files, garbage-collect ignore list
1. Store the mtime of ignored files so that we can reconsider them if
they have changed.

2. Regularly reset the ignore list to files that still exist in the
consumption dir. Previously, the list could grow indefinitely.
2018-05-11 14:05:30 +02:00
Erik Arvstedt
cc22204e5a Simplify ignoring docs 2018-05-11 14:05:29 +02:00
Erik Arvstedt
f56ec70aad Ensure docs have been unmodified for some time before consuming
Previously, the second mtime check for new files usually happened right
after the first one, which could have caused consumption of docs that
were still being modified.

We're now waiting for at least FILES_MIN_UNMODIFIED_DURATION (0.5s).

This also cleans up the logic by eliminating the consumer.stats attribute
and the weird double call to consumer.run().

Additionally, this a fixes memory leak in consumer.stats where paths could be
added but never removed if the corresponding files disappeared from
the consumer dir before being considered ready.
2018-05-11 14:05:29 +02:00
Erik Arvstedt
0db6ed225b Refactor: extract fn try_consume_file
The main purpose of this change is to make the following commits more
readable.
2018-05-11 14:05:28 +02:00
Erik Arvstedt
312a6a91b5 Use os.scandir instead of os.listdir
It's simpler and better suited for use cases introduced in later commits.
2018-05-11 14:05:25 +02:00
Erik Arvstedt
2c64e70754 Consume documents in order of increasing mtime
This increases overall usability, especially for multi-page scans.
Previously, the consumption order was undefined (see os.listdir())
2018-05-11 14:04:37 +02:00
Erik Arvstedt
9320230100 Refactor: extract fn 'make_dirs' 2018-05-11 14:04:36 +02:00
Erik Arvstedt
8ebe52a7db Fix list out of bounds error in mail message parsing
Check list length before accessing the first two elements of
'dispositions'.
The list may have only a single element ('inline') or may be empty in
mailformed emails.
2018-05-11 14:04:36 +02:00
Erik Arvstedt
260ce7d75c Set default empty PAPERLESS_EMAIL_SECRET
Previously, if the user didn't set PAPERLESS_EMAIL_SECRET, Paperless
failed with an error in check_body() because self.SECRET was None.
2018-05-11 14:04:31 +02:00
Erik Arvstedt
d5e56095ac Mail fetching: Only catch internal errors
Previously, all errors raised during mail fetching were silently caught
and printed without backtrace.

To increase robustness and ease debugging, we now fail with a backtrace
on unexpected errors.
2018-05-11 14:01:09 +02:00
Erik Arvstedt
8033f97ec3 Increase link area in documents listing
Increase the link area to include the whole visual header.

Fixes #335
2018-05-11 13:50:09 +02:00
Daniel Quinn
bce2d3dd22 Account for KeyError problem in #345 2018-04-28 12:20:43 +01:00
Daniel Quinn
f3f86242de Account for KeyError problem in #345 2018-04-28 12:19:53 +01:00
Ovv
4818cd11da Installation documentation setup
Issue #329
2018-04-25 19:51:21 +02:00
Daniel Quinn
1522af2ea5 Clean up test formatting a bit 2018-04-22 16:28:21 +01:00
Daniel Quinn
b7d321286f Remove old Python style 2018-04-22 16:28:03 +01:00
Daniel Quinn
fe5d55d2d1 Don't explode on invalid dates 2018-04-22 16:27:43 +01:00
Daniel Quinn
f0b8463ead Patch up thanks.md references 2018-04-22 16:11:58 +01:00
Daniel Quinn
e5466ee75c Merge pull request #340 from CkuT/issue_334
Fix LogEntry user when PAPERLESS_DISABLE_LOGIN is set to true
2018-04-22 15:51:25 +01:00
CkuT
0c28a5329c Fix LogEntry user when PAPERLESS_DISABLE_LOGIN is set to true 2018-04-17 21:03:18 +02:00
Daniel Quinn
d31c096f4a Update lockfile 2018-04-16 09:53:39 +01:00
Daniel Quinn
56e3bcefb2 Revert root redirection 2018-04-16 09:53:31 +01:00
Daniel Quinn
ce19c62a1b Put this file where it's supposed to be 2018-04-15 13:41:08 +01:00
Daniel Quinn
04625ab0e0 Document update for subdir support 2018-04-13 20:19:05 +01:00
Daniel Quinn
85fa861ce7 Remove the hard-coding of the thumbnail URL 2018-04-13 20:18:16 +01:00
Daniel Quinn
199ff5866a Allow STATIC_URL and MEDIA_URL to be configurable via env 2018-04-13 20:18:00 +01:00
Daniel Quinn
e12636f7d2 Use a named URL for the LOGIN_URL value 2018-04-13 20:17:31 +01:00
Daniel Quinn
b72aac7bd8 Dependencies update 2018-04-13 19:52:11 +01:00
Daniel Quinn
8f229fa98b Use a URL name for the redirect instead of a hard-coding 2018-04-13 19:45:14 +01:00
Daniel Quinn
e6006a046c Fix links and grammar 2018-04-13 19:43:56 +01:00
Daniel Quinn
02c162d304 Merge pull request #338 from Belonias/master
Greek Translation
2018-04-10 19:40:38 +01:00
Daniel Quinn
a65a1e6153 Ignore .pytest_cache 2018-04-10 19:37:55 +01:00
Daniel Quinn
f8c83d968d Add THANKS.md 2018-04-10 19:37:42 +01:00
Daniel Quinn
c502b96e2e Merge pull request #333 from erikarvstedt/fix-warnings
Fix runtime warning when adding log entries
2018-04-03 15:38:22 +01:00
Belonias
dae8188dc7 final(minor changes) 2018-04-01 22:39:40 +03:00
Belonias
807a30fbc1 final 2018-04-01 22:34:16 +03:00
Belonias
1b2761860b update 2018-03-31 21:10:45 +03:00
Erik Arvstedt
363b8ff9aa Fix runtime warning when adding log entries
LogEntry.action_time expects a Django timezone object instead of a builtin datetime.

This fixes a runtime warning of the following kind:
RuntimeWarning: DateTimeField LogEntry.action_time received a naive datetime (2018-03-28 20:53:01.714173) while time zone support is active.
2018-03-30 00:15:52 +02:00