Commit caece5ee authored by Gudule Lapointe's avatar Gudule Lapointe

* added The Factory/The BirdCage

parent e78c52d4
import requests
from lib.event import Event
from fetcher.icalfetcher import IcalFetcher
import icalendar
from lib.category import Category
from helper.thefactory import TheFactoryHelper
class TheFactoryFetcher(IcalFetcher):
def __init__(self,eventlist,webcache=None):
self.webcache = webcache
self.minexpiry = 1000
self.maxexpirty = 1800
if __name__=='__main__':
from lib.webcache import WebCache
from lib.eventlist import EventList
eventlist = EventList()
cache = WebCache("data/test_thefactory.cache")
f = TheFactoryFetcher(eventlist, cache)
for ev in eventlist:
print str(ev)
import re
import pickle
from datetime import timedelta
from helper import Helper
class TheFactoryHelper(Helper):
hgre = re.compile("^[^:]+:[0-9]+:[^:]+$")
def findRegion(self, data):
if data==None or data=='' or data=='-':
return ' Factory'
return None
def customizeEvent(self, event):
event = super(TheFactoryHelper, self).customizeEvent(event)
hgurl = self.findRegion(event.hgurl)
if hgurl != None:
event.hgurl = hgurl
return event
......@@ -16,6 +16,7 @@
<!-- <span class="brand"><b>2</b>DO</span><span class=ext>.pm</span> <span class=subtitle> across the Metaversum</span> -->
<div class="mainrow" id="news">
<div class="newsitem">2020-06-27: <strong><a href=>Added The Factory calendar</div>
<div class="newsitem">2020-06-05: <strong><a href=>Added Virtual Gay Pride calendar</div>
<div class="newsitem">2020-05-06: <strong><a href=>Added Ocean Grid calendar</div>
<div class="newsitem">2019-06-03: <strong><a href=>Added Tranquility Grid calendar</div>
......@@ -27,6 +27,7 @@ from lib.eventlist import EventList
# added by later fetchers that are already fetched earlier
# will be discarded
fetchers = [
("thefactoryfetcher", "TheFactoryFetcher", 0),
("virtualgaypridefetcher", "VirtualGayPrideFetcher", 0),
("oceangridfetcher", "OceanGridFetcher", 0),
("tranquilitygridfetcher", "TranquilityGridFetcher", 0),
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment