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
0de1af654d
commit
c26ed24389
2 changed files with 5 additions and 4 deletions
|
@ -267,7 +267,3 @@ class Journal:
|
||||||
|
|
||||||
self.entries.append(Entry(self, date, title, body))
|
self.entries.append(Entry(self, date, title, body))
|
||||||
self.sort()
|
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]")
|
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 install_jrnl(config_path='~/.jrnl_config'):
|
||||||
def autocomplete(text, state):
|
def autocomplete(text, state):
|
||||||
expansions = glob.glob(os.path.expanduser(text)+'*')
|
expansions = glob.glob(os.path.expanduser(text)+'*')
|
||||||
|
|
Loading…
Add table
Reference in a new issue