commit 99ea1f4d4bb0b5cb4ea0b6bc1f10c3dad64f4145
parent 7b4e2be49ee5815219eaf3b6b67d943572e60db9
Author: Matthias Balk <mbalk@mbalk.de>
Date: Tue, 13 Aug 2019 17:52:31 +0200
replace '/' in filenames
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/commands.py b/src/commands.py
@@ -43,7 +43,8 @@ def _get_input(key):
def _event2file(event):
filename = '%s-%s.ics' % (event['DTSTART'].strftime('%Y-%m-%d'),
- re.sub(r'\s+', '-', event['SUMMARY'].lower()))
+ re.sub(r'(/|\s)+', '-',
+ event['SUMMARY'].lower()))
f = open(os.path.join(config.CAL_DIR, filename), 'w')
f.write('BEGIN:VCALENDAR\nVERSION:2.0\n')
f.write('PRODID:-//ya3//yet another appointment application//\n')