Commit 6ac73f21 authored by Michael Murtaugh's avatar Michael Murtaugh

lots of integration

parent 8da2d7ff
......@@ -20,7 +20,7 @@ python ../ircpipebot.py --nickname beatrixbotter | \
tee route_selector.fifo delay.fifo | \
python -u ../delay.py --delay 0.75 | \
python -u ../ircfilter.py --block beatrixbotter --block botswaller --block nickolatesla --block rachmanibot --message | \
python -u ../router.py --start 1 --control route_control.fifo route1.fifo route2.fifo route3.fifo --verbose
python -u ../router.py --start 1 --control route_control.fifo route1.fifo route2.fifo route3.fifo
}
function routeselector ()
......
to do
The Tale of Two Bad Mice, 1904, http://www.gutenberg.org/ebooks/45264, http://www.gutenberg.org/cache/epub/45264/pg45264.cover.medium.jpg
import irc.bot
import re, subprocess
import re, subprocess, os
from thread import start_new_thread
from time import sleep
......@@ -8,7 +8,7 @@ summon_pat = re.compile(r"^summon (\w+)$", re.I)
kill_pat = re.compile(r"^kill (\w+)$", re.I)
info_pat = re.compile(r"^host:?\s*info$", re.I)
bots = ["beatrixbotter", "botswaller", "nickolatesla", "rachmanibot"]
bots = ["beatrixbotter/beatrixbotter.sh", "botswaller/botswaller.sh", "nickolatesla/nickolatesla.sh"]
class HostBot (irc.bot.SingleServerIRCBot):
def __init__(self, channel, nickname, server, port=6667):
......@@ -23,12 +23,15 @@ class HostBot (irc.bot.SingleServerIRCBot):
def on_welcome(self, c, e):
c.join(self.channel)
print "join"
for b in bots:
args = ["./"+b+".sh"]
print args
p = subprocess.Popen(args, close_fds=True)
self.procs.append((b, p))
dirpath, filename = os.path.split(b)
base, ext = os.path.splitext(filename)
abspath = os.path.abspath(dirpath)
absfile = os.path.join(abspath, filename)
args = [absfile]
print absfile, abspath
p = subprocess.Popen(args, cwd=abspath, close_fds=True)
self.procs.append((base, p))
sleep(1)
def on_privmsg(self, c, e):
......@@ -57,6 +60,7 @@ class HostBot (irc.bot.SingleServerIRCBot):
# print "on_pubmsg"
# e.target, e.source, e.arguments, e.type
# print e.arguments
return
msg = e.arguments[0]
m = summon_pat.search(msg)
if m:
......
......@@ -2,8 +2,8 @@
# 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 route_control.fifo ]; then mkfifo route_control.fifo; fi
if [ ! -e route_selector.fifo ]; then mkfifo route_selector.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
......@@ -17,21 +17,21 @@ function route0 ()
{
cat msg.fifo | \
python ../ircpipebot.py --nickname botswaller | \
tee routeselector.fifo delay.fifo | \
tee route_selector.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
python -u ../router.py --start 1 --control router1_control.fifo route1.fifo route1.fifo route2.fifo
}
function routeselector ()
{
cat routeselector.fifo | \
cat route_selector.fifo | \
python -u ../routeselector.py | \
cat > route.fifo
cat > route_control.fifo
}
function routecontrol ()
{
cat route.fifo | tee router1_control.fifo router2_control.fifo
cat route_control.fifo | tee router1_control.fifo router2_control.fifo
}
function route1()
......@@ -44,14 +44,14 @@ python -u ../router.py --start 1 --control router2_control.fifo route1a.fifo rou
function route1a()
{
cat route1a.fifo | \
python -u ../whooshbot.py --index ~/bots/bots.wikipedia ../wikipedia/fats.firstperson | \
python -u ../whooshbot.py --index ~/bots/bots.wikipedia fats.wikipedia.txt | \
cat > collect.fifo
}
function route1b()
{
cat route1b.fifo | \
python -u ../whooshbot.py --index ~/bots/bots.archive ../internetarchive/fats.playlist | \
python -u ../whooshbot.py --index ~/bots/bots.works fats.works.txt | \
cat > collect.fifo
}
......
Blue Turning Grey Over You (1935) https://archive.org/download/FatsWaller-TheCollectionI/11%20Blue%20Turning%20Gray%20Over%20You%201935.mp3
Numb Fumbling (1929) https://archive.org/download/FatsWaller-TheCollectionI/17%20Numb%20fumbling%20%281929%29.mp3
Sweetie Pie https://archive.org/download/FatsWaller-TheCollectionI/03%20Sweetie%20Pie.mp3
Rusty Pail (1927) https://archive.org/download/FatsWaller-TheCollectionI/16%20Rusty%20Pail%201927.mp3
The Sheik of Araby https://archive.org/download/FatsWaller-TheCollectionI/14%20The%20Sheik%20of%20Araby.mp3
Baby, Oh Where Can You Be? (1929) https://archive.org/download/FatsWaller-TheCollectionI/05%20Baby%2C%20Oh%21%20Where%20Can%20You%20Be%201929.mp3
Handful of Keys (1929) https://archive.org/download/FatsWaller-TheCollectionI/04%20Handful%20of%20Keys%201929.mp3
Ain't Misbehavin' (1929) https://archive.org/download/FatsWaller-TheCollectionI/01%20Ain%27t%20Misbehavin%27%201929.mp3
After You've Gone (1930) https://archive.org/download/FatsWaller-TheCollectionI/13%20After%20You%27ve%20Gone%20%281930%29.mp3
African Ripples (1935) https://archive.org/download/FatsWaller-TheCollectionI/18%20African%20Ripples%201935.mp3
Sturdust https://archive.org/download/FatsWaller-TheCollectionI/12%20Sturdust.mp3
Gladyse (1929) https://archive.org/download/FatsWaller-TheCollectionI/02%20Gladyse%201929.mp3
I Wish I Were Twins (1934) https://archive.org/download/FatsWaller-TheCollectionI/06%20I%20Wish%20I%20Were%20Twins%20%201934.mp3
Won't You Get Off It, Please? https://archive.org/download/FatsWaller-TheCollectionI/09%20Won%27t%20You%20Get%20Off%20It%20Please.mp3
Dinah https://archive.org/download/FatsWaller-TheCollectionI/07%20Dinah.mp3
Lulu's Back In Town (1935) https://archive.org/download/FatsWaller-TheCollectionI/15%20Lulu%27s%20Back%20In%20Town%20-%201935.mp3
Tea For Two https://archive.org/download/FatsWaller-TheCollectionI/08%20Tea%20For%20Two.mp3
Blue Black Bottom (1927) https://archive.org/download/FatsWaller-TheCollectionI/10%20Blue%20Black%20Bottom%201927.mp3
I'm Crazy 'Bout My Baby https://archive.org/download/FatsWaller-TheCollectionII/16%20%20I%27m%20Crazy%20%27Bout%20My%20Baby.mp3
Georgia on My Mind https://archive.org/download/FatsWaller-TheCollectionII/06%20Georgia%20on%20My%20Mind.mp3
Honeysuckle Rose (1934) https://archive.org/download/FatsWaller-TheCollectionII/01%20Honeysuckle%20Rose%201934.mp3
Believe It, Beloved (1935) https://archive.org/download/FatsWaller-TheCollectionII/03%20Believe%20It%2C%20Beloved%201935.mp3
California, Here I Come (1935) https://archive.org/download/FatsWaller-TheCollectionII/15%20California%2C%20Here%20I%20Come%201935.mp3
By The Light Of the Silvery Moon (1942) https://archive.org/download/FatsWaller-TheCollectionII/18%20By%20The%20Light%20Of%20the%20Silvery%20Moon%201942.mp3
Baby Brown (1935) https://archive.org/download/FatsWaller-TheCollectionII/04%20Baby%20Brown%201935.mp3
Because of Once Upon a Time (1935) https://archive.org/download/FatsWaller-TheCollectionII/11%20Because%20Of%20Once%20Upon%20A%20Time%201935.mp3
Valentine Stomp (1929) https://archive.org/download/FatsWaller-TheCollectionII/13%20Valentine%20Stomp%20-%201929.mp3
Birmingham Blues (1922) https://archive.org/download/FatsWaller-TheCollectionII/09%20Birmingham%20Blues%201922.mp3
The Minor Drag (1929) https://archive.org/download/FatsWaller-TheCollectionII/07%20The%20Minor%20Drag%20%281929%29.mp3
Alligator Crawl (1934) https://archive.org/download/FatsWaller-TheCollectionII/08%20Alligator%20Crawl%20%201934.mp3
All That Meat and No Potatoes (1941) https://archive.org/download/FatsWaller-TheCollectionII/17%20All%20That%20Meat%20And%20No%20Potatoes%201941.mp3
Have a Little Dream on Me https://archive.org/download/FatsWaller-TheCollectionII/10%20Have%20A%20Little%20Dream%20On%20Me.mp3
Smashin' Thirds (1929) https://archive.org/download/FatsWaller-TheCollectionII/02%20Smashing%20Thirds%201929.mp3
Clothes Line Ballet (1934) https://archive.org/download/FatsWaller-TheCollectionII/14%20Clothes%20Line%20Ballet%201934.mp3
Keepin' Out of Mischief Now https://archive.org/download/FatsWaller-TheCollectionII/05%20Keepin%27%20Out%20Of%20Mischief%20Now.mp3
I Ain't Got Nobody https://archive.org/download/FatsWaller-TheCollectionII/12%20I%20Ain%27t%20Got%20Nobody.mp3
......@@ -4,4 +4,4 @@ while True:
line = sys.stdin.readline()
if line == '':
break
print "Not implemented"
# print "Not implemented"
......@@ -3,6 +3,8 @@
if [ ! -e msg.fifo ]; then mkfifo msg.fifo; fi
if [ ! -e delay.fifo ]; then mkfifo delay.fifo; fi
if [ ! -e route_control.fifo ]; then mkfifo route_control.fifo; fi
if [ ! -e route_selector.fifo ]; then mkfifo route_selector.fifo; fi
if [ ! -e route1.fifo ]; then mkfifo route1.fifo; fi
if [ ! -e route2.fifo ]; then mkfifo route2.fifo; fi
if [ ! -e route3.fifo ]; then mkfifo route3.fifo; fi
......@@ -13,45 +15,51 @@ function route0 ()
{
cat msg.fifo | \
python ../ircpipebot.py --nickname nickolatesla | \
python -u ../routeselector.py 2> route_control.fifo | \
tee delay.fifo | \
tee route_selector.fifo delay.fifo | \
python -u ../delay.py --delay 0.5 | \
python -u ../ircfilter.py --block beatrixbotter --block botswaller --block nickolatesla --block rachmanibot --message | \
python -u ../router.py --start 1 --control route_control.fifo route1.fifo route2.fifo route3.fifo --verbose
python -u ../router.py --start 1 --control route_control.fifo route1.fifo route2.fifo route3.fifo
}
function routeselector ()
{
cat route_selector.fifo | \
python -u ../routeselector.py | \
cat > route_control.fifo
}
function route1()
{
cat route1.fifo | \
python -u ../whooshbot.py --index ~/bots/tesla.wikipedia tesla.wikipedia | \
python -u ../whooshbot.py --index ~/bots/tesla.wikipedia tesla.wikipedia.txt | \
cat > collect.fifo
}
function route2()
{
cat route2.fifo | \
python -u ../whooshbot.py --index ~/bots/tesla.works tesla.works | \
python -u ../whooshbot.py --index ~/bots/tesla.works tesla.works.txt | \
cat > collect.fifo
}
function route3()
{
cat route3.fifo | \
python -u ../whooshbot.py --index ~/bots/tesla.remixes tesla.remixes | \
python -u ../whooshbot.py --index ~/bots/tesla.remixes tesla.remixes.txt | \
cat > collect.fifo
}
function endroute()
{
cat collect.fifo | \
python -u ../delay.py --receive delay.fifo --delay 4.0 | \
python -u ../delay.py --receive delay.fifo --delay 0.0 | \
cat > msg.fifo
}
route1 &
route2 &
route3 &
routeselector &
endroute &
route0
......
todo: tesla remix index
\ No newline at end of file
remix http://botopera.activearchives.org/NICKola_Tesla/gif_act3/US359748-2.gif
remix http://botopera.activearchives.org/NICKola_Tesla/gif_act3/US359748-2_center.gif
remix http://botopera.activearchives.org/NICKola_Tesla/gif_act3/US382280-2.gif
remix http://botopera.activearchives.org/NICKola_Tesla/gif_act3/US396121-0.gif
remix http://botopera.activearchives.org/NICKola_Tesla/gif_act3/US396121-0_center.gif
remix http://botopera.activearchives.org/NICKola_Tesla/gif_act3/US413353-0.gif
remix http://botopera.activearchives.org/NICKola_Tesla/gif_act3/US413353-0_center.gif
......@@ -56,3 +56,8 @@
1941 In that year, I didn't get any patents published in the United States.
1942 In that year, I didn't get any patents published in the United States.
1943 In that year, I didn't get any patents published in the United States.
Throughout my life, I've invented many different kinds of motors. Many of my inventions were not patented, or patented by others. http://botopera.activearchives.org/NICKola_Tesla/USpatents_by_topic/USpatents_motor.gif
21 of my patents include the word magnet. http://botopera.activearchives.org/NICKola_Tesla/USpatents_by_topic/USpatents_magnet.gif
My first US patent includes the word dynamo, and many of them afterwards. http://botopera.activearchives.org/NICKola_Tesla/USpatents_by_topic/USpatents_dynamo.gif
Two of my patents include the word coil, but not the one which is referred today as the Tesla Coil. http://botopera.activearchives.org/NICKola_Tesla/USpatents_by_topic/USpatents_coil.gif
I devised many apparatus to transmit electricity. http://botopera.activearchives.org/NICKola_Tesla/USpatents_by_topic/USpatents_transmission.gif
\ 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