diff --git a/build.py b/build.py index 7b19b38..2e802b5 100755 --- a/build.py +++ b/build.py @@ -12,26 +12,28 @@ def run(*args): def main(): + time = datetime.datetime.now() + time_id = time.strftime('%Y%m%d%H%M%S') style = 'css' script = 'js' root = os.path.dirname(os.path.realpath(__file__)) input_directory = os.path.join(root, 'in') out = os.path.join(root, 'out') web = os.path.join(out, 'web') - css = os.path.join(web, style) - js = os.path.join(web, script) + gen = os.path.join(web, time_id) + css = os.path.join(gen, style) + js = os.path.join(gen, script) # run('rsync', '--archive', f'{input_directory}/', f'{web}/') for directory in [css, js]: os.makedirs(directory, exist_ok=True) # link_gv = os.path.join(root, 'link.gv') - link_svg = os.path.join(web, 'link.svg') + link_svg = os.path.join(gen, 'link.svg') run('dot', link_gv, '-Tsvg', '-o', link_svg) with open(link_svg, 'br') as f: link_text = f.read().decode('u8') page_file = os.path.join(web, 'index.html') - timestamp = datetime.datetime.now().strftime('%Y/%m/%d %H:%M:%S') page_text = f'''\ @@ -41,8 +43,8 @@ def main(): - - + + Marc Beninca @@ -183,7 +185,7 @@ def main():