Exemplo n.º 1
0
 def _test(self, arg):
     """tests a command on a different bunny1 host.  usage: _test [fully-qualified-bunny1-url] [command]"""
     (bunny1_url, arg) = arg.split(None, 1)
     if not bunny1_url.endswith("?"):
         bunny1_url += "?"
     save("bunny1testurl", bunny1_url)
     raise HTTPRedirect(bunny1_url + q(arg))
Exemplo n.º 2
0
 def _test(self, arg):
     """tests a command on a different bunny1 host.  usage: _test [fully-qualified-bunny1-url] [command]"""
     (bunny1_url, arg) = arg.split(None, 1)
     if not bunny1_url.endswith("?"):
         bunny1_url += "?"
     save("bunny1testurl", bunny1_url)
     raise HTTPRedirect(bunny1_url + q(arg))
Exemplo n.º 3
0
 def fblucky(self, arg):
     """facebook i'm feeling lucky search, i.e. go directly to a person's profile"""
     return "http://www.facebook.com/s.php?jtf&q=" + q(arg)
Exemplo n.º 4
0
 def hoo(self, arg):
     """a hoogle (haskell + google) search"""
     return "http://haskell.org/hoogle/?q=%s" % q(arg)
Exemplo n.º 5
0
 def map(self, arg):
     """google maps"""
     if arg:
         return "http://maps.google.com/maps/?q=" + q(arg)
     else:
         return "http://maps.google.com"
Exemplo n.º 6
0
 def go(self, arg):
     """google I'm feeling lucky search"""
     if arg:
         return "http://www.google.com/search?btnI&q=" + q(arg)
     else:
         return "http://www.google.com/"
Exemplo n.º 7
0
 def hoo(self, arg):
     """hoogle search"""
     if arg:
         return "http://www.haskell.org/hoogle/?hoogle=" + q(arg)
     else:
         return "http://www.haskell.org/hoogle"
Exemplo n.º 8
0
 def _t(self, arg):
     """tests a command on the most recently used bunny1 host.  usage: _t [command]"""
     bunny1_url = load("bunny1testurl")
     raise HTTPRedirect(bunny1_url + q(arg))
Exemplo n.º 9
0
 def g(self, arg):
     """does a google search.  we could fallback to yubnub, but why do an unnecessary roundtrip for something as common as a google search?"""
     return GOOGLE_SEARCH_URL + q(arg)
Exemplo n.º 10
0
 def fallback(self, raw):
     raise HTTPRedirect(self.fallback_url + q(raw))
Exemplo n.º 11
0
 def fblucky(self, arg):
     """facebook i'm feeling lucky search, i.e. go directly to a person's profile"""
     return "http://www.facebook.com/s.php?jtf&q=" + q(arg)
Exemplo n.º 12
0
 def hoo(self, arg):
     """a hoogle (haskell + google) search"""
     return "http://haskell.org/hoogle/?q=%s" % q(arg)
Exemplo n.º 13
0
 def g(self, arg):
     """does a google search.  we could fallback to yubnub, but why do an unnecessary roundtrip for something as common as a google search?"""
     return GOOGLE_SEARCH_URL + q(arg)
Exemplo n.º 14
0
 def fallback(self, raw):
     raise HTTPRedirect(self.fallback_url + q(raw))
Exemplo n.º 15
0
 def _t(self, arg):
     """tests a command on the most recently used bunny1 host.  usage: _t [command]"""
     bunny1_url = load("bunny1testurl")
     raise HTTPRedirect(bunny1_url + q(arg))