Example #1
0
 def initialize(self):
     """
         Initialize a new calendar.
     """
     urls = scraper.scrape_rss()
     pages = scraper.scrape_html(urls)
     voorstellingen = [parser.html2voorstelling(x) for x in pages]
     voorstellingen = [x for x in voorstellingen if x is not None]
     cal = calendar.make_calendar(voorstellingen)
     self.write_cal(cal)
Example #2
0
 def update(self):
     """
         Update an existing calendar.
     """
     urls = scraper.scrape_rss()
     pages = scraper.scrape_html(urls)
     voorstellingen = [parser.html2voorstelling(x) for x in pages]
     voorstellingen = [x for x in voorstellingen if x is not None]
     voorstellingen = update.update_voorstellingen(voorstellingen)
     cal = calendar.make_calendar(voorstellingen)
     self.write_cal(cal)