Update nutups and js file into generated mix

This commit is contained in:
2025-01-20 16:27:26 +00:00
parent c7dc45ccb5
commit 51a59b9696
12 changed files with 212 additions and 56 deletions

View File

@@ -21,7 +21,7 @@ import logging
# 2. Deal with ? and ! as sentence ends in text-format
# 3. Make lexical scan work with double or single quotes (if possible)
SME2Gen_version = "0.8"
SME2Gen_version = "0.9(20Jan2025)"
json5_dict: dict = {}
json5_html_list: list = []
# Define the path to the INI file
@@ -638,6 +638,7 @@ if __name__ == "__main__":
#logger.info(custom_controller_file)
layout_file = check_file_version(target_directory_path + hl("PackageName").lower() + ".html.ep",force_Files)
css_file = check_file_version(target_directory_path + hl("PackageName").lower() + ".css",force_Files)
js_file = check_file_version(target_directory_path + hl("PackageName").lower() + ".js",force_Files)
partial_files = list()
for panel in routes:
partial_files.append(check_file_version(
@@ -836,10 +837,17 @@ if __name__ == "__main__":
# Create the css file (the header, followed by a dummy entry for each class created/used above)
with open(css_file, "w") as file:
file.write(f"/*\nGenerated by SM2Gen version: {strVersion}\n*/\n")
file.write(f"/*\nGenerated by: {strVersion}\n*/\n")
file.write(f".{hl('PackageName')}-panel {{}}\n")
file.write(acc_css_entries);
logger.info(f"Css generated and saved to {highlight_occurrences(css_file)}")
# and create a js file (empty))
with open(js_file, "w") as file:
file.write(f"//\n//Generated by: {strVersion}\n//\n")
file.write("$(document).ready(function() {\n")
file.write("});\n");
logger.info(f"js generated and saved to {highlight_occurrences(js_file)}")
# Now generate the <name>.en file
# Look through the generated files for the /l[\s|(]['|"](.*)['|"]\)/ strings.
@@ -955,4 +963,4 @@ if __name__ == "__main__":
# logger.info(
# f"Skipping the creation of {translated_lex_file} as it exists already"
# )
quit() # end of the program
quit() # end of the program