Commit fc17cf5e authored by Thomas Levine's avatar Thomas Levine
Browse files

plotter.write

parent 68e2223c
......@@ -32,19 +32,17 @@ class ReportPlotBot(irc.bot.SingleServerIRCBot):
#radius = 5000
if e.target == self.observechannel:
msg = e.arguments[0]
#this count the length of a message and draws a circle accordingly
#msg = e.arguments[0]
#count = len(msg)
#size = min(count*100, 3000)
#todo='PA3000,5000;CI{0}'.format(wordcount)+','+str(angle)
#c.privmsg(self.plotchannel,str(todo))
NbWords = len(msg.split())
d=50
#cl=spiral(pX - radius,pY - radius,pX + radius,pY + radius,30,NbWords,angle)
for x in range(0,NbWords):
cl='PA'+str(pX)+','+str(pY)+';CI{0}'.format((d*x)+d)+','+str(angle)
print cl
cl=spiral(pX - radius,pY - radius,pX + radius,pY + radius,30,NbWords,angle)
#for x in range(0,NbWords):
# cl='PA'+str(pX)+','+str(pY)+';CI{0}'.format((d*x)+d)+','+str(angle)
# print cl
if self.plotter == None:
c.privmsg(self.plotchannel,str(cl))
else:
self.plotter.write(cl)
posN=(NbWords*d)+20
pos = 'PR{0},{0}'.format(posN)
......
Supports Markdown
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