Merge lp:~lderan/ubuntu-bots/meeetingology-output into lp:~ubuntu-bots/ubuntu-bots/meetingology

Proposed by Thomas Molloy
Status: Merged
Merged at revision: 13
Proposed branch: lp:~lderan/ubuntu-bots/meeetingology-output
Merge into: lp:~ubuntu-bots/ubuntu-bots/meetingology
Diff against target: 110 lines (+27/-8)
4 files modified
css-log-default.css (+3/-0)
meeting.py (+4/-3)
plugin.py (+15/-0)
writers.py (+5/-5)
To merge this branch: bzr merge lp:~lderan/ubuntu-bots/meeetingology-output
Reviewer Review Type Date Requested Status
Alan Bell Approve
Review via email: mp+174590@code.launchpad.net

Description of the change

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

To post a comment you must log in.
Revision history for this message
Alan Bell (alanbell) wrote :

diff looks good, and merges cleanly, lets give it a go and try some private voting . . .

Revision history for this message
Alan Bell (alanbell) wrote :

yup, lets merge this

review: Approve
13. By Alan Bell

accepting merge from lderan fixes lp:890846

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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 @@
13body .topicline { color: #000080; font-weight: bold }13body .topicline { color: #000080; font-weight: bold }
14body .cmd { color: #007020; font-weight: bold }14body .cmd { color: #007020; font-weight: bold }
15body .cmdline { font-weight: bold }15body .cmdline { font-weight: bold }
16
17a {text-decoration:none;}
18a:hover {text-decoration:underline;}
1619
=== 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 @@
658 self.save(realtime_update=True)658 self.save(realtime_update=True)
659 if re.match("\+1|0|\+0|-1",line):659 if re.match("\+1|0|\+0|-1",line):
660 self.doCastVote(nick,line,time_)660 self.doCastVote(nick,line,time_)
661 def doCastVote(self, nick, line, time_=None):661 def doCastVote(self, nick, line, time_=None, private=False):
662 """if a vote is underway and the nick is a registered voter662 """if a vote is underway and the nick is a registered voter
663 and has not already voted in this vote663 and has not already voted in this vote
664 add the voter name and record the vote664 add the voter name and record the vote
@@ -668,11 +668,12 @@
668 if nick in self.voters or self.voters=={}:668 if nick in self.voters or self.voters=={}:
669 if self.activeVote:669 if self.activeVote:
670 self.currentVote[nick]=line670 self.currentVote[nick]=line
671 self.reply(line + " received from " + nick)671 if private is False:
672 self.reply(line + " received from " + nick)
673
672 #if the vote was in a private message - how do we do that??674 #if the vote was in a private message - how do we do that??
673 #self.reply(line + " received from a private vote")675 #self.reply(line + " received from a private vote")
674 #we do record the voter name in the voting structure even if private, so they can't vote twice676 #we do record the voter name in the voting structure even if private, so they can't vote twice
675 #we don't print that to the minutes or summary
676677
677 def addrawline(self, nick, line, time_=None):678 def addrawline(self, nick, line, time_=None):
678 """This adds a line to the log, bypassing command execution.679 """This adds a line to the log, bypassing command execution.
679680
=== 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 @@
36import supybot.ircmsgs as ircmsgs36import supybot.ircmsgs as ircmsgs
3737
38import time38import time
39import re
39import meeting40import meeting
40import supybotconfig41import supybotconfig
41# Because of the way we override names, we need to reload these in order.42# Because of the way we override names, we need to reload these in order.
@@ -124,6 +125,20 @@
124 (channel, network, time.ctime()))125 (channel, network, time.ctime()))
125 if len(recent_meetings) > 10:126 if len(recent_meetings) > 10:
126 del recent_meetings[0]127 del recent_meetings[0]
128
129 """ private voting system """
130 if channel[:1] != '#' and re.match("\+1|0|\+0|-1",payload):
131 for key in meeting_cache.keys():
132 if payload.endswith(key[0]):
133 voteMeeting = meeting_cache.get(key, None)
134 if voteMeeting is not None:
135 time_ = time.localtime()
136 private = True
137 voteMeeting.doCastVote(nick,payload,time_,private)
138 irc.reply("received for vote " + voteMeeting.activeVote)
139 else:
140 irc.reply("No active meetings in this channel")
141
127142
128 # If there is no meeting going on, then we quit143 # If there is no meeting going on, then we quit
129 if M is None: return144 if M is None: return
130145
=== 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 @@
456 (html(m2.group(1)),html(m2.group(2))))456 (html(m2.group(1)),html(m2.group(2))))
457 if m2 is None:457 if m2 is None:
458 outline = html(line)458 outline = html(line)
459 lines.append('<a name="l-%(lineno)s"></a>'459 lines.append('<a href="#l-%(lineno)s" name="l-%(lineno)s">'
460 '<span class="tm">%(time)s</span>'460 '<span class="tm">%(time)s</span></a>'
461 '<span class="nk">%(nick)s</span> '461 '<span class="nk">%(nick)s</span> '
462 '%(line)s'%{'lineno':lineNumber,462 '%(line)s'%{'lineno':lineNumber,
463 'time':html(m.group('time')),463 'time':html(m.group('time')),
@@ -1216,7 +1216,7 @@
1216 Votes.append(self.heading('Vote results'))1216 Votes.append(self.heading('Vote results'))
1217 for m in M.votes:1217 for m in M.votes:
1218 #differentiate denied votes somehow, strikethrough perhaps?1218 #differentiate denied votes somehow, strikethrough perhaps?
1219 Votes.append("\n * "+m)1219 Votes.append(" * "+m)
1220 motion = "Deadlock"1220 motion = "Deadlock"
1221 if(M.votes[m][0] > M.votes[m][1]):1221 if(M.votes[m][0] > M.votes[m][1]):
1222 motion = "Motion carried"1222 motion = "Motion carried"
@@ -1264,12 +1264,12 @@
1264 m.assigned = True1264 m.assigned = True
1265 # unassigned items:1265 # unassigned items:
1266 Unassigned = [ ]1266 Unassigned = [ ]
1267 Unassigned.append("* **UNASSIGNED**")1267 Unassigned.append(" * **UNASSIGNED**")
1268 numberUnassigned = 01268 numberUnassigned = 0
1269 for m in M.minutes:1269 for m in M.minutes:
1270 if m.itemtype != "ACTION": continue1270 if m.itemtype != "ACTION": continue
1271 if getattr(m, 'assigned', False): continue1271 if getattr(m, 'assigned', False): continue
1272 Unassigned.append(" ** %s"%moin(m.line))1272 Unassigned.append(" * %s"%moin(m.line))
1273 numberUnassigned += 11273 numberUnassigned += 1
1274 if numberUnassigned == 0:1274 if numberUnassigned == 0:
1275 Unassigned.append(" * (none)")1275 Unassigned.append(" * (none)")

Subscribers

People subscribed via source and target branches