Move files

This commit is contained in:
Andras Schmelczer 2022-07-04 19:31:15 +02:00
parent 3cf28379e8
commit 00cc8225c5
159 changed files with 31 additions and 49 deletions

View file

@ -0,0 +1,20 @@
import re
pattern = re.compile(
r"""
(?:^|\n) # new key-value pairs must start on a new line
\s* # leading whitespace is allowed
(?!\#) # the key cannot start with a `#` symbol
(\w+?) # then comes the key
\s*=\s* # the key and value are separated by an equal sign
(?: # then comes the value
"([^"]*)" # the value can be surrounded by quotes: "value"
| '([^']*)' # the value can be surrounded by quotes: 'value'
| `([^`]*)` # the value can be surrounded by quotes: `value`
| ([^#\n]*?) # or it is bare, in that case, the trailing whitespace is ignored
)
\s*(?:\#.*)? # comments can be added with the `#` symbol
(?=\n|$) # a key-value pairs are separated by new lines
""",
flags=re.UNICODE | re.VERBOSE,
)