From 24109dcca406c4f0bfcc3cf26a29197e072307d9 Mon Sep 17 00:00:00 2001 From: TakWolf Date: Wed, 22 Jan 2025 03:20:56 +0800 Subject: [PATCH] =?UTF-8?q?Yaml=20=E6=96=87=E4=BB=B6=E6=89=A9=E5=B1=95?= =?UTF-8?q?=E5=90=8D=E4=BF=AE=E6=94=B9=E4=B8=BA=20'.yaml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/{FUNDING.yml => FUNDING.yaml} | 0 .github/workflows/{check.yml => check.yaml} | 0 .github/workflows/{pages.yml => pages.yaml} | 0 .github/workflows/{release.yml => release.yaml} | 0 assets/{dump-configs.yml => dump-configs.yaml} | 0 assets/{fallback-configs.yml => fallback-configs.yaml} | 0 assets/patch-glyphs/10/{config.yml => config.yaml} | 0 assets/patch-glyphs/12/{config.yml => config.yaml} | 0 assets/patch-glyphs/8/{config.yml => config.yaml} | 0 assets/{update-configs.yml => update-configs.yaml} | 0 tools/configs/__init__.py | 6 +++--- tools/configs/dump.py | 2 +- tools/configs/fallback.py | 2 +- tools/configs/font.py | 2 +- tools/configs/update.py | 2 +- tools/services/update_service.py | 2 +- 16 files changed, 8 insertions(+), 8 deletions(-) rename .github/{FUNDING.yml => FUNDING.yaml} (100%) rename .github/workflows/{check.yml => check.yaml} (100%) rename .github/workflows/{pages.yml => pages.yaml} (100%) rename .github/workflows/{release.yml => release.yaml} (100%) rename assets/{dump-configs.yml => dump-configs.yaml} (100%) rename assets/{fallback-configs.yml => fallback-configs.yaml} (100%) rename assets/patch-glyphs/10/{config.yml => config.yaml} (100%) rename assets/patch-glyphs/12/{config.yml => config.yaml} (100%) rename assets/patch-glyphs/8/{config.yml => config.yaml} (100%) rename assets/{update-configs.yml => update-configs.yaml} (100%) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yaml similarity index 100% rename from .github/FUNDING.yml rename to .github/FUNDING.yaml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yaml similarity index 100% rename from .github/workflows/check.yml rename to .github/workflows/check.yaml diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yaml similarity index 100% rename from .github/workflows/pages.yml rename to .github/workflows/pages.yaml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yaml similarity index 100% rename from .github/workflows/release.yml rename to .github/workflows/release.yaml diff --git a/assets/dump-configs.yml b/assets/dump-configs.yaml similarity index 100% rename from assets/dump-configs.yml rename to assets/dump-configs.yaml diff --git a/assets/fallback-configs.yml b/assets/fallback-configs.yaml similarity index 100% rename from assets/fallback-configs.yml rename to assets/fallback-configs.yaml diff --git a/assets/patch-glyphs/10/config.yml b/assets/patch-glyphs/10/config.yaml similarity index 100% rename from assets/patch-glyphs/10/config.yml rename to assets/patch-glyphs/10/config.yaml diff --git a/assets/patch-glyphs/12/config.yml b/assets/patch-glyphs/12/config.yaml similarity index 100% rename from assets/patch-glyphs/12/config.yml rename to assets/patch-glyphs/12/config.yaml diff --git a/assets/patch-glyphs/8/config.yml b/assets/patch-glyphs/8/config.yaml similarity index 100% rename from assets/patch-glyphs/8/config.yml rename to assets/patch-glyphs/8/config.yaml diff --git a/assets/update-configs.yml b/assets/update-configs.yaml similarity index 100% rename from assets/update-configs.yml rename to assets/update-configs.yaml diff --git a/tools/configs/__init__.py b/tools/configs/__init__.py index 9e00d44..10a445b 100644 --- a/tools/configs/__init__.py +++ b/tools/configs/__init__.py @@ -47,9 +47,9 @@ attachments = list[Attachment](get_args(Attachment.__value__)) mapping_file_paths = [ - path_define.ark_pixel_mappings_dir.joinpath('2700-27BF Dingbats.yml'), - path_define.ark_pixel_mappings_dir.joinpath('2E80-2EFF CJK Radicals Supplement.yml'), - path_define.ark_pixel_mappings_dir.joinpath('2F00-2FDF Kangxi Radicals.yml'), + path_define.ark_pixel_mappings_dir.joinpath('2700-27BF Dingbats.yaml'), + path_define.ark_pixel_mappings_dir.joinpath('2E80-2EFF CJK Radicals Supplement.yaml'), + path_define.ark_pixel_mappings_dir.joinpath('2F00-2FDF Kangxi Radicals.yaml'), ] license_configs = { diff --git a/tools/configs/dump.py b/tools/configs/dump.py index cf5d73d..076cbd9 100644 --- a/tools/configs/dump.py +++ b/tools/configs/dump.py @@ -10,7 +10,7 @@ class DumpConfig: @staticmethod def load() -> dict[FontSize, list['DumpConfig']]: - configs_data = yaml.safe_load(path_define.assets_dir.joinpath('dump-configs.yml').read_bytes()) + configs_data = yaml.safe_load(path_define.assets_dir.joinpath('dump-configs.yaml').read_bytes()) dump_configs = {font_size: [] for font_size in configs.font_sizes} for name, items_data in configs_data.items(): version = json.loads(path_define.fonts_dir.joinpath(name, 'version.json').read_bytes())['version'] diff --git a/tools/configs/fallback.py b/tools/configs/fallback.py index 39e88be..947ff2b 100644 --- a/tools/configs/fallback.py +++ b/tools/configs/fallback.py @@ -9,7 +9,7 @@ class FallbackConfig: @staticmethod def load() -> dict[FontSize, list['FallbackConfig']]: - configs_data = yaml.safe_load(path_define.assets_dir.joinpath('fallback-configs.yml').read_bytes()) + configs_data = yaml.safe_load(path_define.assets_dir.joinpath('fallback-configs.yaml').read_bytes()) fallback_configs = {font_size: [] for font_size in configs.font_sizes} for config_data in configs_data: font_size = config_data['font-size'] diff --git a/tools/configs/font.py b/tools/configs/font.py index cd37bfd..c05e1c9 100644 --- a/tools/configs/font.py +++ b/tools/configs/font.py @@ -23,7 +23,7 @@ def line_height(self) -> int: class FontConfig: @staticmethod def load(font_size: FontSize) -> 'FontConfig': - file_path = path_define.patch_glyphs_dir.joinpath(str(font_size), 'config.yml') + file_path = path_define.patch_glyphs_dir.joinpath(str(font_size), 'config.yaml') config_data = yaml.safe_load(file_path.read_bytes()) layout_params = {} diff --git a/tools/configs/update.py b/tools/configs/update.py index 11c6438..da56431 100644 --- a/tools/configs/update.py +++ b/tools/configs/update.py @@ -15,7 +15,7 @@ def __init__(self, file_name: str | None, copy_list: list[tuple[str, str]]): class UpdateConfig: @staticmethod def load() -> list['UpdateConfig']: - configs_data = yaml.safe_load(path_define.assets_dir.joinpath('update-configs.yml').read_bytes()) + configs_data = yaml.safe_load(path_define.assets_dir.joinpath('update-configs.yaml').read_bytes()) update_configs = [] for config_data in configs_data: name = config_data['name'] diff --git a/tools/services/update_service.py b/tools/services/update_service.py index 8b9d464..3380e3e 100644 --- a/tools/services/update_service.py +++ b/tools/services/update_service.py @@ -78,7 +78,7 @@ def setup_ark_pixel_glyphs(): if path_define.ark_pixel_mappings_dir.exists(): shutil.rmtree(path_define.ark_pixel_mappings_dir) for font_size in [10, 12]: - shutil.copyfile(source_unzip_dir.joinpath('assets', 'glyphs', str(font_size), 'config.yml'), path_define.patch_glyphs_dir.joinpath(str(font_size), 'config.yml')) + shutil.copyfile(source_unzip_dir.joinpath('assets', 'glyphs', str(font_size), 'config.yaml'), path_define.patch_glyphs_dir.joinpath(str(font_size), 'config.yaml')) shutil.copyfile(source_unzip_dir.joinpath('LICENSE-OFL'), font_ark_pixel_dir.joinpath('LICENSE.txt')) source_unzip_dir.joinpath('assets', 'glyphs').rename(path_define.ark_pixel_glyphs_dir) source_unzip_dir.joinpath('assets', 'mappings').rename(path_define.ark_pixel_mappings_dir)