예제 #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))
예제 #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))
예제 #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)
예제 #4
0
 def hoo(self, arg):
     """a hoogle (haskell + google) search"""
     return "http://haskell.org/hoogle/?q=%s" % q(arg)
예제 #5
0
파일: b1_mshang.py 프로젝트: mshang/bunny1
 def map(self, arg):
     """google maps"""
     if arg:
         return "http://maps.google.com/maps/?q=" + q(arg)
     else:
         return "http://maps.google.com"
예제 #6
0
파일: b1_mshang.py 프로젝트: mshang/bunny1
 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/"
예제 #7
0
파일: b1_mshang.py 프로젝트: mshang/bunny1
 def hoo(self, arg):
     """hoogle search"""
     if arg:
         return "http://www.haskell.org/hoogle/?hoogle=" + q(arg)
     else:
         return "http://www.haskell.org/hoogle"
예제 #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))
예제 #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)
예제 #10
0
 def fallback(self, raw):
     raise HTTPRedirect(self.fallback_url + q(raw))
예제 #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)
예제 #12
0
 def hoo(self, arg):
     """a hoogle (haskell + google) search"""
     return "http://haskell.org/hoogle/?q=%s" % q(arg)
예제 #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)
예제 #14
0
 def fallback(self, raw):
     raise HTTPRedirect(self.fallback_url + q(raw))
예제 #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))