im working on jira irc bot. This bot is for work on foresight[,-devel} channel on freenode.
The objective is interactive with jira website without visit it.
The first step is maked. Make a page for suggest, wishlist and commands request.
My plans is build a python lib for interactive first with jira and then work on the bot. The bot can based on some excelents libs like irc-lib and a repository of python bots.
Now im doing a small script for do a shorts url. Im pick http://te.tl because is smaller than http://tinyurl.com and it not used alot. So it give us a very small url.
I haved code small cli for make url on te.tl
import urllib
import re
import sys
def makeurl( url ):
params = urllib.urlencode({'url':url,'title':''})
f = urllib.urlopen("http://te.tl/index.php",params)
response = f.read()
pattern = re.compile('<h1>.*</h1>')
m = pattern.search(response)
if m:
html= m.group()
else:
return "Error: %s" %response
return html.replace('<h1>','').replace('</h1>','')
print makeurl(sys.argv[1])