mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-11 00:58:31 +02:00
Merge 3ca6ef89f4
into f2e207de85
This commit is contained in:
commit
1ffe3740e1
1 changed files with 13 additions and 5 deletions
8
jrnl.py
8
jrnl.py
|
@ -358,6 +358,14 @@ if __name__ == "__main__":
|
||||||
with open(CONFIG_PATH) as f:
|
with open(CONFIG_PATH) as f:
|
||||||
config = json.load(f)
|
config = json.load(f)
|
||||||
|
|
||||||
|
# update config file with settings introduced in a later version
|
||||||
|
missing_keys = set(default_config).difference(config)
|
||||||
|
if missing_keys:
|
||||||
|
for key in missing_keys:
|
||||||
|
config[key] = default_config[key]
|
||||||
|
with open(CONFIG_PATH, 'w') as f:
|
||||||
|
json.dump(config, f, indent=2)
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
composing = parser.add_argument_group('Composing', 'Will make an entry out of whatever follows as arguments')
|
composing = parser.add_argument_group('Composing', 'Will make an entry out of whatever follows as arguments')
|
||||||
composing.add_argument('-date', dest='date', help='Date, e.g. "yesterday at 5pm"')
|
composing.add_argument('-date', dest='date', help='Date, e.g. "yesterday at 5pm"')
|
||||||
|
|
Loading…
Add table
Reference in a new issue