Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions jack_bunny.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def fb(arg=None):
return 'http://www.facebook.com/s.php?q={0}&init=q'.format(arg)
else:
return 'http://www.facebook.com'

def g(arg=None):
"""'g [insert query]' searching google"""
if arg:
Expand Down Expand Up @@ -49,7 +49,7 @@ def w(arg=None):
else:
return 'https://en.wikipedia.org/wiki/Main_Page'
except:
return 'https://en.wikipedia.org/wiki/Main_Page'
return 'https://en.wikipedia.org/wiki/Main_Page'

def cpp(arg=None):
"""'cpp [insert query]' searches for syntactical cpp terms on cppreference.com"""
Expand Down Expand Up @@ -78,6 +78,13 @@ def yt(arg=None):
else:
return 'http://www.youtube.com'

def r(arg=None):
"""'r [insert query]' make a reddit.com search. If not query is passed in, defaults to the reddit homepage"""
if arg:
return 'https://www.reddit.com/search?q={0}'.format(arg)
else:
return 'https://www.reddit.com'

def help(arg=None):
"""'help' returns a list of usable commands """
help_list = []
Expand Down Expand Up @@ -117,4 +124,4 @@ def route():
return redirect(Commands.g(query))

if __name__ == '__main__':
app.run()
app.run()