1.1 --- a/tools/make_freebusy.py Tue Feb 09 15:01:40 2016 +0100
1.2 +++ b/tools/make_freebusy.py Tue Feb 09 15:17:50 2016 +0100
1.3 @@ -5,7 +5,7 @@
1.4 availability schedule or the schedule of another user (using details provided
1.5 when scheduling events with that user).
1.6
1.7 -Copyright (C) 2014, 2015 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2014, 2015, 2016 Paul Boddie <paul@boddie.org.uk>
1.9
1.10 This program is free software; you can redistribute it and/or modify it under
1.11 the terms of the GNU General Public License as published by the Free Software
1.12 @@ -38,7 +38,7 @@
1.13 from imiptools.data import get_window_end, Object
1.14 from imiptools.dates import get_default_timezone, to_utc_datetime
1.15 from imiptools.period import insert_period
1.16 -from imip_store import FileStore, FilePublisher
1.17 +from imip_store import FileStore, FilePublisher, FileJournal
1.18
1.19 def make_freebusy(client, participant, store_and_publish, include_needs_action,
1.20 reset_updated_list, verbose):
1.21 @@ -150,6 +150,7 @@
1.22 args = []
1.23 store_dir = []
1.24 publishing_dir = []
1.25 + journal_dir = []
1.26 preferences_dir = []
1.27 ignored = []
1.28
1.29 @@ -166,6 +167,8 @@
1.30 l = store_dir
1.31 elif arg == "-P":
1.32 l = publishing_dir
1.33 + elif arg == "-j":
1.34 + l = journal_dir
1.35 elif arg == "-p":
1.36 l = preferences_dir
1.37 else:
1.38 @@ -185,9 +188,10 @@
1.39
1.40 General options:
1.41
1.42 --S indicate the store directory location
1.43 +-j indicate the journal directory location
1.44 +-p indicate the preferences directory location
1.45 -P indicate the publishing directory location
1.46 --p indicate the preferences directory location
1.47 +-S indicate the store directory location
1.48 """ % split(sys.argv[0])[1]
1.49 sys.exit(1)
1.50
1.51 @@ -203,12 +207,14 @@
1.52
1.53 store_dir = store_dir and store_dir[0] or None
1.54 publishing_dir = publishing_dir and publishing_dir[0] or None
1.55 + journal_dir = journal_dir and journal_dir[0] or None
1.56 preferences_dir = preferences_dir and preferences_dir[0] or None
1.57
1.58 # Obtain store-related objects.
1.59
1.60 store = FileStore(store_dir)
1.61 publisher = FilePublisher(publishing_dir)
1.62 + journal = FileJournal(journal_dir)
1.63
1.64 # Obtain a list of users for processing.
1.65
1.66 @@ -223,7 +229,7 @@
1.67 if verbose:
1.68 print >>sys.stderr, user
1.69 make_freebusy(
1.70 - Client(user, None, store, publisher, preferences_dir), participant,
1.71 + Client(user, None, store, publisher, journal, preferences_dir), participant,
1.72 store_and_publish, include_needs_action, reset_updated_list, verbose)
1.73
1.74 # vim: tabstop=4 expandtab shiftwidth=4