Added default export folder to config

Signed-off-by: Aniket Pant <me@aniketpant.com>
This commit is contained in:
Aniket Pant 2013-04-14 00:23:45 +05:30
parent 912175f601
commit d3958316f2
2 changed files with 6 additions and 1 deletions

View file

@ -37,6 +37,7 @@ class Journal(object):
'tagsymbols': '@', 'tagsymbols': '@',
'highlight': True, 'highlight': True,
'linewrap': 80, 'linewrap': 80,
'folder': os.path.expanduser("~/journal/"),
} }
self.config.update(kwargs) self.config.update(kwargs)

View file

@ -29,6 +29,7 @@ default_config = {
'tagsymbols': '@', 'tagsymbols': '@',
'highlight': True, 'highlight': True,
'linewrap': 80, 'linewrap': 80,
'folder': os.path.expanduser("~/journal/"),
} }
@ -91,4 +92,7 @@ def install_jrnl(config_path='~/.jrnl_config'):
config['password'] = password config['password'] = password
return config return config
# Where to export files?
path_query = 'Path to your journal folder (leave blank for ~/journal): '
folder_path = raw_input(path_query).strip() or os.path.expanduser('~/journal')
default_config['folder'] = os.path.expanduser(folder_path)