This commit is contained in:
Marc Beninca 2024-12-16 02:31:22 +01:00
parent a96f2bc35f
commit 79a822ed0c
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
3 changed files with 191 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/out

41
build.py Executable file
View file

@ -0,0 +1,41 @@
#! /usr/bin/env python3
"""Build graph."""
from pathlib import Path
from rwx.fs import make_directory, read_file_text, write
from rwx.ps import run
if __name__ == "__main__":
root = Path(__file__).parent
out = root / "out" / "web"
gv = root / "index.gv"
svg = out / "index.svg"
make_directory(out)
run("dot", str(gv), "-Tsvg", "-o", str(svg))
text = read_file_text(svg)
write(
out / "index.css",
"""\
html {
background-color: #202020;
}
""",
)
write(
out / "index.html",
f"""\
<!DOCTYPE html>
<html><head>
<meta charset="UTF-8">
<link rel="stylesheet" href="index.css">
<title>work.marc.beninca.link</title>
</head><body>
{text}
</body></html>
""",
)

149
index.gv Normal file
View file

@ -0,0 +1,149 @@
# ╭───────╮
# │ Graph │
# ╰───────╯
digraph "index" {
bgcolor="transparent"
color="#C0C000"
fontcolor="#FF8000"
fontname="DejaVu Sans"
penwidth="2"
rankdir="RL"
# ╭───────┬──────╮
# │ Graph │ Edge │
# ╰───────┴──────╯
edge [
fontcolor="#FF4040"
fontname="DejaVu Sans"
style="filled"
]
# ╭───────┬──────╮
# │ Graph │ Edge │
# ╰───────┴──────╯
node [
color="#C0C0C0"
fontcolor="#FFFFFF"
fontname="DejaVu Sans"
penwidth="2"
shape="record"
style="filled"
]
{ rank="max"
"" [style="invis"]
}
edge [color="#008000"]
node [fillcolor="#408040"]
edge [color="#FF0000"]
node [fillcolor="#303030"]
# ╭────────╮
# │ Online │
# ╰────────╯
subgraph cluster_online {
label="Online"
# ╭────────┬─────────╮
# │ Online │ Beninca │
# ╰────────┴─────────╯
subgraph cluster_online_beninca {
label="beninca.link"
URL="https://beninca.link"
online_beninca_marc [
fontcolor="#8080FF"
label="Marc"
URL="https://marc.beninca.link"
]
}
# ╭────────┬─────╮
# │ Online │ RWX │
# ╰────────┴─────╯
subgraph cluster_online_rwx {
label="rwx.work"
URL="https://rwx.work"
online_rwx_forge [
fontcolor="#8080FF"
label="Forge"
URL="https://forge.rwx.work"
]
online_rwx_software [
fontcolor="#8080FF"
label="Software"
URL="https://software.rwx.work"
]
}
}
# ╭────────╮
# │ Mobile │
# ╰────────╯
subgraph cluster_mobile {
label="Mobile"
# ╭────────┬──────╮
# │ Mobile │ Sony │
# ╰────────┴──────╯
subgraph cluster_mobile_sony {
label="Sony"
mobile_sony_records [
label="Records"
]
}
# ╭────────┬─────╮
# │ Mobile │ SSD │
# ╰────────┴─────╯
subgraph cluster_mobile_ssd {
label="SSD"
mobile_ssd_dev [
label="{
<grub> GRUB | { <bios> BIOS | <esp> ESP }
}|
<data> Data
| { <boot> Boot | { <latest> Latest | <stable> Stable | <images> Images } }
| <memories> Memories
| { <projects> Projects | { <lsgm> LSGM | <ofsp> OFSP } }
| <other> …
"
]
}
}
mobile_ssd_dev:lsgm:e -> mobile_ssd_dev:grub:w
mobile_sony_records -> mobile_ssd_dev:memories
html [shape="plaintext" label=<<table cellspacing="0">
<tr><td rowspan="2" port="grub">GRUB</td><td port="bios">BIOS</td></tr>
<tr><td port="esp">ESP</td></tr>
<tr><td rowspan="2" port="data">Data</td><td port="memories">Memories</td></tr>
<tr><td port="other">…</td></tr>
</table>>]
html:data -> html:grub
}