Journal class brings it's own default config.

This commit is contained in:
Manuel Ebert 2012-07-15 20:30:23 +02:00
parent bb090924c3
commit f88eb8eb41
2 changed files with 14 additions and 4 deletions

View file

@ -25,9 +25,19 @@ except ImportError:
clint = None
class Journal:
def __init__(self, config, **kwargs):
config.update(kwargs)
self.config = config
def __init__(self, **kwargs):
self.config = {
'journal': "journal.txt",
'encrypt': False,
'password': "",
'default_hour': 9,
'default_minute': 0,
'timeformat': "%Y-%m-%d %H:%M",
'tagsymbols': '@',
'highlight': True,
'linewrap': 80,
}
self.config.update(kwargs)
# Set up date parser
consts = pdc.Constants()