equal
deleted
inserted
replaced
6 from log_parser import IrssiParser |
6 from log_parser import IrssiParser |
7 from log_channel import LogChannel |
7 from log_channel import LogChannel |
8 from log_source import LogSourceDecoder, LogDirectory |
8 from log_source import LogSourceDecoder, LogDirectory |
9 from log_formatter import IrssiFormatter, DebugFormatter |
9 from log_formatter import IrssiFormatter, DebugFormatter |
10 from channels import ChannelList |
10 from channels import ChannelList |
11 import version |
|
12 import log_formatter |
11 import log_formatter |
13 |
12 |
14 # build relative paths to the dir containing this file |
13 # build relative paths to the dir containing this file |
15 relpath = lambda path : os.path.join(os.path.dirname(__file__), path) |
14 relpath = lambda path : os.path.join(os.path.dirname(__file__), path) |
16 |
15 |
50 LogChannel('test', "TEST", "#test", |
49 LogChannel('test', "TEST", "#test", |
51 LogDirectory(relpath('/home/spbot/irclogs/test'), LOG_TIMEZONE, LOG_PARSER, LOG_DECODER, LOG_FILENAME_FMT) |
50 LogDirectory(relpath('/home/spbot/irclogs/test'), LOG_TIMEZONE, LOG_PARSER, LOG_DECODER, LOG_FILENAME_FMT) |
52 ) |
51 ) |
53 ]) |
52 ]) |
54 |
53 |
55 # version stuff |
54 # URL to the hgweb installation for this code |
56 HGWEB_URL = "http://hg.qmsk.net/irclogs2" |
55 HGWEB_URL = "http://hg.qmsk.net/irclogs2" |
57 VERSION_LINK = version.version_link_hg(HGWEB_URL, relpath(".")) |
|
58 |
56 |
59 # Footer text to display |
57 # path to the mercurial working copy containing this code |
60 HTML_FOOTER_TEXT = '<a href="http://projects.qmsk.net/irclogs2">irclogs2</a> version %s' % (VERSION_LINK) |
58 HG_WC_PATH = relpath(".") |
61 |
59 |
62 # how to handle decode() errors for logfile lines |
60 # how to handle decode() errors for logfile lines |
63 LOG_SOURCE_DECODE_ERRORS = 'replace' |
61 LOG_SOURCE_DECODE_ERRORS = 'replace' |
64 |
62 |
65 # date format for URLs |
63 # date format for URLs |
83 LOG_FORMATTERS = { |
81 LOG_FORMATTERS = { |
84 'irssi': IrssiFormatter, |
82 'irssi': IrssiFormatter, |
85 'debug': DebugFormatter, |
83 'debug': DebugFormatter, |
86 } |
84 } |
87 |
85 |
|
86 # Cookie settings |
|
87 PREF_COOKIE_PATH = '/' |
|
88 PREF_COOKIE_EXPIRE_SECONDS = 1 * 365 * 24 * 60 * 60 # one year |
|
89 |
88 # default preferences |
90 # default preferences |
89 PREF_TIME_FMT_DEFAULT = '%H:%M:%S' |
91 PREF_TIME_FMT_DEFAULT = '%H:%M:%S' |
90 PREF_DATE_FMT_DEFAULT = '%Y-%m-%d' |
92 PREF_DATE_FMT_DEFAULT = '%Y-%m-%d' |
91 PREF_TIMEZONE_DEFAULT = pytz.utc |
93 PREF_TIMEZONE_FALLBACK = pytz.utc |
92 PREF_FORMATTER_DEFAULT = IrssiFormatter |
94 PREF_FORMATTER_DEFAULT = IrssiFormatter |
93 PREF_COUNT_DEFAULT = 200 |
95 PREF_COUNT_DEFAULT = 200 |
94 PREF_COUNT_MAX = None |
96 PREF_COUNT_MAX = None |
95 PREF_IMAGE_FONT_DEFAULT = 'ttf-dejavu-mono' |
97 PREF_IMAGE_FONT_DEFAULT = 'ttf-dejavu-mono' |
96 PREF_IMAGE_FONT_SIZE_DEFAULT = 12 |
98 PREF_IMAGE_FONT_SIZE_DEFAULT = 12 |