def yaptuAction(target, source, env): source = env.arg2nodes(source) target = env.arg2nodes(target) file(target[0].get_path(), "w").write( yaptu.process( file(source[0].get_path(), "r").read(), globals(), env.Dictionary()))
def IndexPage(env, name, title, text=""): SUBPAGES = [] for dox in sorted(env.Glob("*/Mainpage.dox",strings=True)): subtitle = ([None] + [ line.split('\\mainpage',1)[-1].strip() for line in file(dox) if '\\mainpage' in line ])[-1] if subtitle: SUBPAGES.append( (dox.split('/',1)[0], subtitle) ) file(name,"w").write(yaptu.process( INDEXPAGE, globals(), { 'TITLE': title, 'TEXT': text, 'SUBPAGES': SUBPAGES })) env.Clean('all',name) env.Clean('all_docs',name)
def IndexPage(env, name, title, text=""): SUBPAGES = [] for dox in sorted(glob.glob("*/Mainpage.dox")): subtitle = ([None] + [ line.split('\\mainpage', 1)[-1].strip() for line in file(dox) if '\\mainpage' in line ])[-1] if subtitle: SUBPAGES.append((dox.split('/', 1)[0], subtitle)) file(name, "w").write( yaptu.process(INDEXPAGE, globals(), { 'TITLE': title, 'TEXT': text, 'SUBPAGES': SUBPAGES })) env.Clean('all', name) env.Clean('all_docs', name)
def yaptuAction(target, source, env): source = env.arg2nodes(source) target = env.arg2nodes(target) file(target[0].get_path(),"w").write( yaptu.process(file(source[0].get_path(),"r").read(), globals(), env.Dictionary()))