Permalink
Browse files

Add stub app for redirecting from the old Twitter Digest app.

  • Loading branch information...
mihaip committed Feb 7, 2011
1 parent 7425339 commit ef6501b8054599665d4eef4e80e4b2b883ec36ca
Showing with 51 additions and 0 deletions.
  1. +6 −0 Makefile
  2. +2 −0 README.markdown
  3. +10 −0 twitter-digest-stub/app.yaml
  4. +11 −0 twitter-digest-stub/index.yaml
  5. +22 −0 twitter-digest-stub/main.py
View
@@ -3,3 +3,9 @@ dev:
deploy:
appcfg.py --email=mihai.parparita@gmail.com update app
+
+twitter-digest-stub-dev:
+ python2.5 `which dev_appserver.py` --port=8082 twitter-digest-stub
+
+twitter-digest-stub-deploy:
+ appcfg.py --email=mihai.parparita@gmail.com update twitter-digest-stub
View
@@ -14,6 +14,8 @@ Base/utility code goes in `app/base` and `app/templates/base`.
UI JavaScript currently uses a checked in copy of [Closure Lite](http://www.programmingclosure.com/closure-lite/) but the plan is to switch to [Plovr](http://plovr.com/) once needs become more complex.
+The tweet digest component of the app was formerly known as Twitter Digest and used to run at `twitter-digest.appspot.com`. A small "stub" App Engine app that redirects requests from there to `www.streamspigot.com/tweet-digest` is in `twitter-digest-stub`.
+
### Datasources/API endpoints
Third-party API endpoints are in the `datasources` directory:
@@ -0,0 +1,10 @@
+application: twitter-digest
+version: 2
+runtime: python
+api_version: 1
+
+handlers:
+- url: /.*
+ script: main.py
+
+
@@ -0,0 +1,11 @@
+indexes:
+
+# AUTOGENERATED
+
+# This index.yaml is automatically updated whenever the dev_appserver
+# detects that a new type of query is run. If you want to manage the
+# index.yaml file manually, remove the above marker line (the line
+# saying "# AUTOGENERATED"). If you want to manage some indexes
+# manually, move them above the marker line. The index.yaml file is
+# automatically uploaded to the admin console when you next deploy
+# your application using appcfg.py.
@@ -0,0 +1,22 @@
+import wsgiref.handlers
+
+from google.appengine.ext import webapp
+
+class MainPage(webapp.RequestHandler):
+ def get(self):
+ self.redirect('http://www.streamspigot.com/tweet-digest/')
+
+class GenerateDigest(webapp.RequestHandler):
+ def get(self):
+ self.redirect('http://www.streamspigot.com/tweet-digest/digest?' + self.request.query_string)
+
+def main():
+ application = webapp.WSGIApplication([
+ ('/', MainPage),
+ ('/generate', GenerateDigest),
+ ],
+ debug=True)
+ wsgiref.handlers.CGIHandler().run(application)
+
+if __name__ == "__main__":
+ main()

0 comments on commit ef6501b

Please sign in to comment.