コード例 #1
0
            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)
コード例 #2
0
def make_release():
  addons_xml_generator.Generator()
  zip_generator.main()
コード例 #3
0
def make_release():
addons_xml_generator.Generator()
zip_generator.main()
if __name__ == '__main__':
make_release()