From 4d8f60e868daa7343b0c13a22cbdbabe3b55211d Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Fri, 10 Sep 2010 21:50:38 +0000 Subject: Remove logging to let MyLogger handle all logs --- diff --git a/css-minutes-default.css b/css-minutes-default.css index c383b14..5b74f10 100644 --- a/css-minutes-default.css +++ b/css-minutes-default.css @@ -1,7 +1,5 @@ /* This is for the .html in the HTML2 writer */ body { - font-family: Helvetica, sans-serif; - font-size:14px; } h1 { text-align: center; @@ -21,7 +19,6 @@ hr { } /* The (nick, time) item pairs, and other body text things. */ .details { - font-size: 12px; font-weight:bold; } /* The 'AGREED:', 'IDEA', etc, prefix to lines. */ diff --git a/meeting.py b/meeting.py index 9a11c9f..4285dd8 100644 --- a/meeting.py +++ b/meeting.py @@ -55,7 +55,6 @@ class Config(object): # channel. This will be sent through strftime for substituting it # times, howover, for strftime codes you must use doubled percent # signs (%%). This will be joined with the directories above. - filenamePattern = '%(channel)s/%%Y/%(channel)s.%%F-%%H.%%M' # Where to say to go for more information about MeetBot MeetBotInfoURL = 'http://wiki.debian.org/MeetBot' # This is used with the #restrict command to remove permissions from files. @@ -68,30 +67,12 @@ class Config(object): command_RE = re.compile(r'#([\w]+)[ \t]*(.*)') # The channels which won't have date/time appended to the filename. specialChannels = ("#meetbot-test", "#meetbot-test2") - specialChannelFilenamePattern = '%(channel)s/%(channel)s' # HTML irc log highlighting style. `pygmentize -L styles` to list. pygmentizeStyle = 'friendly' # Timezone setting. You can use friendly names like 'US/Eastern', etc. # Check /usr/share/zoneinfo/ . Or `man timezone`: this is the contents # of the TZ environment variable. timeZone = 'UTC' - # These are the start and end meeting messages, respectively. - # Some replacements are done before they are used, using the - # %(name)s syntax. Note that since one replacement is done below, - # you have to use doubled percent signs. Also, it gets split by - # '\n' and each part between newlines get said in a separate IRC - # message. - startMeetingMessage = ("Meeting started %(starttime)s %(timeZone)s. " - "The chair is %(chair)s. Information about MeetBot at " - "%(MeetBotInfoURL)s.\n" - "Useful Commands: #action #agreed #help #info #idea #link " - "#topic.") - endMeetingMessage = ("Meeting ended %(endtime)s %(timeZone)s. " - "Information about MeetBot at %(MeetBotInfoURL)s . " - "(v %(__version__)s)\n" - "Minutes: %(urlBasename)s.html\n" - "Minutes (text): %(urlBasename)s.txt\n" - "Log: %(urlBasename)s.log.html") # Input/output codecs. input_codec = 'utf-8' output_codec = 'utf-8' @@ -100,22 +81,13 @@ class Config(object): return text.encode(self.output_codec, 'replace') def dec(self, text): return text.decode(self.input_codec, 'replace') - # Write out select logfiles - update_realtime = True # CSS configs: - cssFile_log = 'default' - cssEmbed_log = True cssFile_minutes = 'default' cssEmbed_minutes = True # This tells which writers write out which to extensions. writer_map = { - '.log.html':writers.HTMLlog, - #'.1.html': writers.HTML, '.html': writers.HTML2, - #'.rst': writers.ReST, - '.txt': writers.Text, - #'.rst.html':writers.HTMLfromReST, } @@ -129,8 +101,6 @@ class Config(object): if hasattr(self, "init_hook"): self.init_hook() - if writeRawLog: - self.writers['.log.txt'] = writers.TextLog(self.M) for extension, writer in self.writer_map.iteritems(): self.writers[extension] = writer(self.M) self.safeMode = safeMode @@ -143,10 +113,7 @@ class Config(object): # names useful for pathname formatting. # Certain test channels always get the same name - don't need # file prolifiration for them - if self.M.channel in self.specialChannels: - pattern = self.specialChannelFilenamePattern - else: - pattern = self.filenamePattern + pattern = '%(channel)s/%%Y-%%m-%%dT%%H:%%M:%%S' channel = self.M.channel.strip('# ').lower().replace('/', '') network = self.M.network.strip(' ').lower().replace('/', '') if self.M._meetingname: @@ -269,7 +236,12 @@ class MeetingCommands(object): """Begin a meeting.""" self.starttime = time_ repl = self.replacements() - message = self.config.startMeetingMessage%repl + startMeetingMessage = ("Meeting started %(starttime)s %(timeZone)s. " + "The chair is %(chair)s. Information about MeetBot at " + "%(MeetBotInfoURL)s.\n" + "Useful Commands: #action #agreed #help #info #idea #link " + "#topic #endmeeting") + message = startMeetingMessage%repl for messageline in message.split('\n'): self.reply(messageline) if line.strip(): @@ -282,7 +254,12 @@ class MeetingCommands(object): self.endtime = time_ self.config.save() repl = self.replacements() - message = self.config.endMeetingMessage%repl + endMeetingMessage = ("Meeting ended %(endtime)s %(timeZone)s. " + "Information about MeetBot at %(MeetBotInfoURL)s. " + "(v %(__version__)s)\n" + "Minutes: %(urlBasename)s.html\n" + "Log: %(urlBasename)s") + message = endMeetingMessage%repl for messageline in message.split('\n'): self.reply(messageline) self._meetingIsOver = True diff --git a/tests/run_test.py b/tests/run_test.py index 07aecdf..5fdbc7e 100644 --- a/tests/run_test.py +++ b/tests/run_test.py @@ -170,81 +170,57 @@ class MeetBotTest(unittest.TestCase): results = self.M_trivial(extraConfig={}).save() self.assert_('