5 Commits
Author SHA1 Message Date
klemek 14230bd489 fix: print correct sentences output
Python Lint CI / ruff (push) Successful in 6m7s
Python Lint CI / ty (push) Successful in 6m9s
Python Lint CI / ruff-format-check (push) Failing after 6m14s
2026-11-08 18:53:09 +01:00
klemek 9978de6cdf chore: 1.0.1
Python Lint CI / ruff-format-check (push) Successful in 6m5s
Python Lint CI / ty (push) Successful in 6m1s
Python Lint CI / ruff (push) Successful in 8m31s
2026-11-08 18:26:56 +01:00
klemek b4b2e2a5f1 style: ruff format 2026-11-08 18:26:49 +01:00
klemek 051b1f0060 fix: pmlomb CHAT set 2026-11-08 18:26:24 +01:00
klemek 30955a3f46 fix: on --add-empty, change sets index 2026-11-08 18:26:12 +01:00
5 changed files with 12 additions and 13 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "glsl-glyphs"
version = "1.0.0"
version = "1.0.1"
description = "Generate GLSL ready glyph maps and usable functions "
readme = "README.md"
requires-python = ">=3.14"
+1 -1
View File
@@ -3,7 +3,7 @@ index,length,name
38,3,HEARTS
36,36,OBJECTS
96,20,SELECT
120,12,CHAT
122,10,CHAT
132,12,EMOTION
144,42,TILES
186,6,SQUARES
1 index length name
3 38 3 HEARTS
4 36 36 OBJECTS
5 96 20 SELECT
6 120 122 12 10 CHAT
7 132 12 EMOTION
8 144 42 TILES
9 186 6 SQUARES
+2 -2
View File
@@ -102,9 +102,9 @@ class Generator:
try:
self.target_sentences_path.parent.mkdir(parents=True, exist_ok=True)
self.target_sentences_path.write_text(content)
self.log.info("Wrote sentences output to %s", self.target_path)
self.log.info("Wrote sentences output to %s", self.target_sentences_path)
except OSError as e:
self.log.error(
"Could not write sentences output file at: %s (%s)", self.target_path, e
"Could not write sentences output file at: %s (%s)", self.target_sentences_path, e
)
sys.exit(1)
+7 -8
View File
@@ -39,10 +39,14 @@ class Reader:
def read(self) -> tuple[list[Glyph], list[GlyphSet], list[Sentence]]:
glyphs = self.__read_image()
names = self.__read_names()
sets = self.__read_sets()
for glyph, name in zip(glyphs, names, strict=False):
glyph.name = name
if self.add_all:
sets.insert(0, GlyphSet(index=0, length=len(glyphs), name="ALL"))
if self.add_empty and "EMPTY" not in names:
if len(glyphs) >= MAX_GLYPHS:
self.log.error(
@@ -51,11 +55,8 @@ class Reader:
sys.exit(1)
glyphs.insert(0, Glyph(data=[0] * 4, name="EMPTY"))
names.insert(0, "EMPTY")
sets = self.__read_sets()
if self.add_all:
sets.insert(0, GlyphSet(index=0, length=len(glyphs), name="ALL"))
for glyphset in sets:
glyphset.index += 1
sentences = self.__read_sentences(names)
@@ -67,9 +68,7 @@ class Reader:
def __read_image(self) -> list[Glyph]:
if not self.source_image_path:
self.log.error(
"No input image provided"
)
self.log.error("No input image provided")
sys.exit(1)
try:
img = Image.open(self.source_image_path).convert("1")
Generated
+1 -1
View File
@@ -4,7 +4,7 @@ requires-python = ">=3.14"
[[package]]
name = "glsl-glyphs"
version = "1.0.0"
version = "1.0.1"
source = { editable = "." }
dependencies = [
{ name = "pillow" },