# -*- coding: utf-8 -*- """Regenerate waybill/index.vue with UTF-8 Chinese and region cascaders.""" import os OUT = os.path.join( os.path.dirname(os.path.dirname(__file__)), "ruoyi-ui", "src", "views", "basic", "waybill", "index.vue" ) # fmt: off VUE = r''' ''' # fmt: on SCRIPT = r''' ''' def main(): content = VUE.encode("utf-8").decode("unicode_escape") + SCRIPT.encode("utf-8").decode("unicode_escape") os.makedirs(os.path.dirname(OUT), exist_ok=True) with open(OUT, "w", encoding="utf-8", newline="\n") as f: f.write(content) print("written", OUT, len(content)) if __name__ == "__main__": main()