adaures/podcast-persons-taxonomy

从 podcast-namespace 的 Persons Taxonomy json 文件生成 CodeIgniter4 的 PHP 翻译文件。

v1.0.1 2023-06-22 14:24 UTC

This package is not auto-updated.

Last update: 2024-09-26 20:47:20 UTC


README

从 podcast-namespace 的 Persons Taxonomy json 文件生成 CodeIgniter4 的 PHP 翻译文件。

查看: https://github.com/Podcastindex-org/podcast-namespace

用法

使用 composer 安装

composer require adaures/podcast-persons-taxonomy

生成翻译

# english taxonomy
php src/TaxonomyGenerate.php https://raw.githubusercontent.com/Podcastindex-org/podcast-namespace/main/taxonomy-en.json > path/to/en/OutputTaxonomy.php
# french taxonomy
php src/TaxonomyGenerate.php https://raw.githubusercontent.com/Podcastindex-org/podcast-namespace/main/taxonomy-fr.json > path/to/fr/OutputTaxonomy.php

生成反向分类法

php src/ReversedTaxonomyGenerate.php https://raw.githubusercontent.com/Podcastindex-org/podcast-namespace/main/taxonomy-en.json > path/to/OutputReversedTaxonomy.php

Composer.json 脚本

您可能希望在您的 composer.json 中添加 post-install-cmdpost-update-cmd 脚本来生成翻译和反向分类法

"scripts": {
    "post-install-cmd": [
      "@php vendor/adaures/podcast-persons-taxonomy/src/TaxonomyGenerate.php https://raw.githubusercontent.com/Podcastindex-org/podcast-namespace/main/taxonomy-en.json > app/Language/en/Taxonomy.php",
      "@php vendor/adaures/podcast-persons-taxonomy/src/TaxonomyGenerate.php https://raw.githubusercontent.com/Podcastindex-org/podcast-namespace/main/taxonomy-fr.json > app/Language/fr/Taxonomy.php",
      "@php vendor/adaures/podcast-persons-taxonomy/src/ReversedTaxonomyGenerate.php https://raw.githubusercontent.com/Podcastindex-org/podcast-namespace/main/taxonomy-en.json > vendor/adaures/podcast-namespace/src/ReversedTaxonomy.php",
    ]
}