commit 56cb386bb70ae34709725550e551d76900063217 Author: Mike Lynch Date: Sat Nov 29 14:55:30 2025 +1100 First version: generates 50000 "words" of glyphs diff --git a/config.yml b/config.yml new file mode 100644 index 0000000..0928ed3 --- /dev/null +++ b/config.yml @@ -0,0 +1,11 @@ + +access_token: NJC3OWRJNJGTNZJKYI0ZNZQ5LTHKZGQTODC0NTLJM2I5ZMQ4 +base_url: https://llull.club + +emojos: ./emojos.txt +# make sure all of these are 5 or larger +groups: + - glyph + - texture + - colour + - mono diff --git a/emojos.txt b/emojos.txt new file mode 100644 index 0000000..53d7236 --- /dev/null +++ b/emojos.txt @@ -0,0 +1,56 @@ +:grawlix_null: mono blank +:grawlix_angle: colour yellow +:grawlix_ball1: colour green +:grawlix_ball2: colour blue +:grawlix_brick: colour green +:grawlix_bullseye: colour +:grawlix_bun: colour yellow +:grawlix_claw: colour red +:grawlix_cloud: mono +:grawlix_crosses: mono texture +:grawlix_crumple: mono texture +:grawlix_drop: colour purple +:grawlix_dust1: mono texture +:grawlix_dust2: mono texture +:grawlix_feather: colour green +:grawlix_flower: colour blue +:grawlix_fruit: colour green +:grawlix_fungus: colour yellow +:grawlix_fur: mono texture +:grawlix_gadget: colour red +:grawlix_globule: colour pink +:grawlix_glyph1: mono glyph +:grawlix_glyph10: mono glyph +:grawlix_glyph2: mono glyph +:grawlix_glyph3: mono glyph +:grawlix_glyph4: mono glyph +:grawlix_glyph5: mono glyph +:grawlix_glyph6: mono glyph +:grawlix_glyph7: mono glyph +:grawlix_glyph8: mono glyph +:grawlix_glyph9: mono glyph +:grawlix_growth: mono +:grawlix_hatch: mono texture +:grawlix_helm: colour red +:grawlix_horizon: colour pink +:grawlix_joint: mono texture +:grawlix_knothole: mono texture +:grawlix_link: colour trans +:grawlix_lump: colour yellow +:grawlix_mountain: colour blue +:grawlix_orbit: mono +:grawlix_popup: colour yellow +:grawlix_rects: colour trans +:grawlix_rough: colour texture pink +:grawlix_scales: colour texture red +:grawlix_scrawl: mono texture +:grawlix_scribble: colour texture green +:grawlix_shatter: colour texture +:grawlix_signal: colour +:grawlix_slump: colour texture green +:grawlix_spark1: mono +:grawlix_spark2: mono +:grawlix_sprout: mono +:grawlix_strata: mono texture +:grawlix_vertical: mono texture +:grawlix_wreck: texture colour blue diff --git a/grawlix.py b/grawlix.py new file mode 100644 index 0000000..7187b9c --- /dev/null +++ b/grawlix.py @@ -0,0 +1,60 @@ + +from collections import defaultdict +import random +import yaml + +class GrawlixCodex(): + + def __init__(self, width=100, height=10, wordcount=50000): + self.width = width + self.height = height + self.smallest = 1 + self.longest = 8 + self.wordcount = wordcount + + + def config(self, cffile): + with open(cffile) as cf: + try: + self.cf = yaml.load(cf, Loader=yaml.Loader) + except yaml.YAMLError as exc: + print("%s parse error: %s" % ( self.args.config, exc )) + if hasattr(exc, 'problem_mark'): + mark = exc.problem_mark + print("Error position: (%s:%s)" % (mark.line + 1, mark.column + 1)) + + def load_emojos(self): + self.emojos = [] + self.groups = defaultdict(set) + with open(self.cf["emojos"], "r") as efh: + for line in efh: + parts = line.split() + glyph = parts[0][1:-1] + self.emojos.append(glyph) + for tag in parts[1:]: + self.groups[tag].add(glyph) + self.tags = [ t for t in self.groups.keys() if not t == "blank" ] + self.blank = list(self.groups["blank"])[0] + + def text(self): + for w in range(self.wordcount): + l = random.randint(self.smallest, self.longest) + for g in range(l): + yield random.choice(list(self.groups["glyph"])) + yield(self.blank) + + def write(self): + row = [] + for g in self.text(): + row.append(g) + if len(row) == self.width: + glyphs = [ f' ' for g in row ] + print(''.join(glyphs)) + print('
') + row = [] + +gc = GrawlixCodex() +gc.config("./config.yml") +gc.load_emojos() +gc.write() + diff --git a/img/grawlix_angle.png b/img/grawlix_angle.png new file mode 100644 index 0000000..310d68b Binary files /dev/null and b/img/grawlix_angle.png differ diff --git a/img/grawlix_ball1.png b/img/grawlix_ball1.png new file mode 100644 index 0000000..0b41472 Binary files /dev/null and b/img/grawlix_ball1.png differ diff --git a/img/grawlix_ball2.png b/img/grawlix_ball2.png new file mode 100644 index 0000000..58d17d0 Binary files /dev/null and b/img/grawlix_ball2.png differ diff --git a/img/grawlix_brick.png b/img/grawlix_brick.png new file mode 100644 index 0000000..156e422 Binary files /dev/null and b/img/grawlix_brick.png differ diff --git a/img/grawlix_bullseye.png b/img/grawlix_bullseye.png new file mode 100644 index 0000000..20dcc19 Binary files /dev/null and b/img/grawlix_bullseye.png differ diff --git a/img/grawlix_bun.png b/img/grawlix_bun.png new file mode 100644 index 0000000..9fa2667 Binary files /dev/null and b/img/grawlix_bun.png differ diff --git a/img/grawlix_claw.png b/img/grawlix_claw.png new file mode 100644 index 0000000..58f8c37 Binary files /dev/null and b/img/grawlix_claw.png differ diff --git a/img/grawlix_cloud.png b/img/grawlix_cloud.png new file mode 100644 index 0000000..fff78dd Binary files /dev/null and b/img/grawlix_cloud.png differ diff --git a/img/grawlix_crosses.png b/img/grawlix_crosses.png new file mode 100644 index 0000000..0607677 Binary files /dev/null and b/img/grawlix_crosses.png differ diff --git a/img/grawlix_crumple.png b/img/grawlix_crumple.png new file mode 100644 index 0000000..30d331e Binary files /dev/null and b/img/grawlix_crumple.png differ diff --git a/img/grawlix_drop.png b/img/grawlix_drop.png new file mode 100644 index 0000000..24cf1b7 Binary files /dev/null and b/img/grawlix_drop.png differ diff --git a/img/grawlix_dust1.png b/img/grawlix_dust1.png new file mode 100644 index 0000000..83263b9 Binary files /dev/null and b/img/grawlix_dust1.png differ diff --git a/img/grawlix_dust2.png b/img/grawlix_dust2.png new file mode 100644 index 0000000..71dca05 Binary files /dev/null and b/img/grawlix_dust2.png differ diff --git a/img/grawlix_feather.png b/img/grawlix_feather.png new file mode 100644 index 0000000..9c6ecde Binary files /dev/null and b/img/grawlix_feather.png differ diff --git a/img/grawlix_flower.png b/img/grawlix_flower.png new file mode 100644 index 0000000..2a47d81 Binary files /dev/null and b/img/grawlix_flower.png differ diff --git a/img/grawlix_fruit.png b/img/grawlix_fruit.png new file mode 100644 index 0000000..fe24f01 Binary files /dev/null and b/img/grawlix_fruit.png differ diff --git a/img/grawlix_fungus.png b/img/grawlix_fungus.png new file mode 100644 index 0000000..6501127 Binary files /dev/null and b/img/grawlix_fungus.png differ diff --git a/img/grawlix_fur.png b/img/grawlix_fur.png new file mode 100644 index 0000000..bf8a0fc Binary files /dev/null and b/img/grawlix_fur.png differ diff --git a/img/grawlix_gadget.png b/img/grawlix_gadget.png new file mode 100644 index 0000000..96d05e1 Binary files /dev/null and b/img/grawlix_gadget.png differ diff --git a/img/grawlix_globule.png b/img/grawlix_globule.png new file mode 100644 index 0000000..a4a3b90 Binary files /dev/null and b/img/grawlix_globule.png differ diff --git a/img/grawlix_glyph1.png b/img/grawlix_glyph1.png new file mode 100644 index 0000000..ba1815c Binary files /dev/null and b/img/grawlix_glyph1.png differ diff --git a/img/grawlix_glyph10.png b/img/grawlix_glyph10.png new file mode 100644 index 0000000..6f99e78 Binary files /dev/null and b/img/grawlix_glyph10.png differ diff --git a/img/grawlix_glyph2.png b/img/grawlix_glyph2.png new file mode 100644 index 0000000..948578e Binary files /dev/null and b/img/grawlix_glyph2.png differ diff --git a/img/grawlix_glyph3.png b/img/grawlix_glyph3.png new file mode 100644 index 0000000..d8a029b Binary files /dev/null and b/img/grawlix_glyph3.png differ diff --git a/img/grawlix_glyph4.png b/img/grawlix_glyph4.png new file mode 100644 index 0000000..b489786 Binary files /dev/null and b/img/grawlix_glyph4.png differ diff --git a/img/grawlix_glyph5.png b/img/grawlix_glyph5.png new file mode 100644 index 0000000..d139e27 Binary files /dev/null and b/img/grawlix_glyph5.png differ diff --git a/img/grawlix_glyph6.png b/img/grawlix_glyph6.png new file mode 100644 index 0000000..49773d9 Binary files /dev/null and b/img/grawlix_glyph6.png differ diff --git a/img/grawlix_glyph7.png b/img/grawlix_glyph7.png new file mode 100644 index 0000000..cf77ec6 Binary files /dev/null and b/img/grawlix_glyph7.png differ diff --git a/img/grawlix_glyph8.png b/img/grawlix_glyph8.png new file mode 100644 index 0000000..450bb78 Binary files /dev/null and b/img/grawlix_glyph8.png differ diff --git a/img/grawlix_glyph9.png b/img/grawlix_glyph9.png new file mode 100644 index 0000000..c4ab5c2 Binary files /dev/null and b/img/grawlix_glyph9.png differ diff --git a/img/grawlix_growth.png b/img/grawlix_growth.png new file mode 100644 index 0000000..dafc8f9 Binary files /dev/null and b/img/grawlix_growth.png differ diff --git a/img/grawlix_hatch.png b/img/grawlix_hatch.png new file mode 100644 index 0000000..786b91d Binary files /dev/null and b/img/grawlix_hatch.png differ diff --git a/img/grawlix_helm.png b/img/grawlix_helm.png new file mode 100644 index 0000000..25e0949 Binary files /dev/null and b/img/grawlix_helm.png differ diff --git a/img/grawlix_horizon.png b/img/grawlix_horizon.png new file mode 100644 index 0000000..12fc3df Binary files /dev/null and b/img/grawlix_horizon.png differ diff --git a/img/grawlix_joint.png b/img/grawlix_joint.png new file mode 100644 index 0000000..89c383e Binary files /dev/null and b/img/grawlix_joint.png differ diff --git a/img/grawlix_knothole.png b/img/grawlix_knothole.png new file mode 100644 index 0000000..b6a5b55 Binary files /dev/null and b/img/grawlix_knothole.png differ diff --git a/img/grawlix_link.png b/img/grawlix_link.png new file mode 100644 index 0000000..c0554ef Binary files /dev/null and b/img/grawlix_link.png differ diff --git a/img/grawlix_lump.png b/img/grawlix_lump.png new file mode 100644 index 0000000..9688121 Binary files /dev/null and b/img/grawlix_lump.png differ diff --git a/img/grawlix_mountain.png b/img/grawlix_mountain.png new file mode 100644 index 0000000..4577341 Binary files /dev/null and b/img/grawlix_mountain.png differ diff --git a/img/grawlix_null.png b/img/grawlix_null.png new file mode 100644 index 0000000..30a48ca Binary files /dev/null and b/img/grawlix_null.png differ diff --git a/img/grawlix_null.png.kra b/img/grawlix_null.png.kra new file mode 100644 index 0000000..e78fac3 Binary files /dev/null and b/img/grawlix_null.png.kra differ diff --git a/img/grawlix_orbit.png b/img/grawlix_orbit.png new file mode 100644 index 0000000..3c2eaef Binary files /dev/null and b/img/grawlix_orbit.png differ diff --git a/img/grawlix_popup.png b/img/grawlix_popup.png new file mode 100644 index 0000000..79e5c88 Binary files /dev/null and b/img/grawlix_popup.png differ diff --git a/img/grawlix_rects.png b/img/grawlix_rects.png new file mode 100644 index 0000000..d46ab8f Binary files /dev/null and b/img/grawlix_rects.png differ diff --git a/img/grawlix_rough.png b/img/grawlix_rough.png new file mode 100644 index 0000000..d16e7d5 Binary files /dev/null and b/img/grawlix_rough.png differ diff --git a/img/grawlix_scales.png b/img/grawlix_scales.png new file mode 100644 index 0000000..b66e44e Binary files /dev/null and b/img/grawlix_scales.png differ diff --git a/img/grawlix_scrawl.png b/img/grawlix_scrawl.png new file mode 100644 index 0000000..0ccccec Binary files /dev/null and b/img/grawlix_scrawl.png differ diff --git a/img/grawlix_scribble.png b/img/grawlix_scribble.png new file mode 100644 index 0000000..d0d7418 Binary files /dev/null and b/img/grawlix_scribble.png differ diff --git a/img/grawlix_shatter.png b/img/grawlix_shatter.png new file mode 100644 index 0000000..b84c12f Binary files /dev/null and b/img/grawlix_shatter.png differ diff --git a/img/grawlix_signal.png b/img/grawlix_signal.png new file mode 100644 index 0000000..bcd6ac0 Binary files /dev/null and b/img/grawlix_signal.png differ diff --git a/img/grawlix_slump.png b/img/grawlix_slump.png new file mode 100644 index 0000000..305e938 Binary files /dev/null and b/img/grawlix_slump.png differ diff --git a/img/grawlix_spark1.png b/img/grawlix_spark1.png new file mode 100644 index 0000000..f0b32d0 Binary files /dev/null and b/img/grawlix_spark1.png differ diff --git a/img/grawlix_spark2.png b/img/grawlix_spark2.png new file mode 100644 index 0000000..3744827 Binary files /dev/null and b/img/grawlix_spark2.png differ diff --git a/img/grawlix_sprout.png b/img/grawlix_sprout.png new file mode 100644 index 0000000..3ad5cee Binary files /dev/null and b/img/grawlix_sprout.png differ diff --git a/img/grawlix_strata.png b/img/grawlix_strata.png new file mode 100644 index 0000000..5c0c762 Binary files /dev/null and b/img/grawlix_strata.png differ diff --git a/img/grawlix_vertical.png b/img/grawlix_vertical.png new file mode 100644 index 0000000..eb588eb Binary files /dev/null and b/img/grawlix_vertical.png differ diff --git a/img/grawlix_wreck.png b/img/grawlix_wreck.png new file mode 100644 index 0000000..646ea04 Binary files /dev/null and b/img/grawlix_wreck.png differ diff --git a/img/header.html b/img/header.html new file mode 100644 index 0000000..ab5d197 --- /dev/null +++ b/img/header.html @@ -0,0 +1,40 @@ +                                                                                                     +
+                                                                                                     +
+                                                                                                     +
+                                                                                                     +
+                                                                                                     +
+                                                                                                     +
+                                                                                                     +
+                                                                                                     +
+                                                                                                     +
+                                                                                                     +
+                                                                                                     +
+                                                                                                     +
+                                                                                                     +
+                                                                                                     +
+                                                                                                     +
+                                                                                                     +
+                                                                                                     +
+                                                                                                     +
+                                                                                                     +
+                                                                                                     +
diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..43b3316 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,12 @@ +[project] +name = "nanogenmo-grawlix" +version = "0.1.0" +description = "Add your description here" +readme = "README.md" +requires-python = ">=3.9" +dependencies = [ + "grawlix>=0.1.0", +] + +[tool.uv.sources] +grawlix = { git = "https://git.tilde.town/bombinans/grawlix.git" }