Commit 8f4baa3f authored by Michael Murtaugh's avatar Michael Murtaugh

bots

parent dfcf599f
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
mw.loader.using(['mediawiki.util','mediawiki.notify','jquery.client'],function(){if(mw.config.get('wgPageName')==='Main_Page'||mw.config.get('wgPageName')==='Talk:Main_Page'){$(function(){mw.util.addPortletLink('p-lang','//meta.wikimedia.org/wiki/List_of_Wikipedias','Complete list','interwiki-completelist','Complete list of Wikipedias');});}if(mw.config.get('wgArticleId')===0&&mw.config.get('wgNamespaceNumber')===2){var titleParts=mw.config.get('wgPageName').split('/');if(titleParts.length==2){var userSkinPage=titleParts.shift()+'/'+mw.config.get('skin');if(titleParts.slice(-1)=='skin.js'){window.location.href=mw.util.getUrl(userSkinPage+'.js');}else if(titleParts.slice(-1)=='skin.css'){window.location.href=mw.util.getUrl(userSkinPage+'.css');}}}mw.log.deprecate(window,'addPortletLink',mw.util.addPortletLink,'Use mw.util.addPortletLink instead');mw.log.deprecate(window,'getURLParamValue',mw.util.getParamValue,'Use mw.util.getParamValue instead');mw.log.deprecate(window,'hasClass',
function(element,className){return $(element).hasClass(className);},'Use jQuery.hasClass() instead');var extraCSS=mw.util.getParamValue('withCSS'),extraJS=mw.util.getParamValue('withJS');if(extraCSS){if(extraCSS.match(/^MediaWiki:[^&<>=%#]*\.css$/)){importStylesheet(extraCSS);}else{mw.notify('Only pages from the MediaWiki namespace are allowed.',{title:'Invalid withCSS value'});}}if(extraJS){if(extraJS.match(/^MediaWiki:[^&<>=%#]*\.js$/)){importScript(extraJS);}else{mw.notify('Only pages from the MediaWiki namespace are allowed.',{title:'Invalid withJS value'});}}if(mw.config.get('wgAction')==='edit'||mw.config.get('wgAction')==='submit'||mw.config.get('wgCanonicalSpecialPageName')==='Upload'){importScript('MediaWiki:Common.js/edit.js');}else if(mw.config.get('wgCanonicalSpecialPageName')==='Watchlist'){importScript('MediaWiki:Common.js/watchlist.js');}if(mw.config.get('wgNamespaceNumber')===6){importScript('MediaWiki:Common.js/file.js');}(function(mw,$){var profile=$.client.profile();
if(profile.name==='msie'&&profile.versionNumber===8){mw.hook('wikipage.content').add(function($content){$content.find('.hlist').find('dd:last-child, dt:last-child, li:last-child').addClass('hlist-last-child');});}}(mediaWiki,jQuery));if(navigator.appVersion.search(/windows nt 5/i)!==-1){mw.util.addCSS('.IPA { font-family: "Lucida Sans Unicode", "Arial Unicode MS"; } '+'.Unicode { font-family: "Arial Unicode MS", "Lucida Sans Unicode"; } ');}(function(){var require_wikiminiatlas=false;var coord_filter=/geohack/;$(function(){$('a.external.text').each(function(key,link){if(link.href&&coord_filter.exec(link.href)){require_wikiminiatlas=true;return false;}});if($('div.kmldata').length){require_wikiminiatlas=true;}if(require_wikiminiatlas){mw.loader.load('//meta.wikimedia.org/w/index.php?title=MediaWiki:Wikiminiatlas.js&action=raw&ctype=text/javascript');}});})();var autoCollapse=2;var collapseCaption='hide';var expandCaption='show';function collapseTable(tableIndex){var Button=document.
getElementById('collapseButton'+tableIndex);var Table=document.getElementById('collapsibleTable'+tableIndex);if(!Table||!Button){return false;}var Rows=Table.rows;var i;if(Button.firstChild.data===collapseCaption){for(i=1;i<Rows.length;i++){Rows[i].style.display='none';}Button.firstChild.data=expandCaption;}else{for(i=1;i<Rows.length;i++){Rows[i].style.display=Rows[0].style.display;}Button.firstChild.data=collapseCaption;}}function createClickHandler(tableIndex){return function(e){e.preventDefault();collapseTable(tableIndex);};}function createCollapseButtons(){var tableIndex=0;var NavigationBoxes={};var Tables=document.getElementsByTagName('table');var i;for(i=0;i<Tables.length;i++){if($(Tables[i]).hasClass('collapsible')){var HeaderRow=Tables[i].getElementsByTagName('tr')[0];if(!HeaderRow){continue;}var Header=HeaderRow.getElementsByTagName('th')[0];if(!Header){continue;}NavigationBoxes[tableIndex]=Tables[i];Tables[i].setAttribute('id','collapsibleTable'+tableIndex);var Button=
document.createElement('span');var ButtonLink=document.createElement('a');var ButtonText=document.createTextNode(collapseCaption);Button.className='collapseButton';ButtonLink.style.color=Header.style.color;ButtonLink.setAttribute('id','collapseButton'+tableIndex);ButtonLink.setAttribute('href','#');$(ButtonLink).on('click',createClickHandler(tableIndex));ButtonLink.appendChild(ButtonText);Button.appendChild(document.createTextNode('['));Button.appendChild(ButtonLink);Button.appendChild(document.createTextNode(']'));Header.insertBefore(Button,Header.firstChild);tableIndex++;}}for(i=0;i<tableIndex;i++){if($(NavigationBoxes[i]).hasClass('collapsed')||(tableIndex>=autoCollapse&&$(NavigationBoxes[i]).hasClass('autocollapse'))){collapseTable(i);}else if($(NavigationBoxes[i]).hasClass('innercollapse')){var element=NavigationBoxes[i];while((element=element.parentNode)){if($(element).hasClass('outercollapse')){collapseTable(i);break;}}}}}$(createCollapseButtons);var NavigationBarHide='['+
collapseCaption+']';var NavigationBarShow='['+expandCaption+']';window.toggleNavigationBar=function(indexNavigationBar,event){var NavToggle=document.getElementById('NavToggle'+indexNavigationBar);var NavFrame=document.getElementById('NavFrame'+indexNavigationBar);var NavChild;if(!NavFrame||!NavToggle){return false;}if(NavToggle.firstChild.data===NavigationBarHide){for(NavChild=NavFrame.firstChild;NavChild!=null;NavChild=NavChild.nextSibling){if($(NavChild).hasClass('NavContent')||$(NavChild).hasClass('NavPic')){NavChild.style.display='none';}}NavToggle.firstChild.data=NavigationBarShow;}else if(NavToggle.firstChild.data===NavigationBarShow){for(NavChild=NavFrame.firstChild;NavChild!=null;NavChild=NavChild.nextSibling){if($(NavChild).hasClass('NavContent')||$(NavChild).hasClass('NavPic')){NavChild.style.display='block';}}NavToggle.firstChild.data=NavigationBarHide;}event.preventDefault();};function createNavigationBarToggleButton(){var indexNavigationBar=0;var NavFrame;var NavChild;var
divs=document.getElementsByTagName('div');for(var i=0;(NavFrame=divs[i]);i++){if($(NavFrame).hasClass('NavFrame')){indexNavigationBar++;var NavToggle=document.createElement('a');NavToggle.className='NavToggle';NavToggle.setAttribute('id','NavToggle'+indexNavigationBar);NavToggle.setAttribute('href','#');$(NavToggle).on('click',$.proxy(window.toggleNavigationBar,window,indexNavigationBar));var isCollapsed=$(NavFrame).hasClass('collapsed');for(NavChild=NavFrame.firstChild;NavChild!=null&&!isCollapsed;NavChild=NavChild.nextSibling){if($(NavChild).hasClass('NavPic')||$(NavChild).hasClass('NavContent')){if(NavChild.style.display==='none'){isCollapsed=true;}}}if(isCollapsed){for(NavChild=NavFrame.firstChild;NavChild!=null;NavChild=NavChild.nextSibling){if($(NavChild).hasClass('NavPic')||$(NavChild).hasClass('NavContent')){NavChild.style.display='none';}}}var NavToggleText=document.createTextNode(isCollapsed?NavigationBarShow:NavigationBarHide);NavToggle.appendChild(NavToggleText);for(var j=0
;j<NavFrame.childNodes.length;j++){if($(NavFrame.childNodes[j]).hasClass('NavHead')){NavToggle.style.color=NavFrame.childNodes[j].style.color;NavFrame.childNodes[j].appendChild(NavToggle);}}NavFrame.setAttribute('id','NavFrame'+indexNavigationBar);}}}$(createNavigationBarToggleButton);function uploadwizard_newusers(){if(mw.config.get('wgNamespaceNumber')===4&&mw.config.get('wgTitle')==='Upload'&&mw.config.get('wgAction')==='view'){var oldDiv=document.getElementById('autoconfirmedusers'),newDiv=document.getElementById('newusers');if(oldDiv&&newDiv){var userGroups=mw.config.get('wgUserGroups');if(userGroups){for(var i=0;i<userGroups.length;i++){if(userGroups[i]==='autoconfirmed'){oldDiv.style.display='block';newDiv.style.display='none';return;}}}oldDiv.style.display='none';newDiv.style.display='block';return;}}}$(uploadwizard_newusers);function addEditIntro(name){$('.mw-editsection, #ca-edit').find('a').each(function(i,el){el.href=$(this).attr('href')+'&editintro='+name;});}if(mw.config.
get('wgNamespaceNumber')===0){$(function(){if(document.getElementById('disambigbox')){addEditIntro('Template:Disambig_editintro');}});$(function(){var cats=mw.config.get('wgCategories');if(!cats){return;}if($.inArray('Living people',cats)!==-1||$.inArray('Possibly living people',cats)!==-1){addEditIntro('Template:BLP_editintro');}});}});;mw.loader.state({"site":"ready"});
/* cache key: enwiki:resourceloader:filter:minify-js:7:3581a72be53bda607d81c91aa0a1f511 */
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
(function(mw,$){$(document).ready(function(){$('.PopUpMediaTransform a').each(function(){var link,title,parent=$(this).parent();if(parent.attr('videopayload')){$(this).click(function(){var thisref=this;mw.loader.using('mw.MwEmbedSupport',function(){var $videoContainer=$($(thisref).parent().attr('videopayload'));mw.addDialog({'width':'auto','height':'auto','title':mw.html.escape($videoContainer.find('video, audio').attr('data-mwtitle')),'content':$videoContainer,'close':function(){var domEl=$(this).find('video, audio').get(0);if(domEl&&domEl.pause){domEl.pause();}return true;}}).css('overflow','hidden').find('video, audio').embedPlayer();});return false;});}else if(parent.attr('data-videopayload')){link=$(this).attr('href');title=mw.Title.newFromImg({src:link});if(title&&title.getPrefixedDb()!==mw.config.get('wgPageName')){$(this).attr('href',title.getUrl());}}});});})(mediaWiki,jQuery);mw.loader.state({"mw.PopUpMediaTransform":"ready"});
/* cache key: enwiki:resourceloader:filter:minify-js:7:7af4f805cc92b2737cd39396e6019bdd */
\ No newline at end of file
import irc.bot
from urllib2 import urlopen
import urllib, os, json, re
from whoosh.index import create_in, open_dir
from whoosh.fields import *
from whoosh.qparser import QueryParser
from random import choice
from whoosh import qparser
#herepath, fname = os.path.split(os.path.realpath(__file__))
# indexdir = os.path.join(herepath, "botswaller")
indexdir = os.path.join(os.path.expanduser("~/bots"), "botswaller")
try:
os.makedirs(indexdir)
except OSError:
pass
archive_albums = ["https://archive.org/details/FatsWaller-TheCollectionI", "https://archive.org/details/FatsWaller-TheCollectionII"]
# https://archive.org/details/FatsWaller-TheCollectionI?output=json
year_pattern = re.compile(r"\b\d\d\d\d\b")
def title_from_original(t):
t = re.sub(r"^\d+\s*", "", t)
t = re.sub(r"\.\w+$", "", t)
t = re.sub(r"\s*\-?\s*\(?\d+\)?\s*$", "", t)
return t
class MyBot (irc.bot.SingleServerIRCBot):
def __init__(self, channel, nickname, server, port=6667):
irc.bot.SingleServerIRCBot.__init__(self, [(server, port)], nickname, nickname)
self.channel = channel
self.index = None
def build_index (self):
schema = Schema(title=TEXT(stored=True), url=ID(stored=True), year=NUMERIC(stored=True), content=TEXT)
ix = create_in(indexdir, schema)
writer = ix.writer()
for album_url in archive_albums:
print "reading album", album_url
album_data = json.load(urlopen(album_url+"?output=json"))
album_id = album_data['metadata']['identifier'][0]
for filekey in album_data['files']:
fr = album_data['files'][filekey]
if fr['format'] == 'Ogg Vorbis':
url = "https://archive.org/download/"+album_id+urllib.quote(filekey)
title = fr.get('original', '')
year = None
for y in year_pattern.findall(title):
year = int(y)
title = title_from_original(title)
content = title.decode("utf-8")
if year:
content += u" (" + unicode(year) + ")"
print url, content.encode("utf-8")
writer.add_document(title=title.decode("utf-8"), url=url.decode("utf-8"), year=year, content=content)
writer.commit()
def open_index (self):
return open_dir(indexdir)
def search_index (self, querytext, ix=None):
if ix == None:
if self.index == None:
self.index = self.open_index()
ix = self.index
with ix.searcher() as searcher:
parser = qparser.QueryParser("content", schema=ix.schema, group=qparser.OrGroup)
# query = QueryParser("content", ix.schema).parse(querytext)
query = parser.parse(querytext)
ret = []
for r in searcher.search(query):
result = r.fields()
result['_score'] = r.score
ret.append(result)
return ret
def on_welcome(self, c, e):
c.join(self.channel)
print "join"
def on_privmsg(self, c, e):
pass
def on_pubmsg(self, c, e):
# e.target, e.source, e.arguments, e.type
print e.arguments
msg = e.arguments[0]
msg = msg.strip("?!.")
hits = self.search_index(msg)
if len(hits) > 0:
hit = choice(hits)
newmsg = hit.get("title", u"")
newmsg += " " + hit.get("url", u"")
c.privmsg(self.channel, newmsg)
if __name__ == "__main__":
import sys, argparse
parser = argparse.ArgumentParser(description='I am a bot!')
parser.add_argument('--server', default='irc.freenode.net', help='server hostname (default: irc.freenode.net)')
parser.add_argument('--port', default=6667, type=int, help='server port (default: 6667)')
parser.add_argument('--channel', default='#botopera', help='channel to join (default: #botopera)')
parser.add_argument('--nickname', default='botswaller', help='bot nickname (default: botswaller)')
parser.add_argument('--index', action='store_true', default=False, help='index albums')
parser.add_argument('--search', default='', help='search the index (test)')
parser.add_argument('--daemon', action="store_true", default=False, help='run as daemon (default: False)')
args = parser.parse_args()
bot = MyBot(args.channel, args.nickname, args.server, args.port)
if args.search:
print "searching for", args.search
for r in bot.search_index(args.search):
print r
elif args.index:
bot.build_index()
else:
if args.daemon:
import daemon
# log = open("dorisbot.log", "w+")
# with daemon.DaemonContext(stderr=log):
with daemon.DaemonContext():
bot.start()
else:
bot.start()
This diff is collapsed.
#!/bin/bash
# ensure fifo
if [ ! -e msg.fifo ]; then mkfifo msg.fifo; fi
if [ ! -e delay.fifo ]; then mkfifo delay.fifo; fi
if [ ! -e route.fifo ]; then mkfifo route.fifo; fi
if [ ! -e routeselector.fifo ]; then mkfifo routeselector.fifo; fi
if [ ! -e router1_control.fifo ]; then mkfifo router1_control.fifo; fi
if [ ! -e router2_control.fifo ]; then mkfifo router2_control.fifo; fi
if [ ! -e route1.fifo ]; then mkfifo route1.fifo; fi
if [ ! -e route1a.fifo ]; then mkfifo route1a.fifo; fi
if [ ! -e route1b.fifo ]; then mkfifo route1b.fifo; fi
if [ ! -e route2.fifo ]; then mkfifo route2.fifo; fi
if [ ! -e collect.fifo ]; then mkfifo collect.fifo; fi
# start the pipeline
function route0 ()
{
cat msg.fifo | \
python ../ircpipebot.py --nickname botswaller | \
tee routeselector.fifo delay.fifo | \
python -u ../delay.py --delay 0.25 | \
python -u ../router.py --start 1 --control router1_control.fifo route1.fifo route1.fifo route2.fifo --verbose
}
function routeselector ()
{
cat routeselector.fifo | \
python -u ../routeselector.py | \
cat > route.fifo
}
function routecontrol ()
{
cat route.fifo | tee router1_control.fifo router2_control.fifo
}
function route1()
{
cat route1.fifo | \
python -u ../ircfilter.py --block beatrixbotter --block botswaller --block nickolatesla --block rachmanibot --message | \
python -u ../router.py --start 1 --control router2_control.fifo route1a.fifo route1b.fifo /dev/null
}
function route1a()
{
cat route1a.fifo | \
python -u ../whooshbot.py --index ~/bots/bots.wikipedia ../wikipedia/fats.firstperson | \
cat > collect.fifo
}
function route1b()
{
cat route1b.fifo | \
python -u ../whooshbot.py --index ~/bots/bots.archive ../internetarchive/fats.playlist | \
cat > collect.fifo
}
function route1c()
{
cat collect.fifo | \
python -u ../delay.py --receive delay.fifo --delay 0.0 | \
cat > msg.fifo
}
function route2()
{
cat route2.fifo | \
python -u srtsinger.py | \
cat > msg.fifo
}
routecontrol &
routeselector &
route1 &
route1a &
route1b &
route1c &
route2 &
route0
# cleanup
# rm *.fifo
\ No newline at end of file
import sys
while True:
line = sys.stdin.readline()
if line == '':
break
print "Not implemented"
http://www.songlyrics.com/fats-waller/i-wish-i-were-twins-lyrics/
When I'm with you I feel so small
Right in my shell I want to crawl
I wonder why I had to fall for you
Why do you make my life so tough?
Seems I can't love you half enough
You're so heavenly, much too much for me
I wish that I were twins, you great big babykins
So I could love you twice as much as I do
I'd have four loving arms to embrace you
Four eyes to idolize you each time I face you
With two hearts twice as true what couldn't four lips do
When four ears hear you saying, "I'm yours"
You great big babykins, I wish that I were twins
So I could love you twice as much as I do
Read more at http://www.songlyrics.com/fats-waller/i-wish-i-were-twins-lyrics/#HWhWpDEiozWGH1x9.99
import re
def srtparse (src):
""" parse srt src (string), returns list of dicts with start, end, timecode, content """
spat = re.compile(r"^(?:\d+\n)?((?:\d\d:)?\d\d:\d\d(?:[\.,]\d\d\d)? *--> *(?:(?:\d\d:)?\d\d:\d\d(?:[\.,]\d\d\d)?)?)$", re.M)
tcpat = re.compile(r"(?:(\d\d):)?(\d\d):(\d\d)(?:[\.,](\d\d\d))? *--> *(?:(?:(\d\d):)?(\d\d):(\d\d)(?:[\.,](\d\d\d))?)?")
# spat = re.compile(r"^(?:\d+\n)?(\d\d:\d\d:\d\d(?:[,\.]\d\d\d)? --> \d\d:\d\d:\d\d(?:[,\.]\d\d\d)?)$", re.M)
# tcpat = re.compile(r"(\d\d):(\d\d):(\d\d)(?:[,\.](\d\d\d))? --> (\d\d):(\d\d):(\d\d)(?:[,\.](\d\d\d))?")
tt = spat.split(src)
ret = []
for i in range(1, len(tt), 2):
timecode = tt[i]
content = tt[i+1]
tcs = tcpat.match(timecode).groups()
if tcs[3] == None:
start = (int(tcs[0])*3600) + (int(tcs[1])*60) + float(tcs[2])
else:
start = (int(tcs[0])*3600) + (int(tcs[1])*60) + float(tcs[2]+"."+tcs[3])
if tcs[4]:
if tcs[7] == None:
end = (int(tcs[4])*3600) + (int(tcs[5])*60) + float(tcs[6])
else:
end = (int(tcs[4])*3600) + (int(tcs[5])*60) + float(tcs[6]+"."+tcs[7])
else:
end = None
ret.append({
'start': start,
'end': end,
'timecode': timecode,
'content': content.strip()
})
return ret
AASRT_URL_PAT = re.compile(r"^(https?:\/\/.+?)$")
AASRT_TC_PAT = re.compile(r"^(?:(\d\d):)?(\d\d):(\d\d)(?:[,\.](\d{1,3}))? *--> *(?:(?:(\d\d):)?(\d\d):(\d\d)(?:[,\.](\d{1,3}))?)?$")
def parse_tc (tc, ret):
if tc != None:
ret['start'] = (int(tc[0] or 0) * 3600) + (int(tc[1]) * 60) + int(tc[2])
if tc[3] != None:
ret['start'] = ret['start'] + float("0."+tc[3])
if tc[5] != None:
ret['end'] = (int(tc[4] or 0) * 3600) + (int(tc[5]) * 60) + int(tc[6])
if tc[7] != None:
ret['end'] = ret['end'] + float("0."+tc[7])
return ret
def aasrt_iter(f, line=0):
url = None
tc = None
content = None
content_linestart = None
prev = None
curline = line
for line in f:
curline += 1
m = AASRT_URL_PAT.match(line)
if m:
if content != None:
yield parse_tc(tc, {'href': url, 'content': content, 'lineStart': content_linestart, 'lineEnd': curline-1})
url = m.group(1)
tc = None
content_linestart=curline
content = u''
prev = 'URL'
else:
m = AASRT_TC_PAT.match(line)
if m:
if prev != 'URL':
# freestanding timecode
if content != None:
yield parse_tc(tc, {'href': url, 'content': content, 'lineStart': content_linestart, 'lineEnd': curline-1})
content_linestart=curline
content = u''
tc = m.groups()
prev = 'TC'
else:
# Append content
if content == None:
content_linestart=curline
content = line
else:
content += line
prev = 'TEXT'
if content != None:
yield parse_tc(tc, {'href': url, 'content': content, 'lineStart': content_linestart, 'lineEnd': curline})
def aasrt_normalized_iter (f):
prev = None
cur = None
for cur in aasrt_iter(f):
if prev != None:
# prev.href => cur.href
if ('href' in prev) and (prev['href'] != None) and (('href' not in cur) or (cur['href'] == None)):
cur['href'] = prev['href']
# prev.end <= cur.start
if ('end' not in prev) and \
('start' in cur) and \
cur['href'] == prev['href']:
prev['end'] = cur['start']
yield prev
prev = cur
if cur != None:
yield cur
def aasrtparse (src, normalize=True):
if (type(src) == str or type(src) == unicode):
src = [x+"\n" for x in src.splitlines()]
if normalize:
return list(aasrt_normalized_iter(src))
else:
return list(aasrt_iter(src))
# spat = re.compile(r"^(?:(\d+|http:\/\/.+?)\n)?((?:\d\d:)?\d\d:\d\d(?:[,\.]\d{1,3})? *--> *(?:(?:\d\d:)?\d\d:\d\d(?:[,\.]\d{1,3})?)?)$", re.M)
def timecode(secs, style='srt'):
opts = timecode.styles[style]
h = int(secs/3600)
secs -= h*3600
m = int(secs/60)
secs -= m*60
s = int(secs)
if h == 0 and opts['skipzerohours']:
r = "{0:02d}:{1:02d}".format(m, s)
else:
r = "{0:02d}:{1:02d}:{2:02d}".format(h, m, s)
if (secs - s > 0) or opts['alwaysfract']:
r += opts['delim']+("{:0.3f}".format(secs-s)[2:])
return r
timecode.styles = {
'srt': {
'delim': ',',
'alwaysfract': True,
'skipzerohours': False
},
'compactsrt': {
'delim': ',',
'alwaysfract': False,
'skipzerohours': True
},
'html5': {
'delim': '.',
'alwaysfract': False,
'skipzerohours': True
}
}
if __name__ == "__main__":
doc1 = """
01:02:03 -->
01:02:04.5 -->
http://ia700304.us.archive.org/4/items/etiquette_0709_librivox/etiquette_07_post.ogg
http://ia700304.us.archive.org/4/items/etiquette_0709_librivox/etiquette_07_post.ogg
http://ftp.belnet.be/FOSDEM/2008/maintracks/FOSDEM2008-largescale.ogg
02:04 -->
[[Large scale]]
02:15 -->
02:17 -->
http://cloud.vti.be/openhouse/video/02-OH-BartVandeput_20120221_a3v6-640x360.ogv
""".strip()
for t in aasrtparse(doc1):
print t
continue
print "---"
if t['href']:
print t['href']
if 'start' in t:
# print tc
if 'end' in t:
print timecode(t['start']), '-->', timecode(t['end'])
else:
print timecode(t['start']), '-->'
print t['content']
# from pprint import pprint
# for t in tt:
# print t
00:39.289 -->
When I'm with you
00:40.418 -->
I feel so small
00:41.548 -->
Right in my shell
00:42.396 -->
I want to crawl
00:43.767 -->
I wonder why
00:44.895 -->
I had to fall for you
00:48.002 -->
Why do you make
00:48.847 -->
my life so tough?
00:49.975 -->
Seems I can't love you
00:51.066 -->
half enough
00:52.441 -->
You're so heavenly,
00:54.417 -->
much too much for me
00:56.679 -->
I wish that I were twins,
00:58.939 -->
you great big babykins
01:00.914 -->
So I could love you
01:01.761 -->
twice as much as I do
01:04.828 -->
I'd have four loving arms
01:06.521 -->
to embrace you
01:09.064 -->
Four eyes to idolize you
01:10.763 -->
each time I face you
01:13.259 -->
With two hearts twice as true
01:15.233 -->
what couldn't four lips do
01:17.453 -->
When four ears hear you saying,
01:19.385 -->
"I'm yours"
01:21.606 -->
You great big babykins,
01:23.865 -->
I wish that I were twins
01:25.843 -->
So I could love you
01:26.781 -->
twice as much as I do
02:28.945 -->
You great big babykins,
02:30.639 -->
I wish that I were twins
02:32.615 -->
So I could love you
02:33.743 -->
twice as much as I do
......@@ -45,7 +45,7 @@ class MyBot(irc.bot.SingleServerIRCBot):
return
if (self.title_index >= 0 and self.title_index < len(titles)):
sleep(1+random()*1)
c.privmsg(self.channel, titles[self.title_index].strip())
c.privmsg(self.channel, " "+titles[self.title_index].strip())
self.title_index += 1
if __name__ == "__main__":
......@@ -55,7 +55,7 @@ if __name__ == "__main__":
parser.add_argument('--server', default='botopera.lan', help='server hostname (default: irc.freenode.net)')
parser.add_argument('--port', default=6667, type=int, help='server port (default: 6667)')
parser.add_argument('--channel', default='#botopera', help='channel to join (default: #botopera)')
parser.add_argument('--nickname', default='beatrixBOTter', help='bot nickname (default: beatrixBOTTER)')
parser.add_argument('--nickname', default='beatrixBOTterBot', help='bot nickname (default: beatrixBOTTER)')
args = parser.parse_args()
bot = MyBot(args.channel, args.nickname, args.server, args.port)
......
How you have by himself You are not fit
Ashamed of his badness You manage to squeeze
You do when She came to mind if I
Where do you eat my dinner quite comfortable?
Starts I feel bite you walking obediently
I don't want, ever so many as you
I fear that he turned round, you nasty old toad
Because they cannot spread it ever so many while we wait
They could make two red lobsters to save him
Three kittens to keep them the air I tell you
For three days neither for yellow indeed they DO the tropics have
No one hiding are you going, "They let you"
You bold bad spider, him go into they DO eat
Of us could of us could not too heavy that I need
You bold bad spider, him go into they DO eat
Of us could of us could not too heavy that I need
\ No newline at end of file
00:39.289 -->
When I'm with you I feel so small
00:41.548 -->
Right in my shell I want to crawl
00:43.767 -->
I wonder why I had to fall for you
00:48.002 -->
Why do you make my life so tough?
00:49.975 -->
Seems I can't love you half enough
00:52.441 -->
You're so heavenly, much too much for me
00:56.679 -->
I wish that I were twins, you great big babykins
01:00.914 -->
So I could love you twice as much as I do
01:04.828 -->
I'd have four loving arms to embrace you
01:09.064 -->
Four eyes to idolize you each time I face you
01:13.259 -->
With two hearts twice as true what couldn't four lips do
01:17.453 -->
When four ears hear you saying, "I'm yours"
01:21.606 -->
You great big babykins, I wish that I were twins
01:25.843 -->
So I could love you twice as much as I do
02:28.945 -->
You great big babykins, I wish that I were twins
02:32.615 -->
So I could love you twice as much as I do
I am Thomas Wright "Fats" Waller (May 21, 1904 – December 15, 1943) influential American jazz pianist, organist, composer, singer, and comedic entertainer, whose innovations to the Harlem stride style laid the groundwork for modern jazz piano.
http://upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Fats_Waller_edit.jpg/220px-Fats_Waller_edit.jpg
At the age of 14 I was playing the organ at Harlem's Lincoln Theater and within 12 months I had composed my first rag. MY first piano solos Muscle Shoals Blues and Birmingham Blues were recorded in October 1922 when I was 18 years old.
The anonymous sleeve notes on the 1960 RCA Victor album Handful of Keys state that I copyrighted over 400 new songs, many of which co-written with MY closest collaborator Andy Razaf.
I contracted pneumonia and died on a cross-country train trip near Kansas City, Missouri, on December 15, 1943. My final recording session was with an interracial group in Detroit, Michigan, that included white trumpeter Don Hirleman.
I was the youngest of 11 children (five survived childhood) born to Adeline Locket Waller and Reverend Edward Martin Waller in New York City.
That reminds me of a song I once played, Clothes Line Ballet https://archive.org/download/FatsWaller-TheCollectionII/14%20Clothes%20Line%20Ballet%201934.ogg
That reminds me of a song I once played, Handful of Keys https://archive.org/download/FatsWaller-TheCollectionI/04%20Handful%20of%20Keys%201929.ogg
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment