ubuntu-bots team mailing list archive
-
ubuntu-bots team
-
Mailing list archive
-
Message #00234
[Merge] lp:~lderan/ubuntu-bots/meeetingology-output into lp:~ubuntu-bots/ubuntu-bots/meetingology
Thomas Molloy has proposed merging lp:~lderan/ubuntu-bots/meeetingology-output into lp:~ubuntu-bots/ubuntu-bots/meetingology.
Requested reviews:
Ubuntu IRC Bots (ubuntu-bots)
For more details, see:
https://code.launchpad.net/~lderan/ubuntu-bots/meeetingology-output/+merge/174590
Fixed the output for moinmoin output when there are unassigned actions, also removed the line between vote results, adding in line linking for the html output as well
--
https://code.launchpad.net/~lderan/ubuntu-bots/meeetingology-output/+merge/174590
Your team Ubuntu IRC Bots is requested to review the proposed merge of lp:~lderan/ubuntu-bots/meeetingology-output into lp:~ubuntu-bots/ubuntu-bots/meetingology.
=== modified file 'css-log-default.css'
--- css-log-default.css 2010-09-02 19:16:45 +0000
+++ css-log-default.css 2013-07-13 22:33:25 +0000
@@ -13,3 +13,6 @@
body .topicline { color: #000080; font-weight: bold }
body .cmd { color: #007020; font-weight: bold }
body .cmdline { font-weight: bold }
+
+a {text-decoration:none;}
+a:hover {text-decoration:underline;}
=== modified file 'meeting.py'
--- meeting.py 2013-04-21 19:25:19 +0000
+++ meeting.py 2013-07-13 22:33:25 +0000
@@ -658,7 +658,7 @@
self.save(realtime_update=True)
if re.match("\+1|0|\+0|-1",line):
self.doCastVote(nick,line,time_)
- def doCastVote(self, nick, line, time_=None):
+ def doCastVote(self, nick, line, time_=None, private=False):
"""if a vote is underway and the nick is a registered voter
and has not already voted in this vote
add the voter name and record the vote
@@ -668,11 +668,12 @@
if nick in self.voters or self.voters=={}:
if self.activeVote:
self.currentVote[nick]=line
- self.reply(line + " received from " + nick)
+ if private is False:
+ self.reply(line + " received from " + nick)
+
#if the vote was in a private message - how do we do that??
#self.reply(line + " received from a private vote")
#we do record the voter name in the voting structure even if private, so they can't vote twice
- #we don't print that to the minutes or summary
def addrawline(self, nick, line, time_=None):
"""This adds a line to the log, bypassing command execution.
=== modified file 'plugin.py'
--- plugin.py 2013-04-21 19:25:19 +0000
+++ plugin.py 2013-07-13 22:33:25 +0000
@@ -36,6 +36,7 @@
import supybot.ircmsgs as ircmsgs
import time
+import re
import meeting
import supybotconfig
# Because of the way we override names, we need to reload these in order.
@@ -124,6 +125,20 @@
(channel, network, time.ctime()))
if len(recent_meetings) > 10:
del recent_meetings[0]
+
+ """ private voting system """
+ if channel[:1] != '#' and re.match("\+1|0|\+0|-1",payload):
+ for key in meeting_cache.keys():
+ if payload.endswith(key[0]):
+ voteMeeting = meeting_cache.get(key, None)
+ if voteMeeting is not None:
+ time_ = time.localtime()
+ private = True
+ voteMeeting.doCastVote(nick,payload,time_,private)
+ irc.reply("received for vote " + voteMeeting.activeVote)
+ else:
+ irc.reply("No active meetings in this channel")
+
# If there is no meeting going on, then we quit
if M is None: return
=== modified file 'writers.py'
--- writers.py 2013-04-21 19:25:19 +0000
+++ writers.py 2013-07-13 22:33:25 +0000
@@ -456,8 +456,8 @@
(html(m2.group(1)),html(m2.group(2))))
if m2 is None:
outline = html(line)
- lines.append('<a name="l-%(lineno)s"></a>'
- '<span class="tm">%(time)s</span>'
+ lines.append('<a href="#l-%(lineno)s" name="l-%(lineno)s">'
+ '<span class="tm">%(time)s</span></a>'
'<span class="nk">%(nick)s</span> '
'%(line)s'%{'lineno':lineNumber,
'time':html(m.group('time')),
@@ -1216,7 +1216,7 @@
Votes.append(self.heading('Vote results'))
for m in M.votes:
#differentiate denied votes somehow, strikethrough perhaps?
- Votes.append("\n * "+m)
+ Votes.append(" * "+m)
motion = "Deadlock"
if(M.votes[m][0] > M.votes[m][1]):
motion = "Motion carried"
@@ -1264,12 +1264,12 @@
m.assigned = True
# unassigned items:
Unassigned = [ ]
- Unassigned.append("* **UNASSIGNED**")
+ Unassigned.append(" * **UNASSIGNED**")
numberUnassigned = 0
for m in M.minutes:
if m.itemtype != "ACTION": continue
if getattr(m, 'assigned', False): continue
- Unassigned.append(" ** %s"%moin(m.line))
+ Unassigned.append(" * %s"%moin(m.line))
numberUnassigned += 1
if numberUnassigned == 0:
Unassigned.append(" * (none)")
Follow ups