Compare commits

..
2 Commits
Author SHA1 Message Date
Esa Kataja c3224a7ed7 Fix psm output encoding to utf-8-bom 2025-03-17 12:16:41 +02:00
Esa Kataja b7f54b8873 Fix More typos in XML parser 2025-03-17 12:13:37 +02:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -175,6 +175,6 @@ def write_psm(name, items: list[str], filename: Path = Path("CodeServerConnector
output += get_code.replace("!NAME!", name)
output += convert_from.replace("!NAME!", name).replace("!MAPS!", define_maps(items))
output += class_definition.replace("!NAME!", name).replace("!VARIABLES!", define_variables(items)).replace("!STRINGS!", define_strings(items))
with open(filename, "a") as f:
with open(filename, "a", encoding="utf-8-sig") as f:
f.write(output)
pass
+1 -1
View File
@@ -59,7 +59,7 @@ def add_connection(root: ET.Element, name: str, attr_list: list[str], descriptio
ET.SubElement(return_binding, "Bind", CommandResultOf=f"Get-AllCodeServerPages{name}", Path="conceptCodeId")
ET.SubElement(return_binding, "Bind", CommandResultOf=f"Get-CodeServerObject{name}", Path="conceptCodeId")
mapping = ET.SubElement(property, "CommandMappings")
ET.SubElement(mapping, "Map", ToCommand=f"Get-AllCodeServerPages{name}", Parameter="conceptCodeId")
ET.SubElement(mapping, "Map", ToCommand=f"Get-CodeServerObject{name}", Parameter="conceptCodeId")
for attr in attr_list:
property = ET.SubElement(properties, "Property", Name=sanitize_name(attr), DataType="String", IsMultivalue="false", IsAutoFill="false")