mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 13:08:31 +02:00
handle datatypes in deserialization and update helptext
This commit is contained in:
parent
e85300eced
commit
6daf4fb2ee
1 changed files with 9 additions and 2 deletions
11
jrnl/args.py
11
jrnl/args.py
|
@ -23,6 +23,13 @@ def deserialize_config_args(input: str) -> dict:
|
||||||
runtime_modifications = {}
|
runtime_modifications = {}
|
||||||
for _p in _kvpairs:
|
for _p in _kvpairs:
|
||||||
l, r = _p.strip().split(":")
|
l, r = _p.strip().split(":")
|
||||||
|
r = r.strip()
|
||||||
|
if r.isdigit():
|
||||||
|
r = int(r)
|
||||||
|
elif r.lower() == "true":
|
||||||
|
r = True
|
||||||
|
elif r.lower() == "false":
|
||||||
|
r = False
|
||||||
runtime_modifications[l] = r
|
runtime_modifications[l] = r
|
||||||
return runtime_modifications
|
return runtime_modifications
|
||||||
|
|
||||||
|
@ -341,9 +348,9 @@ def parse_args(args=[]):
|
||||||
|
|
||||||
Examples: \n
|
Examples: \n
|
||||||
\t - Use a different editor for this jrnl entry, call: \n
|
\t - Use a different editor for this jrnl entry, call: \n
|
||||||
\t jrnl --config-override '{"editor": "nano"}' \n
|
\t jrnl --config-override editor: "nano" \n
|
||||||
\t - Override color selections\n
|
\t - Override color selections\n
|
||||||
\t jrnl --config-override '{"colors.body":"blue", "colors.title": "green"}
|
\t jrnl --config-override colors.body: blue, colors.title: green
|
||||||
""",
|
""",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue