Adds support for multiple journals

This commit is contained in:
Manuel Ebert 2012-06-11 15:58:25 +02:00
parent 46ba622aa1
commit 482e579242

View file

@ -17,7 +17,9 @@ def module_exists(module_name):
return True return True
default_config = { default_config = {
'journal': os.path.expanduser("~/journal.txt"), 'journals': {
"default": os.path.expanduser("~/journal.txt")
},
'editor': "", 'editor': "",
'encrypt': False, 'encrypt': False,
'password': "", 'password': "",
@ -61,7 +63,7 @@ def install_jrnl(config_path='~/.jrnl_config'):
print("clint not found. To turn on highlighting, install clint and set highlight to true in your .jrnl_conf.") print("clint not found. To turn on highlighting, install clint and set highlight to true in your .jrnl_conf.")
default_config['highlight'] = False default_config['highlight'] = False
open(default_config['journal'], 'a').close() # Touch to make sure it's there open(default_config['journals']['default'], 'a').close() # Touch to make sure it's there
# Write config to ~/.jrnl_conf # Write config to ~/.jrnl_conf
with open(config_path, 'w') as f: with open(config_path, 'w') as f: