The oblique services manifest changed location, updated to follow.
parent
331bc44338
commit
63b981c994
3
Makefile
3
Makefile
|
@ -13,3 +13,6 @@ ci: ;
|
||||||
log: ;
|
log: ;
|
||||||
# git log --date=short --format='%h %ad %s'
|
# git log --date=short --format='%h %ad %s'
|
||||||
git graph
|
git graph
|
||||||
|
|
||||||
|
sync: ;
|
||||||
|
rsync -avz --delete ./ pubble:opt/phenny/
|
||||||
|
|
|
@ -10,7 +10,7 @@ http://inamidst.com/phenny/
|
||||||
import re, urllib
|
import re, urllib
|
||||||
import web
|
import web
|
||||||
|
|
||||||
definitions = 'http://github.com/nslater/oblique/wiki'
|
definitions = 'https://github.com/nslater/oblique/wiki'
|
||||||
|
|
||||||
r_item = re.compile(r'(?i)<li>(.*?)</li>')
|
r_item = re.compile(r'(?i)<li>(.*?)</li>')
|
||||||
r_tag = re.compile(r'<[^>]+>')
|
r_tag = re.compile(r'<[^>]+>')
|
||||||
|
@ -91,5 +91,14 @@ def py(phenny, input):
|
||||||
service(phenny, input, 'py', input.group(2))
|
service(phenny, input, 'py', input.group(2))
|
||||||
py.commands = ['py']
|
py.commands = ['py']
|
||||||
|
|
||||||
|
def snippet(phenny, input):
|
||||||
|
py = "BeautifulSoup.BeautifulSoup(re.sub('<.*?>|(?<= ) +', '', " + \
|
||||||
|
"eval(urllib.urlopen('http://ajax.googleapis.com/ajax/serv" + \
|
||||||
|
"ices/search/web?v=1.0&q=" + urllib.quote(input.group(2)) + \
|
||||||
|
"').read().replace('null', 'None'))['responseData']['resul" + \
|
||||||
|
"ts'][0]['content'].decode('unicode-escape')), convertEntities=True)"
|
||||||
|
service(phenny, input, 'py', py)
|
||||||
|
snippet.commands = ['snippet']
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
print __doc__.strip()
|
print __doc__.strip()
|
||||||
|
|
Loading…
Reference in New Issue