Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit ef6501b8054599665d4eef4e80e4b2b883ec36ca 1 parent 7425339
@mihaip authored
View
6 Makefile
@@ -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
2  README.markdown
@@ -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:
View
10 twitter-digest-stub/app.yaml
@@ -0,0 +1,10 @@
+application: twitter-digest
+version: 2
+runtime: python
+api_version: 1
+
+handlers:
+- url: /.*
+ script: main.py
+
+
View
11 twitter-digest-stub/index.yaml
@@ -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.
View
22 twitter-digest-stub/main.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()
Please sign in to comment.
Something went wrong with that request. Please try again.