Skip to content

Commit

Permalink
config: accept email address for each calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
geier committed Nov 15, 2023
1 parent a57156c commit f94551d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions khal/settings/khal.spec
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ readonly = boolean(default=False)
# *calendars* subsection will be used.
type = option('calendar', 'birthdays', 'discover', default='calendar')

# The email address associated with this account. For now it is only used to
# check what participation status ("PARTSTAT") belongs to the user.
address = string(default='')

[sqlite]
# khal stores its internal caching database here, by default this will be in the *$XDG_DATA_HOME/khal/khal.db* (this will most likely be *~/.local/share/khal/khal.db*).
path = expand_db_path(default=None)
Expand Down
1 change: 1 addition & 0 deletions tests/configs/small.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
[[work]]
path = ~/.calendars/work/
readonly = True
address = [email protected]
8 changes: 4 additions & 4 deletions tests/settings_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def test_simple_config(self):
comp_config = {
'calendars': {
'home': {'path': os.path.expanduser('~/.calendars/home/'),
'readonly': False, 'color': None, 'priority': 10, 'type': 'calendar'},
'readonly': False, 'color': None, 'priority': 10, 'type': 'calendar', 'address': ''},
'work': {'path': os.path.expanduser('~/.calendars/work/'),
'readonly': False, 'color': None, 'priority': 10, 'type': 'calendar'},
'readonly': False, 'color': None, 'priority': 10, 'type': 'calendar', 'address': ''},
},
'sqlite': {'path': os.path.expanduser('~/.local/share/khal/khal.db')},
'locale': LOCALE_BERLIN,
Expand Down Expand Up @@ -81,10 +81,10 @@ def test_small(self):
'calendars': {
'home': {'path': os.path.expanduser('~/.calendars/home/'),
'color': 'dark green', 'readonly': False, 'priority': 20,
'type': 'calendar'},
'type': 'calendar', 'address': ''},
'work': {'path': os.path.expanduser('~/.calendars/work/'),
'readonly': True, 'color': None, 'priority': 10,
'type': 'calendar'}},
'type': 'calendar', 'address': '[email protected]'}},
'sqlite': {'path': os.path.expanduser('~/.local/share/khal/khal.db')},
'locale': {
'local_timezone': get_localzone(),
Expand Down

0 comments on commit f94551d

Please sign in to comment.