Esempio n. 1
0
    def __init__(self, config_fname):
        self.config = u.fetch_json(config_fname)

        # set default prefix
        if not "prefix" in self.config or not self.config['prefix']:
            self.config['prefix'] = "gcal_"

        # self.calendars is the dict that holds information about all the calendars we know about.
        self.calendars = self.config['calendars']
Esempio n. 2
0
def main():
    gcf = GCalFetcher(config_fname)
    config = u.fetch_json(config_fname)
    calendars = config['calendars']

    cals = gcf.calendars.keys()
    if len(sys.argv) > 1:
        cals = sys.argv[1:]
    
    gcf.fetch_cals(cals)
    gcf.convert_to_org(cals)