Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit ef6501b8054599665d4eef4e80e4b2b883ec36ca 1 parent 7425339
Mihai Parparita authored
6 Makefile
@@ -3,3 +3,9 @@ dev:
3 3
4 4 deploy:
5 5 appcfg.py --email=mihai.parparita@gmail.com update app
  6 +
  7 +twitter-digest-stub-dev:
  8 + python2.5 `which dev_appserver.py` --port=8082 twitter-digest-stub
  9 +
  10 +twitter-digest-stub-deploy:
  11 + appcfg.py --email=mihai.parparita@gmail.com update twitter-digest-stub
2  README.markdown
Source Rendered
@@ -14,6 +14,8 @@ Base/utility code goes in `app/base` and `app/templates/base`.
14 14
15 15 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.
16 16
  17 +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`.
  18 +
17 19 ### Datasources/API endpoints
18 20
19 21 Third-party API endpoints are in the `datasources` directory:
10 twitter-digest-stub/app.yaml
... ... @@ -0,0 +1,10 @@
  1 +application: twitter-digest
  2 +version: 2
  3 +runtime: python
  4 +api_version: 1
  5 +
  6 +handlers:
  7 +- url: /.*
  8 + script: main.py
  9 +
  10 +
11 twitter-digest-stub/index.yaml
... ... @@ -0,0 +1,11 @@
  1 +indexes:
  2 +
  3 +# AUTOGENERATED
  4 +
  5 +# This index.yaml is automatically updated whenever the dev_appserver
  6 +# detects that a new type of query is run. If you want to manage the
  7 +# index.yaml file manually, remove the above marker line (the line
  8 +# saying "# AUTOGENERATED"). If you want to manage some indexes
  9 +# manually, move them above the marker line. The index.yaml file is
  10 +# automatically uploaded to the admin console when you next deploy
  11 +# your application using appcfg.py.
22 twitter-digest-stub/main.py
... ... @@ -0,0 +1,22 @@
  1 +import wsgiref.handlers
  2 +
  3 +from google.appengine.ext import webapp
  4 +
  5 +class MainPage(webapp.RequestHandler):
  6 + def get(self):
  7 + self.redirect('http://www.streamspigot.com/tweet-digest/')
  8 +
  9 +class GenerateDigest(webapp.RequestHandler):
  10 + def get(self):
  11 + self.redirect('http://www.streamspigot.com/tweet-digest/digest?' + self.request.query_string)
  12 +
  13 +def main():
  14 + application = webapp.WSGIApplication([
  15 + ('/', MainPage),
  16 + ('/generate', GenerateDigest),
  17 + ],
  18 + debug=True)
  19 + wsgiref.handlers.CGIHandler().run(application)
  20 +
  21 +if __name__ == "__main__":
  22 + main()

0 comments on commit ef6501b

Please sign in to comment.
Something went wrong with that request. Please try again.