print('%s -> %s' % ( old_name, new_name, )) os.rename(old_name, new_name) transfer_it(os.path.join(cwd, name), os.path.join(tmp_path, name)) print("Trying to remove temp directory %s" % tmp_path) if os.path.exists(tmp_path): try: shutil.rmtree(tmp_path) except Exception, er: print(str(er)) gen.Generator() print("Generating HTML page") parser = etree.HTMLParser() tree = etree.parse(os.path.join('../', 'index.html'), parser) for s in tree.getroot().iter('p'): if s.text: if s.text.split(':')[0] == 'Last update': s.text = 'Last update: %s' % time.strftime( "%H:%M:%S - %d.%m.%Y") print(s.text) tree.write(os.path.join('../', 'index.html'), method="html", pretty_print=True)
def make_release(): addons_xml_generator.Generator() zip_generator.main()
def make_release(): addons_xml_generator.Generator() zip_generator.main() if __name__ == '__main__': make_release()