podlibre/podcast-namespace

Generate PHP translation files for CodeIgniter4 from the podcast-namespace's Persons Taxonomy json files.

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

This package is not auto-updated.

Last update: 2024-04-19 07:49:18 UTC


README

Generate PHP translation files for CodeIgniter4 from the podcast-namespace's Persons Taxonomy json files.

See: https://github.com/Podcastindex-org/podcast-namespace

Usage

Install using composer

composer require adaures/podcast-persons-taxonomy

Generate translations

# 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

Generate reversed taxonomy

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

Composer.json scripts

You may want to add post-install-cmd and post-update-cmd scripts to your composer.json to generate the translations and reversed taxonomy:

"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",
    ]
}