Module: kamailio Branch: master Commit: 32c750ed833ec1d1c2d1a2a2cf189ea3b0c5e2ee URL: https://github.com/kamailio/kamailio/commit/32c750ed833ec1d1c2d1a2a2cf189ea3...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2020-11-24T09:49:37+01:00
misc/tools/kemi: lua - replaced markdown term
- no longer suitable for the new tools
---
Modified: misc/tools/kemi/lua/kemiksrlib.py Modified: misc/tools/kemi/lua/kemiluacheck.py
---
Diff: https://github.com/kamailio/kamailio/commit/32c750ed833ec1d1c2d1a2a2cf189ea3... Patch: https://github.com/kamailio/kamailio/commit/32c750ed833ec1d1c2d1a2a2cf189ea3...
---
diff --git a/misc/tools/kemi/lua/kemiksrlib.py b/misc/tools/kemi/lua/kemiksrlib.py index dfa528cb79..f801a9d6a2 100644 --- a/misc/tools/kemi/lua/kemiksrlib.py +++ b/misc/tools/kemi/lua/kemiksrlib.py @@ -8,7 +8,7 @@ class ModuleObjGenerator(object):
# Contains the output until it should be written to disk - markdown_string = "" + output_string = ""
def execute(self, data): # Validate that we got some methods back. 155 is an arbitrary large number. @@ -57,7 +57,7 @@ def object_module_content(self, module, methods): module_prefix = module + "."
for value in methods: - self.markdown_string += "local function KSR." + module_prefix + value["name"] + self.object_string += "local function KSR." + module_prefix + value["name"]
# Sanitize the return values if value["return"] == "none": @@ -79,10 +79,10 @@ def object_module_content(self, module, methods): else: params_value = value["params"]
- # Generate the output string for the markdown page - self.markdown_string += "(" + params_value + ")\n" - self.markdown_string += "\treturn" + return_value + ";\n" - self.markdown_string += "end\n\n" + # Generate the output string for the file + self.object_string += "(" + params_value + ")\n" + self.object_string += "\treturn" + return_value + ";\n" + self.object_string += "end\n\n"
return True @@ -90,7 +90,7 @@ def object_module_content(self, module, methods): def obj_write(self): f = open(PATH_GENERATED_OBJ, "w") f.write("local KSR = {};\n\n") - f.write(self.markdown_string) + f.write(self.object_string) f.write("return KSR;\n") f.close() return True diff --git a/misc/tools/kemi/lua/kemiluacheck.py b/misc/tools/kemi/lua/kemiluacheck.py index 3da285305d..75c6e59f59 100644 --- a/misc/tools/kemi/lua/kemiluacheck.py +++ b/misc/tools/kemi/lua/kemiluacheck.py @@ -8,7 +8,7 @@ class ModuleObjGenerator(object):
# Contains the output until it should be written to disk - markdown_string = "" + object_string = ""
def execute(self, data): # Validate that we got some methods back. 155 is an arbitrary large number. @@ -19,7 +19,7 @@ def execute(self, data): functions_parsed = self.parse_function_list(data) self.output_obj(functions_parsed)
- print ("Markdown doc created successfully at " + PATH_GENERATED_OBJ) + print ("File created successfully at " + PATH_GENERATED_OBJ)
def parse_function_list(self, functions): data = {} @@ -52,22 +52,22 @@ def output_obj(self, data):
def object_module_content(self, module, methods): if module != "_core": - self.markdown_string += "\t\t\t\t" + module + " = {\n\t\t\t\t\tfields= {\n" + self.object_string += "\t\t\t\t" + module + " = {\n\t\t\t\t\tfields= {\n"
for value in methods: if module != "_core": - self.markdown_string += "\t\t\t\t\t\t" + value["name"] + " = {},\n" + self.object_string += "\t\t\t\t\t\t" + value["name"] + " = {},\n" else: - self.markdown_string += "\t\t\t\t" + value["name"] + " = {},\n" + self.object_string += "\t\t\t\t" + value["name"] + " = {},\n"
if module != "_core": - self.markdown_string += "\t\t\t\t\t},\n\t\t\t\t},\n" + self.object_string += "\t\t\t\t\t},\n\t\t\t\t},\n" return True
def obj_write(self): f = open(PATH_GENERATED_OBJ, "w") f.write("stds.KSR = {\n\tread_globals = {\n\t\tKSR = {\n\t\t\tfields = {\n") - f.write(self.markdown_string) + f.write(self.object_string) f.write("\t\t\t\tx = {\n\t\t\t\t\tfields= {\n") f.write("\t\t\t\t\t\tdrop= {},\n") f.write("\t\t\t\t\t\texit= {},\n")