mirror of
https://gitee.com/handyorg/HandyControl.git
synced 2024-12-02 03:47:48 +08:00
16 lines
534 B
Python
16 lines
534 B
Python
from pathlib import Path
|
|
|
|
|
|
def main():
|
|
with open('build.Lang.template', 'r', encoding='utf-8') as template_file:
|
|
template_content = template_file.read()
|
|
|
|
resx_file_folder = Path('../src/Shared/HandyControl_Shared/Properties/Langs')
|
|
for lang in [path.stem.lstrip('Lang.') for path in resx_file_folder.glob('Lang.*.resx')]:
|
|
with open(f'build.Lang.{lang}.nuspec', 'w', encoding='utf-8') as nuspec_file:
|
|
nuspec_file.write(template_content.format(lang=lang))
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|