phenny/modules/stache.py

23 lines
554 B
Python
Raw Normal View History

2012-01-03 14:54:26 -05:00
#!/usr/bin/python3
# -*- coding: utf-8 -*-
2012-01-03 14:54:26 -05:00
"""
stache.py - mustachify.me module
author: mutantmonkey <mutantmonkey@mutantmonkey.in>
"""
import web
def stache(phenny, input):
""".stache <url> - Mustachify an image."""
url = input.group(2)
if not url:
phenny.reply("Please provide an image to Mustachify™.")
return
2012-01-03 14:54:26 -05:00
phenny.reply('http://mustachify.me/?src=' + web.quote(url))
stache.rule = (['stache'],
'(https?:\/\/[^ #]+\.(?:png|jpg|jpeg))(?:[#]\.png)?')
2012-01-03 14:54:26 -05:00
if __name__ == '__main__':
print(__doc__.strip())