Initial commit

This commit is contained in:
exteraGramPlugins committed 2026-09-23 09:10:22 +00:00
commit e0586a3423
31 files changed
+2335

No files matched your search

+1
View File
@@ -0,0 +1 @@
from .template import render, TemplateError
+13
View File
@@ -0,0 +1,13 @@
from textutil import normalize
class TemplateError(ValueError):
pass
def render(template: str, name: str) -> str:
normalized = normalize(name)
try:
return template.format(name=normalized)
except (KeyError, IndexError, ValueError):
raise TemplateError(f"unsupported placeholder in {template!r}")