podlibre / podcast-namespace

从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-20 09:36:48 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",
    ]
}