Rephrased documentation
This commit is contained in:
parent
6624d6144b
commit
be3168d652
@ -1172,22 +1172,41 @@ assigns or creates tags if a properly formatted barcode is detected.
|
|||||||
|
|
||||||
Defaults to false.
|
Defaults to false.
|
||||||
|
|
||||||
#### [`CONSUMER_TAG_BARCODE_MAPPING=<json dict>`](#CONSUMER_TAG_BARCODE_MAPPING) {#CONSUMER_TAG_BARCODE_MAPPING}
|
#### [`PAPERLESS_CONSUMER_TAG_BARCODE_MAPPING=<json dict>`](#PAPERLESS_CONSUMER_TAG_BARCODE_MAPPING) {#PAPERLESS_CONSUMER_TAG_BARCODE_MAPPING}
|
||||||
|
|
||||||
: Defines a dictionary of filter regex and substitute expressions.
|
: Defines a dictionary of filter regex and substitute expressions.
|
||||||
|
|
||||||
A barcode is only considered for tagging if at least one regex is matching
|
|
||||||
the barcode text. Before looking up or creating a tag, the substitute
|
|
||||||
is applied.
|
|
||||||
|
|
||||||
This allows very versatile matching as well as reformatting and mapping of
|
|
||||||
barcode pattern to tag values.
|
|
||||||
|
|
||||||
Syntax: {"<regex>": "<substitute>" [,...]]}
|
Syntax: {"<regex>": "<substitute>" [,...]]}
|
||||||
|
|
||||||
Defaults to {"TAG:(.*)": "\\g<1>"} which includes any barcode beginning with
|
A barcode is considered for tagging if the barcode text matches
|
||||||
TAG: followed by any number of characters. It is substitured by its name
|
at least one of the provided <regex> pattern.
|
||||||
without the TAG: text.
|
|
||||||
|
If a match is found, the <substitute> rule is applied. This allows very
|
||||||
|
versatile reformatting and mapping of barcode pattern to tag values.
|
||||||
|
|
||||||
|
If a tag is not found it will be created.
|
||||||
|
|
||||||
|
Defaults to:
|
||||||
|
|
||||||
|
{"TAG:(.*)": "\\g<1>"} which defines
|
||||||
|
- a regex TAG:(.*) which includes barcodes beginning with TAG:
|
||||||
|
followed by any text that gets stored into match group #1 and
|
||||||
|
- a substitute \\g<1> that replaces the original barcode text
|
||||||
|
by the content in match group #1.
|
||||||
|
Consequently, the tag is the barcode text without its TAG: prefix.
|
||||||
|
|
||||||
|
More examples:
|
||||||
|
|
||||||
|
{"ASN12.*": "JOHN", "ASN13.*": "SMITH"} for example maps
|
||||||
|
- ASN12nnnn barcodes to the tag JOHN and
|
||||||
|
- ASN13nnnn barcodes to the tag SMITH.
|
||||||
|
|
||||||
|
{"T-J": "JOHN", "T-S": "SMITH", "T-D": "DOE"} directly maps
|
||||||
|
- T-J barcodes to the tag JOHN,
|
||||||
|
- T-S barcodes to the tag SMITH and
|
||||||
|
- T-D barcodes to the tag DOE.
|
||||||
|
|
||||||
|
Please refer to the Python regex documentation for more information.
|
||||||
|
|
||||||
## Audit Trail
|
## Audit Trail
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user