Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/writers.py
diff options
context:
space:
mode:
authorRichard Darst <rkd@zgib.net>2009-08-16 03:37:54 (GMT)
committer Richard Darst <rkd@zgib.net>2009-08-16 03:37:54 (GMT)
commitedf0af337df03fbdf8f750a3c89ea1ba25edb9e8 (patch)
tree5bb0a5b5933dc43f508728e20a04a5a16b4294fb /writers.py
parent2990b2967fe40c6f7c2ad2391b1c8220c3aa872c (diff)
Improve wrapping and Text writer writing
- Wrapping made less fragile (less likely to be miswrapped due to user input, but still not foolproof). - Full log link in Text version (but gets lost if you replay it). Also make the Text version look a bit like ReST. darcs-hash:20090816033754-82ea9-b2e52baff4cd77a6fd4ae92b47cb2d253c49b836.gz
Diffstat (limited to 'writers.py')
-rw-r--r--writers.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/writers.py b/writers.py
index f7c3a31..242f210 100644
--- a/writers.py
+++ b/writers.py
@@ -60,7 +60,7 @@ def wrapList(item, indent=0):
subsequent_indent= ' '*(indent+2),
break_long_words=False).fill(item)
def replaceWRAP(item):
- re_wrap = re.compile('WRAP(.*)WRAP', re.DOTALL)
+ re_wrap = re.compile(r'sWRAPs(.*)eWRAPe', re.DOTALL)
def repl(m):
return TextWrapper(width=72, break_long_words=False).fill(m.group(1))
return re_wrap.sub(repl, item)
@@ -103,6 +103,7 @@ class _BaseWriter(object):
'endtime':time.strftime("%H:%M:%S", self.M.endtime),
'timeZone':self.M.config.timeZone,
'fullLogs':self.M.config.basename+'.log.html',
+ 'fullLogsFullURL':self.M.config.filename(url=True)+'.log.html',
'MeetBotInfoURL':self.M.config.MeetBotInfoURL,
'MeetBotVersion':MeetBotVersion(),
}
@@ -411,8 +412,8 @@ class ReST(_BaseWriter):
%(titleBlock)s
- WRAPMeeting started by %(owner)s at %(starttime)s %(timeZone)s.
- The `full logs`_ are available.WRAP
+ sWRAPsMeeting started by %(owner)s at %(starttime)s %(timeZone)s.
+ The `full logs`_ are available.eWRAPe
.. _`full logs`: %(fullLogs)s
@@ -527,8 +528,8 @@ class ReST(_BaseWriter):
'PeoplePresent':PeoplePresent,
})
body = self.body
- body = replaceWRAP(body)
body = body%repl
+ body = replaceWRAP(body)
return body
class HTMLfromReST(_BaseWriter):
@@ -553,10 +554,8 @@ class Text(_BaseWriter):
%(titleBlock)s
- WRAPMeeting started by %(owner)s at %(starttime)s %(timeZone)s.
- The `full logs`_ are available.WRAP
-
- .. _`full logs`: %(fullLogs)s
+ sWRAPsMeeting started by %(owner)s at %(starttime)s %(timeZone)s.
+ The full logs are available at %(fullLogsFullURL)s .eWRAPe
@@ -669,7 +668,7 @@ class Text(_BaseWriter):
'PeoplePresent':PeoplePresent,
})
body = self.body
- body = replaceWRAP(body)
body = body%repl
+ body = replaceWRAP(body)
return body