#!/usr/bin/env python3 import os, time from os import path from string import Template import html_tilegrid import shutil GM_DOCS_INDEX = """ Project Peppercorn HTML Documentation

Project Peppercorn HTML Documentation

Project Peppercorn is a project to document the GateMate bitstream and internal architecture.

This repository contains HTML documentation automatically generated from the Project Peppercorn database. Data generated includes tilemap data and bitstream data for many tile types. Click on any tile to see its bitstream documentation.


$docs_toc

Licensed under a very permissive CC0 1.0 Universal license.

""" def main(): shutil.rmtree("work_html", ignore_errors=True) os.mkdir("work_html") commit_hash = "" #database.get_db_commit() build_dt = time.strftime('%Y-%m-%d %H:%M:%S') docs_toc = "" family = "CCGM1" print("Family: " + family) docs_toc += f"

{family.upper()} Family

" docs_toc += "

Bitstream Documentation

" docs_toc += "" index_html = Template(GM_DOCS_INDEX).substitute( datetime=build_dt, commit=commit_hash, docs_toc=docs_toc ) with open(path.join("work_html", "index.html"), 'w') as f: f.write(index_html) if __name__ == "__main__": main()