Skip to content

Commit

Permalink
(station) Make station ID visible in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ahyangyi committed Sep 2, 2024
1 parent e3e1250 commit 6d7a139
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion station/lib/docgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,15 @@ def gen_docs(string_manager, metastations):
if "station_id" in dir(layout):
idstr = f"{layout.station_id:04X}"
img.save(os.path.join(prefix, "img", f"{metastation_label}/tiles/{idstr}.png"))
print(f'![{idstr}](img/{metastation_label}/tiles/{idstr}.png){{: width="64"}}', file=f)
print(
f"""
<figure style="display:inline-block">
<img src="img/{metastation_label}/tiles/{idstr}.png" alt="{idstr}" width="64"/>
<figcaption style="text-align:center">{idstr}</figcaption>
</figure>
""",
file=f,
)

with open(os.path.join(prefix, f"{metastation_label}_layouts.md"), "w") as f:
print(
Expand Down

0 comments on commit 6d7a139

Please sign in to comment.