mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-19 10:19:27 -05:00
Document the new date support in file names
This commit is contained in:
parent
a1a8eb00de
commit
b69d25d2b3
@ -45,19 +45,25 @@ you name the file right, it'll automatically set some values in the database
|
|||||||
for you. This is is the logic the consumer follows:
|
for you. This is is the logic the consumer follows:
|
||||||
|
|
||||||
1. Try to find the correspondent, title, and tags in the file name following
|
1. Try to find the correspondent, title, and tags in the file name following
|
||||||
|
the pattern: ``Date - Correspondent - Title - tag,tag,tag.pdf``. Note that
|
||||||
|
the format of the date is **rigidly defined** as ``YYYYMMDDHHMMSSZ``. The
|
||||||
|
``Z`` is for "Zulu time" AKA "UTC".
|
||||||
|
2. If that doesn't work, we skip the date and try this pattern:
|
||||||
the pattern: ``Correspondent - Title - tag,tag,tag.pdf``.
|
the pattern: ``Correspondent - Title - tag,tag,tag.pdf``.
|
||||||
2. If that doesn't work, try to find the correspondent and title in the file
|
3. If that doesn't work, we try to find the correspondent and title in the file
|
||||||
name following the pattern: ``Correspondent - Title.pdf``.
|
name following the pattern: ``Correspondent - Title.pdf``.
|
||||||
3. If that doesn't work, just assume that the name of the file is the title.
|
4. If that doesn't work, just assume that the name of the file is the title.
|
||||||
|
|
||||||
So given the above, the following examples would work as you'd expect:
|
So given the above, the following examples would work as you'd expect:
|
||||||
|
|
||||||
|
* ``20150314000700Z - Some Company Name - Invoice 2016-01-01 - money,invoices.pdf``
|
||||||
* ``Some Company Name - Invoice 2016-01-01 - money,invoices.pdf``
|
* ``Some Company Name - Invoice 2016-01-01 - money,invoices.pdf``
|
||||||
* ``Another Company - Letter of Reference.jpg``
|
* ``Another Company - Letter of Reference.jpg``
|
||||||
* ``Dad's Recipe for Pancakes.png``
|
* ``Dad's Recipe for Pancakes.png``
|
||||||
|
|
||||||
These however wouldn't work:
|
These however wouldn't work:
|
||||||
|
|
||||||
|
* ``2015-03-14 00:07:00 UTC - Some Company Name, Invoice 2016-01-01, money, invoices.pdf``
|
||||||
* ``Some Company Name, Invoice 2016-01-01, money, invoices.pdf``
|
* ``Some Company Name, Invoice 2016-01-01, money, invoices.pdf``
|
||||||
* ``Another Company- Letter of Reference.jpg``
|
* ``Another Company- Letter of Reference.jpg``
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user