terom@29: terom@29: """ terom@29: URL mapping for the irclogs.qmsk.net site terom@29: """ terom@29: terom@39: # urltree stuff terom@50: from qmsk.web import urltree terom@36: terom@29: # our own handlers terom@29: import handlers terom@29: terom@41: # for types terom@51: import utils terom@51: terom@51: # for configuration terom@53: import channels terom@41: terom@41: # our URLConfig terom@50: urls = url = urltree.URLConfig( terom@51: type_dict = dict( terom@51: # LogChannel terom@51: cid = utils.URLChannelName(channels.channel_list.dict()), terom@51: terom@51: # datetime terom@51: date = utils.URLDateType('%Y-%m-%d'), terom@51: ) terom@41: ) terom@41: terom@36: # urls terom@54: index = url('/', handlers.index ) terom@59: preferences = url('/preferences', handlers.preferences_ ) terom@54: channel_select = url('/channel_select/?channel:cid', handlers.channel_select ) terom@54: channel_view = url('/channels/{channel:cid}/?count:int=10', handlers.channel_view ) terom@54: channel_last = url('/channels/{channel:cid}/last/{count:int=100}/{format=html}', handlers.channel_last ) terom@54: channel_calendar = url('/channels/{channel:cid}/calendar/{year:int=0}/{month:int=0}', handlers.channel_calendar ) terom@54: channel_date = url('/channels/{channel:cid}/date/{date:date}', handlers.channel_date ) terom@63: channel_search = url('/channels/{channel:cid}/search/?q=', handlers.channel_search ) terom@36: terom@36: # mapper terom@50: mapper = urltree.URLTree(urls) terom@36: