Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaylinski/xmltv
A library for generating XMLTV files.
https://github.com/jaylinski/xmltv
iptv kodi xmltv
Last synced: about 2 months ago
JSON representation
A library for generating XMLTV files.
- Host: GitHub
- URL: https://github.com/jaylinski/xmltv
- Owner: jaylinski
- License: mit
- Created: 2017-08-27T22:31:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-20T22:27:07.000Z (2 months ago)
- Last Synced: 2024-11-08T13:24:50.016Z (about 2 months ago)
- Topics: iptv, kodi, xmltv
- Language: PHP
- Homepage: https://packagist.org/packages/jaylinski/xmltv
- Size: 147 KB
- Stars: 12
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# XMLTV
[![Latest Stable Version](https://poser.pugx.org/jaylinski/xmltv/v/stable)](https://packagist.org/packages/jaylinski/xmltv)
[![Build](https://img.shields.io/github/actions/workflow/status/jaylinski/xmltv/ci.yml?branch=master)](https://github.com/jaylinski/xmltv/actions)
[![Code Coverage](https://codecov.io/gh/jaylinski/xmltv/branch/master/graph/badge.svg)](https://codecov.io/gh/jaylinski/xmltv)
[![Code Style](https://styleci.io/repos/101584271/shield)](https://styleci.io/repos/101584271)A library for generating XMLTV files.
## Installation
Install the latest version with
`$ composer require jaylinski/xmltv`
## Usage
```php
addDisplayName(new Tv\Elements\DisplayName('Channel 1', 'en'));$programme = new Tv\Programme('channel1', '20170914190000 +0200', '20170914200000 +0200');
$programme->addTitle(new Tv\Elements\Title('CNN News', 'en'));
$programme->addDescription(new Tv\Elements\Desc('World news', 'en'));
$programme->addCategory(new Tv\Elements\Category('news', 'en'));$tv->addChannel($channel);
$tv->addProgramme($programme);$xml = XmlTv::generate($tv, $validate = true);
```A more detailed example can be found in the
[specification test](https://github.com/jaylinski/xmltv/blob/master/spec/XmlTv/XmlTvSpec.php).## Sources
You can write your own source by implementing the `XmlTv\Tv\Source` interface.
## License
XMLTV is licensed under the MIT License - see the `LICENSE` file for details.