コード例 #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
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
 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
ファイル: b1_example.py プロジェクト: 650Industries/bunny1
 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
ファイル: b1_example.py プロジェクト: 650Industries/bunny1
 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
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
 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
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
 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
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
 def fallback(self, raw):
     raise HTTPRedirect(self.fallback_url + q(raw))
コード例 #11
0
ファイル: b1_example.py プロジェクト: phuongpham178/tikibunny
 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
ファイル: b1_example.py プロジェクト: phuongpham178/tikibunny
 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))