Skip to content

Commit d117d6e

Browse files
committed
Document the option group feature
1 parent fe85eff commit d117d6e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Tested and run regularly on Fedora, but should work on other distributions with
2020
* Performance: scanner run in parallel with page post-processing
2121
* Limit parallel processing for very fast scanners or constrained environments (if sem installed)
2222
* Post-scan open scan output(s) in viewer
23+
* Configuration via default and named option groups
2324

2425
## Requirements
2526

@@ -97,6 +98,9 @@ OPTIONS
9798
contrast via --driver-options if supported by your hardware.
9899
--open
99100
After scanning, open the scan via xdg-open
101+
-og, --option-group
102+
A named option group. Useful for saving collections of options under a name e.g. 'receipt' for easy reuse.
103+
Use this option in combination with '--help' to show the location and content of the file and edit it manually.
100104
101105
CONFIGURATION
102106
<not shown, system-specific, run `--help` locally>
@@ -115,6 +119,25 @@ SEARCHABLE=1
115119
MODE_HW_DEFAULT=1
116120
```
117121

122+
Command line argument `--option-group foo` (or `-og foo`) will read the
123+
`foo` file in the standard XDG home config directory (use `-og foo --help`
124+
to see the exact location) for configuration.
125+
126+
For example, if one wishes to scan receipts always with crop, deskew, unpaper
127+
post-processing, and making them searchable via OCR, a `receipt` option group
128+
can be created by writing the following to a file named `recept` in the
129+
config directory:
130+
131+
```
132+
CROP=1
133+
DESKEW=1
134+
UNPAPER=1
135+
SEARCHABLE=1
136+
```
137+
138+
Command-line arguments will overwride settings in the default and named
139+
configurations.
140+
118141
### Tips
119142

120143
The default scanner device is set to `fujitsu`. If you have another scanner,

0 commit comments

Comments
 (0)