feat: add hermes-meshtastic platform plugin and Gitea Actions release workflow
release / test-and-release (push) Successful in 1m5s

This commit is contained in:
2026-09-07 19:24:10 -07:00
parent 0914bb8ab2
commit d7162ccfae
10 changed files with 428 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
from hermes_meshtastic.adapter import strip_markdown, chunk_text
def test_strip_markdown():
raw = "# Heading\n**bold text** and *italic* with `inline code`\n- bullet 1\n- bullet 2"
cleaned = strip_markdown(raw)
assert "**" not in cleaned
assert "*" not in cleaned
assert "`" not in cleaned
assert "#" not in cleaned
assert "bold text and italic with inline code" in cleaned
def test_chunk_text_small():
text = "Short LoRa message."
chunks = chunk_text(text, limit=180)
assert len(chunks) == 1
assert chunks[0] == text
def test_chunk_text_long():
text = "Word " * 50 # 250 characters
chunks = chunk_text(text, limit=100)
assert len(chunks) > 1
for c in chunks:
assert len(c) <= 100