1.1 --- a/imip_store.py Sat Jan 31 22:34:12 2015 +0100
1.2 +++ b/imip_store.py Sun Feb 01 01:59:37 2015 +0100
1.3 @@ -21,26 +21,10 @@
1.4
1.5 from datetime import datetime
1.6 from imiptools.config import STORE_DIR, PUBLISH_DIR
1.7 +from imiptools.data import make_calendar, to_stream
1.8 from imiptools.filesys import fix_permissions, FileBase
1.9 from os.path import exists, isfile, join
1.10 from os import listdir
1.11 -from vCalendar import iterwrite
1.12 -
1.13 -def make_calendar(fragment, method=None):
1.14 -
1.15 - """
1.16 - Return a complete calendar item wrapping the given 'fragment' and employing
1.17 - the given 'method', if indicated.
1.18 - """
1.19 -
1.20 - return ("VCALENDAR", {},
1.21 - (method and [("METHOD", {}, method)] or []) +
1.22 - [("VERSION", {}, "2.0")] +
1.23 - fragment
1.24 - )
1.25 -
1.26 -def to_stream(out, fragment, encoding="utf-8"):
1.27 - iterwrite(out, encoding=encoding).append(fragment)
1.28
1.29 class FileStore(FileBase):
1.30