This repository has been archived by the owner on Mar 17, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.py
84 lines (75 loc) · 2.35 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import webapp2
import wsgiref.handlers
from google.appengine.ext import webapp
import django
from service import base
from service import mirror
from service import identica
from service import lastfm
from service import fact
from service import steps
from service import soccer
from service import stupid
from service import ticket
from service import unicode
from service import entity
from service import internet
from service import vary
from service import googlesets
from service import search
from service import connect
from service import isbn
from service import dwim
from service import whois
from service import speak
from service import py
from service import wolframalpha
from service import fourchan
from service import wow
from service import map
from service import general
from service import twit
#from service import twitter
from service import jargon
uris = [
("^/$", base.Index),
("^/mirror(/.*?)?", mirror.Main),
("^/identica(/(.*?))?(/(.*?))?/?", identica.Main),
("^/lastfm(/(.*?))?(/(.*?))?/?", lastfm.Main),
("^/fact(/(.*?))?/?", fact.Main),
("^/soccer(/(.*?))?/?", soccer.Main),
("^/steps(/(.*?))?/?", steps.Main),
("^/stupid(/(.*?))?/?", stupid.Main),
("^/ticket(/(.*?))?(/(.*?))?/?", ticket.Main),
("^/internet(/(.*?))?/?", internet.Main),
("^/unicode(/(.*?))?/?", unicode.Main),
("^/entity(/(.*?))?/?", entity.Main),
("^/vary(/(.*?))?/?", vary.Main),
("^/sets(/(.*?))?/?", googlesets.Main),
("^/search(/(.*?))?/?", search.Main),
("^/connect(/(.*?))?/?", connect.Main),
("^/isbn(/(.*))?/?", isbn.Main),
("^/dwim(/(.*))?/?", dwim.Main),
("^/whois(/(.*))?/?", whois.Main),
("^/speak(/(.*))?/?", speak.Main),
("^/py(/(.*))?/?", py.Main),
("^/wa(/(.*))?/?", wolframalpha.Main),
("^/4chan/?", fourchan.Main),
("^/wow(/(.*?))?/?", wow.Main),
("^/map(/(.*?))?/?", map.Main),
("^/general(/(.*?))?/?", general.Main),
("^/twit(/(.*?))?/?", twit.Main),
#("^/twitter(/(.*?))?/?", twitter.Main),
("^/jargon(/(.*?))?/?", jargon.Main),
("^/.*$", base.NotFound),
]
def main():
wsgiref.handlers.CGIHandler().run(webapp.WSGIApplication(uris, debug=True))
'''class MainPage(webapp2.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/plain'
self.response.out.write('Hello, WebApp World!')
'''
#app = webapp2.WSGIApplication([('/', MainPage)])
if __name__ == "__main__":
main()