Commit aac6b60b authored by Koen Martens's avatar Koen Martens

Add The Encore Escape grid

parent c3a44353
import requests
from lib.event import Event
from fetcher.icalfetcher import IcalFetcher
import icalendar
from lib.category import Category
from helper.theencoreescape import TheEncoreEscapeHelper
class TheEncoreEscapeFetcher(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_theencoreescape.cache")
f = TheEncoreEscapeFetcher(eventlist, cache)
for ev in eventlist:
print str(ev)
import re
from helper import Helper
from datetime import timedelta
class TheEncoreEscapeHelper(Helper):
cancelled_re = re.compile("cancel", flags=re.I)
def customizeEvent(self, event):
event = super(TheEncoreEscapeHelper, self).customizeEvent(event)
if len(event.title)==0:
return None
return None
if event.end - event.start > timedelta(hours=6):
return None
return event
......@@ -133,6 +133,7 @@
case "arcana": rv = "Arcana"; break;
case "thirdlife": rv = "3rdLifeGrid"; break;
case "islandoasis": rv = "Island Oasis Grid"; break;
case "theencoreescape": rv = "The Encore Escape"; break;
default: rv = null; break;
return rv;
......@@ -13,11 +13,10 @@
<span id="headerHYP">HYP</span><span id="headerEvents">Events</span>
<div class="mainrow" id="news">
<div class="newsitem">2017-03-15: New grid - The Encore Escape - added</div>
<div class="newsitem">2017-01-24: Added's event calendar</div>
<div class="newsitem">2016-11-04: Added Island Oasis Grid events</div>
<div class="newsitem">2016-10-29: New version of in-world board, 0.8, released</div>
<div class="newsitem">2016-09-19: Added calendar from 3rdLifeGrid</div>
<div class="newsitem">2016-02-03: New calendar from the Arcana grid added</div>
<div class="mainrow" id="menu">
......@@ -91,8 +90,10 @@ If, for some reason, an ical feed or json provider is not an option (or there is
<p>The following calendars are imported:</p>
<li><a href="">3rdLifeGrid</a></li>
<li><a href="">Arcana</a></li>
<li><a href="">AVATARfest</a></li>
<li><a href="">Craft World</a></li>
<li><a href="">The Encore Escape</a></li>
<li><a href="">Exo-Life Virtual World</a></li>
<li><a href="">FrancoGrid</a></li>
<li><a href="">Great Canadian Grid</a></li>
......@@ -111,7 +112,6 @@ If, for some reason, an ical feed or json provider is not an option (or there is
<li><a href="">Third Rock Grid</a></li>
<li><a href="">VHS Goslar</a></li>
<li><a href="">ZanGrid</a></li>
<li><a href="">Arcana</a></li>
<h2>Why isn't grid XYZ on the calendar?</h2>
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