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

Proposed by Thomas Molloy
Status: Superseded
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
Ubuntu IRC Bots Pending
Review via email: mp+174539@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.
13. By Alan Bell

accepting merge from lderan fixes lp:890846

14. By Alan Bell

accepting merge for private voting

15. By Alan Bell

accepting merge

16. By Alan Bell

accepting merge for closing meetings correctly

17. By Alan Bell

accept fix of vote output

18. By Alan Bell

accepting merge for fixing voting

19. By Alan Bell

accepting merge

20. By Alan Bell

accepting fix

21. By Alan Bell

accpeting merge

22. By Thomas Molloy

DONE items for MoinMoin outputs now show up as DONE instead of ACTION

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'css-log-default.css'
2--- css-log-default.css 2010-09-02 19:16:45 +0000
3+++ css-log-default.css 2013-07-13 15:37:28 +0000
4@@ -13,3 +13,6 @@
5 body .topicline { color: #000080; font-weight: bold }
6 body .cmd { color: #007020; font-weight: bold }
7 body .cmdline { font-weight: bold }
8+
9+a {text-decoration:none;}
10+a:hover {text-decoration:underline;}
11
12=== modified file 'meeting.py'
13--- meeting.py 2013-04-21 19:25:19 +0000
14+++ meeting.py 2013-07-13 15:37:28 +0000
15@@ -658,7 +658,7 @@
16 self.save(realtime_update=True)
17 if re.match("\+1|0|\+0|-1",line):
18 self.doCastVote(nick,line,time_)
19- def doCastVote(self, nick, line, time_=None):
20+ def doCastVote(self, nick, line, time_=None, private=False):
21 """if a vote is underway and the nick is a registered voter
22 and has not already voted in this vote
23 add the voter name and record the vote
24@@ -668,11 +668,12 @@
25 if nick in self.voters or self.voters=={}:
26 if self.activeVote:
27 self.currentVote[nick]=line
28- self.reply(line + " received from " + nick)
29+ if private is False:
30+ self.reply(line + " received from " + nick)
31+
32 #if the vote was in a private message - how do we do that??
33 #self.reply(line + " received from a private vote")
34 #we do record the voter name in the voting structure even if private, so they can't vote twice
35- #we don't print that to the minutes or summary
36
37 def addrawline(self, nick, line, time_=None):
38 """This adds a line to the log, bypassing command execution.
39
40=== modified file 'plugin.py'
41--- plugin.py 2013-04-21 19:25:19 +0000
42+++ plugin.py 2013-07-13 15:37:28 +0000
43@@ -36,6 +36,7 @@
44 import supybot.ircmsgs as ircmsgs
45
46 import time
47+import re
48 import meeting
49 import supybotconfig
50 # Because of the way we override names, we need to reload these in order.
51@@ -124,6 +125,20 @@
52 (channel, network, time.ctime()))
53 if len(recent_meetings) > 10:
54 del recent_meetings[0]
55+
56+ """ private voting system """
57+ if channel[:1] != '#' and re.match("\+1|0|\+0|-1",payload):
58+ for key in meeting_cache.keys():
59+ if payload.endswith(key[0]):
60+ voteMeeting = meeting_cache.get(key, None)
61+ if voteMeeting is not None:
62+ time_ = time.localtime()
63+ private = True
64+ voteMeeting.doCastVote(nick,payload,time_,private)
65+ irc.reply("received for vote " + voteMeeting.activeVote)
66+ else:
67+ irc.reply("No active meetings in this channel")
68+
69
70 # If there is no meeting going on, then we quit
71 if M is None: return
72
73=== modified file 'writers.py'
74--- writers.py 2013-04-21 19:25:19 +0000
75+++ writers.py 2013-07-13 15:37:28 +0000
76@@ -456,8 +456,8 @@
77 (html(m2.group(1)),html(m2.group(2))))
78 if m2 is None:
79 outline = html(line)
80- lines.append('<a name="l-%(lineno)s"></a>'
81- '<span class="tm">%(time)s</span>'
82+ lines.append('<a href="#l-%(lineno)s" name="l-%(lineno)s">'
83+ '<span class="tm">%(time)s</span></a>'
84 '<span class="nk">%(nick)s</span> '
85 '%(line)s'%{'lineno':lineNumber,
86 'time':html(m.group('time')),
87@@ -1216,7 +1216,7 @@
88 Votes.append(self.heading('Vote results'))
89 for m in M.votes:
90 #differentiate denied votes somehow, strikethrough perhaps?
91- Votes.append("\n * "+m)
92+ Votes.append(" * "+m)
93 motion = "Deadlock"
94 if(M.votes[m][0] > M.votes[m][1]):
95 motion = "Motion carried"
96@@ -1264,12 +1264,12 @@
97 m.assigned = True
98 # unassigned items:
99 Unassigned = [ ]
100- Unassigned.append("* **UNASSIGNED**")
101+ Unassigned.append(" * **UNASSIGNED**")
102 numberUnassigned = 0
103 for m in M.minutes:
104 if m.itemtype != "ACTION": continue
105 if getattr(m, 'assigned', False): continue
106- Unassigned.append(" ** %s"%moin(m.line))
107+ Unassigned.append(" * %s"%moin(m.line))
108 numberUnassigned += 1
109 if numberUnassigned == 0:
110 Unassigned.append(" * (none)")

Subscribers

People subscribed via source and target branches