{"id":18544078,"url":"https://github.com/swagdevops/kodi_fav_gen","last_synced_at":"2026-06-17T20:34:04.128Z","repository":{"id":172973369,"uuid":"649437834","full_name":"SwagDevOps/kodi_fav_gen","owner":"SwagDevOps","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-31T15:02:18.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-17T09:15:13.236Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SwagDevOps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-04T20:50:34.000Z","updated_at":"2023-06-04T20:51:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"6f78b6e1-2fda-4a3b-842e-35915799b4ff","html_url":"https://github.com/SwagDevOps/kodi_fav_gen","commit_stats":null,"previous_names":["swagdevops/kodi_fav_gen"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwagDevOps%2Fkodi_fav_gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwagDevOps%2Fkodi_fav_gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwagDevOps%2Fkodi_fav_gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwagDevOps%2Fkodi_fav_gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SwagDevOps","download_url":"https://codeload.github.com/SwagDevOps/kodi_fav_gen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254281790,"owners_count":22045021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T20:15:20.137Z","updated_at":"2026-06-17T20:33:59.106Z","avatar_url":"https://github.com/SwagDevOps.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Simple favourites generator for kodi\n\n[Favourites][wiki/favourites] can be edited directly\nin the [``favourites.xml``][wiki/favourites.xml] file\nin the [``userdata``][wiki/userdata] folder.\n``kodi-favgen`` provides a solution to generate ``favourites.xml`` files\nfrom small (and clean) YAML files.\n\n### Sample favourite YAML file\n\n```yaml\n---\nname: France 2\nthumb: france2\naction: |\n  ActivateWindow(10025,\u0026quot;plugin://plugin.video.catchuptvandmore/resources/lib/channels/fr/francetv/channel_homepage/\n  ?_pickle_=800595b8000000000000007d94288c075f7469746c655f948c2554c3a96cc3a9766973696f6e2064652072617474726170616765202d\n  204672616e63652032948c065f617267735f945d948c116368616e6e656c732f6672616e63652d3294618c0b69735f706c617961626c6594898c09\n  69735f666f6c64657294888c056f72646572944b028c0866726f6d5f66617694888c096974656d5f68617368948c20333063646533613030343561\n  656333633130326631656330346438343361313794752e\u0026quot;,return)\n```\n\nFavourites support actions with a more concise (DRY) and declarative syntax.\nExample with ``activate_window`` (as seen above):\n\n```yaml\n---\nname: France 2\nthumb: france2\naction:\n  type: activate_window\n  value: |\n    plugin://plugin.video.catchuptvandmore/resources/lib/channels/fr/francetv/channel_homepage/\n    ?_pickle_=800595b8000000000000007d94288c075f7469746c655f948c2554c3a96cc3a9766973696f6e2064652072617474726170616765202d\n    204672616e63652032948c065f617267735f945d948c116368616e6e656c732f6672616e63652d3294618c0b69735f706c617961626c6594898c09\n    69735f666f6c64657294888c056f72646572944b028c0866726f6d5f66617694888c096974656d5f68617368948c20333063646533613030343561\n    656333633130326631656330346438343361313794752e\n```\n\n### Samples of use\n\n```shell\n# kodi-favgen generate path='sample/favourites'\n# kodi-favgen generate path='sample/favourites' output='/dev/stdout'\n# kodi-favgen generate path='sample/favourites' thumbs-path=../thumbs output='/dev/stdout'\n# kodi-favgen generate path='sample/favourites' tmpdir=sample/cache/ output='/dev/stdout'\n```\n\n## Actions\n\nFirst argument is an action, available actions are:\n\n| action       | description                                                                                                                    |\n|--------------|--------------------------------------------------------------------------------------------------------------------------------|\n| ``generate`` | Generate a favourites file.                                                                                                    |\n| ``config``   | Display ``config`` with values from [``defaults``][SwagDevOps/kodi_fav_gen/config/defaults.rb], environment and CLI arguments. |   \n| ``update``   | Update favourites using (`git`) version control, see: [``kodi_favourites``][SwagDevOps/kodi_favourites].                       |\n\n## Variables\n\n### ``generate``\n\n| key           | defaults                                                       | description                                                                                                                                                                                                            | example                                         |\n|---------------|----------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------|\n| `path`        | __MUST BE SET__                                                | path to favourites files                                                                                                                                                                                               | ``${HOME}/.local/share/kodi_favgen/favourites`` |\n| `thumbs-path` | `#{path}/../thumbs`                                            | ``thumbs-path`` is relative to ``path`` unless the path is given as absolute.                                                                                                                                          |                                                 |\n| `output`      | `'.kodi/userdata/favourites.xml'`                              | [``favourites.xml``][wiki/favourites.xml] file in the [``userdata``][wiki/userdata] folder                                                                                                                             | ``${HOME}/.kodi/userdata/favourites.xml``       |\n| `tmpdir`      | `\"#{ENV[TMPDIR] \\|\\| ::Dir.tmpdir}/KodiFavGen.#{Process.uid}\"` | [``TMPDIR``][wikipedia/tmpdir] is the canonical environment variable in Unix and POSIX that should be used to specify a temporary directory (see [The Open Group Base Specifications][opengroup/directory_structure]). | ``/tmp/KodiFavGen.1000``                        |\n\n### ``update``\n\n| key             | defaults        | description                      | example                              |\n|-----------------|-----------------|----------------------------------|--------------------------------------|\n| `update_path`   | __MUST BE SET__ | path to `git` root directory     | ``${HOME}/.local/share/kodi_favgen`` |\n| `update_branch` | __MUST BE SET__ | branch used to update favourites | ``master``                           |\n\n### Using variables in favourite files\n\nFile can use ERB template syntax, when using ``.yml.erb`` extension.\n``variables`` are retrieved (as is) from Env Config.\n\nDeclare a variable in environment:\n\n```shell\nexport KODI_FAVGEN__FILES_PATH='/home/john_doe/Public'\n```\n\nOr use the CLI parameters:\n\n```shell\nkodi-favgen path='sample/favourites' files-path='/home/john_doe/Public'\n```\n\nRetrieve and use the variable(s) in a YAML favourite file:\n\n```yaml\n# 000_files.yml.erb\nname: Files\nthumb: files\naction:\n  type: activate_window\n  value: \u003c%= files_path.inspect %\u003e\n```\n\n\u003c!-- hyperlinks --\u003e\n\n[wiki/favourites]: https://kodi.wiki/view/Favourites\n[wiki/favourites.xml]: https://kodi.wiki/view/Favourites.xml\n[wiki/userdata]: https://kodi.wiki/view/Userdata\n[wikipedia/tmpdir]: https://en.wikipedia.org/wiki/TMPDIR\n[opengroup/directory_structure]: https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap10.html\n[ruby/erb]: https://github.com/ruby/erb\n[SwagDevOps/kodi_favourites]: https://github.com/SwagDevOps/kodi_favourites\n[SwagDevOps/kodi_fav_gen/config/defaults.rb]: https://github.com/SwagDevOps/kodi_fav_gen/blob/master/lib/kodi_fav_gen/config/defaults.rb\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswagdevops%2Fkodi_fav_gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswagdevops%2Fkodi_fav_gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswagdevops%2Fkodi_fav_gen/lists"}