diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2010-09-10 21:50:38 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2010-09-10 21:50:38 (GMT) |
commit | 4d8f60e868daa7343b0c13a22cbdbabe3b55211d (patch) | |
tree | 4a5a6871919cf21d062cc0076a6a441ea9066baa /meeting.py | |
parent | 72cdcb42ebbb910b38758f4656cf1aceb6bca9d5 (diff) |
Remove logging to let MyLogger handle all logs
Diffstat (limited to 'meeting.py')
-rw-r--r-- | meeting.py | 49 |
1 files changed, 13 insertions, 36 deletions
@@ -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 |