Lay the icon modules out flat under src/, where Ziran scans for them

This commit is contained in:
waozi committed 2026-09-28 19:24:26 -03:00
1 parent 197f523c70
commit 9cc6872f75
3323 files changed
+3324 -3325

No files matched your search

+1 -1
View File
@@ -15,7 +15,7 @@ Table :: #import "mingcute_regular_table";
Module names are `mingcute_<style>_<name>`, where style is `filled`, `regular`
or `extra` and name is MingCute's file name (`table`, `save_2`, `delete_2`).
Find a name with `ls svg/regular/*`.
Find a name with `ls svg/regular/*`; the modules are flat under `src/`, which is where Ziran looks.
`svg/` holds the source files. `scripts/generate.py` turns them into `src/` and
`ziran.toml`; run it with the MingCute revision after updating `svg/`. Icons
+3 -4
View File
@@ -97,7 +97,7 @@ def shape_of(path):
def main():
revision = sys.argv[1] if len(sys.argv) > 1 else "unversioned"
modules = ROOT / "src" / "icons"
modules = ROOT / "src"
exports = []
skipped = []
seen = {}
@@ -117,15 +117,14 @@ def main():
skipped.append(f"{style}/{path.relative_to(base).as_posix()}: {reason}")
continue
module = f"mingcute_{style}_{name}"
out = modules / style / f"{name}.zi"
out.parent.mkdir(parents=True, exist_ok=True)
out = modules / f"{module}.zi"
out.write_text(
(f"// MingCute {style} icon \"{name}\" (Apache-2.0, see LICENSE).\n"
if style != "extra" else
f"// Icon \"{name}\", drawn to match MingCute regular (Apache-2.0, see LICENSE).\n") +
f"// Generated by scripts/generate.py from svg/{style}/{path.relative_to(base).as_posix()}.\n"
f"Shape :: \"{shape}\";\n")
exports.append(f'{module} = "src/icons/{style}/{name}.zi"')
exports.append(f'{module} = "src/{module}.zi"')
(ROOT / "SKIPPED.txt").write_text("\n".join(skipped) + "\n")
(ROOT / "ziran.toml").write_text(
'[package]\nname = "mingcute"\nmodule_roots = ["src"]\n\n'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 3323 files, more files were not shown because too many files have changed in this diff. Show more