定制 b-alidra/epg-generator 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

b-alidra/epg-generator

Composer 安装命令:

composer create-project b-alidra/epg-generator

包简介

French channels EGP generator

README 文档

README

Latest Stable Version

epg-generator

French channels EGP generator

Can be used in your project as a standard library or directly from the command line.

Installation:

The library is PSR-4 compliant and the simplest way to install it is via composer:

 composer require b-alidra/epg-generator

Usage

Use the lib to generate XML

<?php
    use EPG\Epg;
    use EPG\Providers\TeleramaProvider;
    use EPG\Providers\Sniffers\TeleramaSniffer;

    $sniffer  = new TeleramaSniffer();
    $provider = new TeleramaProvider($sniffer);

    $channel_ids  = [1, 9, 217, 13];
    $days_to_grab = 3;

    $provider
        // Filter on channels, optional
        ->filter_on_channels($channel_ids)
        // Grab 3 days, default 1
        ->set_days_to_grab($days_to_grab);

    $epg = new Epg($provider);

    $xml_guide = $epg->get_xml();

CLI : Generate XML

% php vendor/bin/epg.php epg:generate --help

Usage:
  epg:generate [options]

Options:
  -p, --provider[=PROVIDER]        Which provider do you want to use ? [default: "telerama"]
  -d, --days[=DAYS]                How many days to grab ? [default: 1]
  -c, --channel_ids[=CHANNEL_IDS]  Grab only some channels (multiple values allowed)
  -h, --help                       Display this help message
  -q, --quiet                      Do not output any message
  -V, --version                    Display this application version
      --ansi                       Force ANSI output
      --no-ansi                    Disable ANSI output
  -n, --no-interaction             Do not ask any interactive question
  -v|vv|vvv, --verbose             Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  This command allows you to generate an EGP XML file.
% php vendor/bin/epg.php epg:generate
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tv PUBLIC "SYSTEM" "http://xmltv.cvs.sourceforge.net/viewvc/xmltv/xmltv/xmltv.dtd">
<tv date="2017-10-12" source-info-url="https://b-alidra.com/xmltv" source-info-name="b-alidra.com" source-data-url="https://b-alidra.com/xmltv" generator-info-name="XMLTV" generator-info-url="https://b-alidra.com/xmltv">
   <channel id="TF1">
     <display-name lang="fr">TF1</display-name>
     </channel>
     <channel id="IDF1">
     <display-name lang="fr">IDF1</display-name>
   </channel>
   ...
   <programme channel="TF1" start="20171012184000" stop="20171012184500" pdc-start="20171012184000" vps-start="20171012184000">
     <title lang="fr">Météo</title>
     <sub-title lang="fr"/>
     <desc lang="fr"/>
     <date>20171012</date>
     <category lang="fr">Météo</category>
     <length units="minutes">5</length>
   </programme>
   ...
 </tv>

CLI : List channels

% php vendor/bin/epg.php epg:channels --help

Usage:
  epg:channels [options]

Options:
  -p, --provider[=PROVIDER]  Which provider do you want to use ? [default: "telerama"]
  -h, --help                 Display this help message
  -q, --quiet                Do not output any message
  -V, --version              Display this application version
      --ansi                 Force ANSI output
      --no-ansi              Disable ANSI output
  -n, --no-interaction       Do not ask any interactive question
  -v|vv|vvv, --verbose       Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  This command allows you to list the available channels.
% php vendor/bin/epg.php epg:channels
     
+----------------+------------------------------+
| ID             | Channel                      |
+----------------+------------------------------+
| TNT (4)                                       |
+----------------+------------------------------+
| 1              | TF1                          |
| 9              | France 2                     |
| 21             | France 3                     |
| 7              | Canal+                       |
| 13             | France 5                     |
| 28             | M6                           |
| 25             | Arte                         |
| 64             | C8                           |
| 29             | W9                           |
| 38             | TMC                          |
| 65             | NT 1                         |
| 63             | NRJ 12                       |
| 45             | La Chaine parlementaire      |
                 ...

b-alidra/epg-generator 适用场景与选型建议

b-alidra/epg-generator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 38 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 10 月 12 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 b-alidra/epg-generator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 b-alidra/epg-generator 我们能提供哪些服务?
定制开发 / 二次开发

基于 b-alidra/epg-generator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 38
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 9
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-10-12