feat(datasheet): add typst datasheet flow

This is a squash of 5 commits in order to add the new datasheet flow.

fix(datasheet): ensure datasheet can use images properly

fix(datasheet): white page when funding was not specified

This was caused by creating a page before first checking whether there was any content for that page beforehand, so it would result in a rogue white page with no content.

fix(datasheet): missing analog pin tables

fix(datasheet): tweak pandoc settings

Switching from `gfm` to `markdown` should enable more formatting options. The extensions have been configured to be similar to `gfm` but provide some additional things, like `line_blocks` and `lists_without_preceding_blankline`s.
This commit is contained in:
Kristaps Jurkans
2025-12-05 13:16:59 +00:00
parent 24de353b9d
commit 6994c804d7
37 changed files with 2792 additions and 141 deletions
+16 -5
View File
@@ -265,14 +265,23 @@ if __name__ == "__main__":
"--dump-json", help="dump json of all project data to given file"
)
parser.add_argument(
"--dump-markdown", help="dump markdown of all project data to given file"
"--metrics", help="print some project metrics", action="store_const", const=True
)
parser.add_argument("--dump-pdf", help="create pdf from the markdown")
parser.add_argument(
"--build-datasheet",
help="build datasheet using the typst template",
action="store_const",
const=True,
)
parser.add_argument("--doc-tapeout-index", help="path to json tapeout index")
parser.add_argument(
"--build-hugo-content", help="directory to where to build hugo content"
)
parser.add_argument(
"--metrics", help="print some project metrics", action="store_const", const=True
"--template-version",
help="set typst template version (default 1.0.0)",
default="1.0.0",
nargs="?",
)
args = parser.parse_args()
@@ -327,9 +336,11 @@ if __name__ == "__main__":
if args.update_image:
docs.update_image()
if args.dump_markdown:
if args.build_datasheet:
shuttle.configure_mux()
docs.write_datasheet(args.dump_markdown, args.dump_pdf)
if args.build_datasheet:
docs.build_datasheet(args.template_version, args.doc_tapeout_index)
if args.build_hugo_content:
shuttle.configure_mux()