Revisiting the RPU (Ralsina Programmatic Universe)
A while back I noticed I had started many projects using the Crystal language, because it really made me want to code more.
Of course those projects are not standalone, many are libraries or tools used by other projects, and some are forks of other people's tools I made minor changes to ("forks") and some are websites, and so on.
Well I semi-automated the generation of a chart showing how things connect. First, this is the chart:
And here is a hacky python script I used to generate it via mermaid (assumes you have all your repos cloned and will be useful for NOBODY)
from glob import glob
print("graph LR")
sites = [
"faaso.ralsina.me",
"nicolino.ralsina.me",
"nombres.ralsina.me",
"ralsina.me",
"tapas.ralsina.me",
]
for site in sites:
print(f" {site}>{site}]")
nicolino_sites = [
"faaso.ralsina.me",
"nicolino.ralsina.me",
]
faaso_sites = [
"nombres.ralsina.me",
"tapas.ralsina.me",
]
caddy_sites = [
"faaso.ralsina.me",
"nicolino.ralsina.me",
"ralsina.me",
]
planned = [
("nicolino", "markd"),
("nicolino", "cr-wren"),
("crycco", "libctags.cr"),
("crycco", "crystal-ctags"),
]
hace_repos = [
"nicolino",
"tartrazine",
"crycco",
"markterm",
"sixteen",
]
for repo in glob("*/"):
repo = repo.strip("/")
if repo == "forks":
continue
print(f" {repo}(({repo}))")
for repo in glob("forks/*/"):
repo = repo.split("/")[-2]
print(f" {repo}([{repo}])")
for s in nicolino_sites:
print(f" {s} ---> nicolino")
for s in faaso_sites:
print(f" {s} ---> faaso")
for s in caddy_sites:
print(f" {s} ---> caddy-static")
def ralsina_deps(shard):
pass
for shard in glob("**/shard.yml"):
repo = shard.split("/")[-2]
for line in open(shard).readlines():
if "ralsina/" in line or "markd" in line:
dest = line.split(":")[-1].split("/")[-1]
if not dest.strip():
continue
print(f" {repo} ---> {dest}")
for a, b in planned:
print(f"{a} -.-> {b}")
for repo in hace_repos:
print(f"{repo} ---> hace")