INNER CODE UNIT · Python
write_credits
gokayfem/awesome-vlm-architectures · scripts/embed_architecture_figures.py:123
def write_credits(records: list[dict[str, object]]) -> None:
lines = [
"# Architecture figure credits",
"",
"Each image is an excerpt from the linked primary source. Copyright remains with the paper authors or publishers; these excerpts are not covered by the repository's license. See the [figure notice](FIGURE_NOTICE.md).",
"",
"| Entry | Source | Figure | Local file |",
"| --- | --- | ---: | --- |",
]
for record in records:
if record["status"] != "extracted":
continue
title = str(record["title"]).replace("|", "\\|")
source_kind = str(record.get("source_kind", "arxiv"))
source = f"[primary source]({record['source_url']})"
figure = (
"Official architecture diagram"
if source_kind == "official-web"