<s> """<STR_LIT>""" <EOL> __author__ = "<STR_LIT>" <EOL> __email__ = "<STR_LIT>" <EOL> __version__ = "<STR_LIT>" <EOL> __url__ = "<STR_LIT>" <EOL> __description__ = "<STR_LIT>" <EOL> __category__ = "<STR_LIT:date>" <EOL> __license__ = "<STR_LIT>" <EOL> __registrytags__ = "<STR_LIT>" <EOL> import os <EOL> import re <EOL> import time <EOL> from Pyblosxom import tools <EOL> from Pyblosxom . memcache import memcache_decorator <EOL> DAYMATCH = re . compile ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> @ memcache_decorator ( '<STR_LIT>' ) <EOL> def get_mtime ( filename ) : <EOL> mtime = <NUM_LIT:0> <EOL> mtch = DAYMATCH . search ( os . path . basename ( filename ) ) <EOL> if mtch : <EOL> try : <EOL> year = int ( mtch . group ( <NUM_LIT:1> ) ) <EOL> mo = int ( mtch . group ( <NUM_LIT:2> ) ) <EOL> day = int ( mtch . group ( <NUM_LIT:3> ) ) <EOL> if mtch . group ( <NUM_LIT:4> ) is None : <EOL> hr = <NUM_LIT:0> <EOL> minute = <NUM_LIT:0> <EOL> else : <EOL> hr = int ( mtch . group ( <NUM_LIT:5> ) ) <EOL> minute = int ( mtch . group ( <NUM_LIT:6> ) ) <EOL> mtime = time . mktime ( ( year , mo , day , hr , minute , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , - <NUM_LIT:1> ) ) <EOL> except StandardError : <EOL> pass <EOL> return mtime <EOL> return None <EOL> def cb_filestat ( args ) : <EOL> filename = args [ "<STR_LIT:filename>" ] <EOL> stattuple = args [ "<STR_LIT>" ] <EOL> mtime = get_mtime ( filename ) <EOL> if mtime is not None : <EOL> args [ "<STR_LIT>" ] = ( <EOL> tuple ( list ( stattuple [ : <NUM_LIT:8> ] ) + [ mtime ] + list ( stattuple [ <NUM_LIT:9> : ] ) ) ) <EOL> return args </s>
