def create_capability_files(template_path, themes_path, map_path, fonts_path, use_debug, shapepath):
template = Template( open( os.path.join(template_path, "SeaChart_THEME.map"), 'r' ).read() )
for theme in os.listdir(themes_path):
# Remove file suffix
theme = os.path.splitext(theme)[0]
debug_string = ""
if use_debug:
debug_string = str.format(debug_template, theme)
d = get_dictionary(theme, map_path, fonts_path, debug_string)
if shapepath:
d['SHAPEPATH'] = shapepath
fileout = open( os.path.join(map_path, "SeaChart_" + theme + ".map"), 'w' )
fileout.write( template.substitute(d) )
评论列表
文章目录