mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
feat(datasheet): use mustache for shuttle_index
This commit is contained in:
@@ -1,6 +0,0 @@
|
|||||||
# {name}
|
|
||||||
|
|
||||||
This repository contains the GDS file for the [{name}](https://tinytapeout.com) project. It was generated from {git_repo}@{git_commit}.
|
|
||||||
|
|
||||||
## Project Index
|
|
||||||
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# {{name}}
|
||||||
|
|
||||||
|
This repository contains the GDS file for the [{{name}}](https://tinytapeout.com) project. It was generated from {{git_repo}}@{{git_commit}}.
|
||||||
|
|
||||||
|
## Project Index
|
||||||
|
|
||||||
+8
-5
@@ -24,13 +24,16 @@ class Docs:
|
|||||||
def build_index(self, filename: str = "shuttle_index.md"):
|
def build_index(self, filename: str = "shuttle_index.md"):
|
||||||
logging.info(f"building {filename}")
|
logging.info(f"building {filename}")
|
||||||
repo = git.Repo(".")
|
repo = git.Repo(".")
|
||||||
readme = self.load_doc_template("shuttle_index_header.md")
|
readme = self.load_doc_template("shuttle_index_header.md.mustache")
|
||||||
with open(filename, "w") as fh:
|
with open(filename, "w") as fh:
|
||||||
fh.write(
|
fh.write(
|
||||||
readme.format(
|
chevron.render(
|
||||||
name=self.config["name"],
|
readme,
|
||||||
git_repo=get_first_remote(repo),
|
{
|
||||||
git_commit=repo.head.commit.hexsha,
|
"name": self.config["name"],
|
||||||
|
"git_repo": get_first_remote(repo),
|
||||||
|
"git_commit": repo.head.commit.hexsha,
|
||||||
|
},
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
fh.write("| Address | Author | Title | Type | Git Repo |\n")
|
fh.write("| Address | Author | Title | Type | Git Repo |\n")
|
||||||
|
|||||||
Reference in New Issue
Block a user