https://github.com/gpenverne/program-tv
Ce script parse le programme tv et retourne la chaîne correspondante à ce qui est cherché.
https://github.com/gpenverne/program-tv
parser php tv
Last synced: about 1 year ago
JSON representation
Ce script parse le programme tv et retourne la chaîne correspondante à ce qui est cherché.
- Host: GitHub
- URL: https://github.com/gpenverne/program-tv
- Owner: gpenverne
- License: mit
- Created: 2018-05-25T16:13:02.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-25T16:17:15.000Z (about 8 years ago)
- Last Synced: 2025-02-14T20:51:10.636Z (over 1 year ago)
- Topics: parser, php, tv
- Language: PHP
- Homepage: https://gkdv.net/Retrieve-french-tv-program/
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ProgramTv
Ce script parse le programme tv (récupéré depuis [http://www.xmltv.fr/guide/tvguide.xml](http://www.xmltv.fr/guide/tvguide.xml)) et retourne la chaîne correspondante à ce qui est cherché.
Exemples:
```bash
$ ./run.php "documentaire"
# Ok j'ai mis titre du documentaire sur france5
$ ./run.php "scènes de ménage"
# Ok j'ai mis scènes de ménage sur m6
```
## Callback
Le fichier ``callback.php`` est appelé lorsqu'un programme est trouvé.
Le fichier est généré depuis ``callback.php.dist``
Les infos sur le programme sont récupérables comme suit:
```php
title.'" sur '.$program->channel_name.' sur le canal '.$program->channel;
// On peut imaginer un shell_exec
// shell_exec('/chemin/command.sh '.$program->channel);
?>
```
## Mise à jour du programme tv
```bash
$ cron.sh
```
## channels.php
Le fichier channel.php fait la correspondance entre les noms de chaînes et leur numéros.
En commentant une chaîne, cela l'exclut de la recherche.