mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Better support for individual configs
This commit is contained in:
parent
33195829c4
commit
cb6ee5889e
2 changed files with 5 additions and 4 deletions
|
@ -267,7 +267,3 @@ class Journal:
|
|||
|
||||
self.entries.append(Entry(self, date, title, body))
|
||||
self.sort()
|
||||
|
||||
def save_config(self, config_path):
|
||||
with open(config_path, 'w') as f:
|
||||
json.dump(self.config, f, indent=2)
|
||||
|
|
|
@ -45,6 +45,11 @@ def update_config(config, config_path=os.path.expanduser("~/.jrnl_conf")):
|
|||
print("[.jrnl_conf updated to newest version]")
|
||||
|
||||
|
||||
def save_config(config=default_config, config_path=os.path.expanduser("~/.jrnl_conf")):
|
||||
with open(config_path, 'w') as f:
|
||||
json.dump(config, f, indent=2)
|
||||
|
||||
|
||||
def install_jrnl(config_path='~/.jrnl_config'):
|
||||
def autocomplete(text, state):
|
||||
expansions = glob.glob(os.path.expanduser(text)+'*')
|
||||
|
|
Loading…
Add table
Reference in a new issue