Skip to content

Commit

Permalink
add clarifications to README.md and config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
joheli committed Feb 19, 2024
1 parent b16dfdb commit 2e73dcb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ Now of course it is not very useful to just extract the term "apple pie" out of

#### Even further fine-grained control
You can even add more fine-grained control by appending characters after the string '===' (three equal signs):
- `m` (**m**ultiline) will allow multiline pattern matching
- `l` (**l**inebreak to space) will replace linebreaks with space (only applies for multiline matching)
- `c(x)` (**c**rop length to x) will crop the length of the returned string to x
- `?` (optional term) will mark the term as not optional; optional key `move_to_directory` (see [sample configuration file](configs/config.yml)) will ignore these terms
So e.g. a term "start@@@finish===mc(100)l?" will search for text between pattern "start" and "finish" over multiple lines, replace line breaks with space, crop the returned text to 100 characters, and mark the term as optional (not required).
- `m` (**m**ultiline) will allow multiline pattern matching (default: off)
- `l` (**l**inebreak to space) will replace linebreaks with space (only applies for multiline matching, default: off)
- `c(x)` (**c**rop length to x) will crop the length of the returned string to x (default: off)
- `?` (optional term) will mark the term as not optional (default: off, i.e. without the question mark the term is assumed to be required); optional key `move_to_directory` (see [sample configuration file](configs/config.yml)) will ignore these terms.

So e.g. a term "start@@@finish===mc(100)l?" will search for text between pattern "start" and "finish" over multiple lines, replace line breaks with space, crop the returned text to 100 characters, and mark the term as optional (e.g. not required).

## Using `rosinenpicker`

Expand Down
2 changes: 1 addition & 1 deletion configs/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ strategies:
# # optional, for csv, set export_csv_divider (defaults to ;)
# export_csv_divider: ';'
#
# # optional: if all terms are found, optionally move to specified directory
# # optional: if all *required terms* are found, optionally move to specified directory
# move_to_directory: '/path/to/another_directory'
#
# # optional: file_content_pattern - a regex pattern that has to return a match in the file contents
Expand Down

0 comments on commit 2e73dcb

Please sign in to comment.