From c26ed24389329f0d940164d5b3994742d8a0c209 Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Mon, 16 Jul 2012 13:37:08 +0200 Subject: [PATCH] Better support for individual configs --- jrnl/Journal.py | 4 ---- jrnl/install.py | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 7d50827c..31f45ec0 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -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) diff --git a/jrnl/install.py b/jrnl/install.py index deb8f88a..90b5939e 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -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)+'*')