Find And Replace In Template

python

skeleton = """  $ZERO: $ZERO_set,"""

things = [
  ("checklist",),
  ("comment",),
  ("detail",),
  ("json",),
  ("json_plugin",),
  ("list",),
  ("preformatted",),
  ("standard",),
  ("table",),
  ("text_plugin",),
  ("yaml",),
]


print("ConfigSectionCategories {")

for thing in things:
  out = skeleton.replace("$ZERO", thing[0])
  print(out)

print("}")
            
ConfigSectionCategories {
  checklist: checklist_set,
  comment: comment_set,
  detail: detail_set,
  json: json_set,
  json_plugin: json_plugin_set,
  list: list_set,
  preformatted: preformatted_set,
  standard: standard_set,
  table: table_set,
  text_plugin: text_plugin_set,
  yaml: yaml_set,
}