Skip to content

Commit

Permalink
Adding simple Google Reader and Voice commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Reifschneider committed Feb 7, 2011
1 parent e6e296c commit 2a08abe
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

from . search import *
from . lang import *
from . voice import *
from . reader import *
18 changes: 18 additions & 0 deletions examples/reader.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from bottle import redirect
from cony import rich_help


@rich_help('--help')
def cmd_reader(term):
'''Go to the Google Reader page.'''

template = """
<p />Go to the Google Reader inbox page.
%rebase layout title = 'Reader Help'
"""

if term == '--help' or term == '?' or term == '-?':
return dict(template = template)
else:
redirect('http://www.google.com/reader/view/')
18 changes: 18 additions & 0 deletions examples/voice.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from bottle import redirect
from cony import rich_help


@rich_help('--help')
def cmd_voice(term):
'''Go to the Google Voice page.'''

template = """
<p />Go to the Google Voice inbox page.
%rebase layout title = 'Voice Help'
"""

if term == '--help' or term == '?' or term == '-?':
return dict(template = template)
else:
redirect('https://www.google.com/voice#inbox')

0 comments on commit 2a08abe

Please sign in to comment.