AI prompts
base on IPTV工具箱, Docker🐳部署,支持EPG管理、直播源管理、台标管理,兼容DIYP/百川、超级直播及xmltv格式。 # 📺 IPTV工具箱
<div align="center">
<a href="https://trendshift.io/repositories/12969" target="_blank">
<img src="https://trendshift.io/api/badge/repositories/12969" alt="IPTV Tool | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/>
</a>
[](https://github.com/taksssss/iptv-tool/stargazers)
[](https://github.com/taksssss/iptv-tool/network/members)
[](https://github.com/taksssss/iptv-tool/issues)
[](https://github.com/taksssss/iptv-tool/pulls)
[](https://github.com/taksssss/iptv-tool/blob/main/LICENSE)


</div>
IPTV 工具箱, `Docker` 部署,支持 **EPG 管理**、**直播源管理**、**台标管理**,兼容 **DIYP/百川**、 **超级直播**以及 **xmltv** 格式。
> [!TIP]
> ⚠️ 使用前请仔细阅读「管理页面」底部的[「使用说明」](/epg/assets/html/readme.md)
>
> 原贴:[【IPTV工具箱】EPG节目单管理、直播源管理、台标管理](https://www.right.com.cn/forum/thread-8386320-1-1.html)
>
> `xmltv` 用户使用方法:[【一键生成】匹配 M3U 文件的 XML 节目单](https://www.right.com.cn/forum/thread-8392662-1-1.html)
>
> `直播源管理` 使用方法:[【IPTV工具箱】直播源管理使用说明](https://www.right.com.cn/forum/thread-8417162-1-1.html)
>
> `自定数据源` 使用方法:[【IPTV工具箱】自定义数据源(timetv、51livetv、diyp)](https://www.right.com.cn/forum/thread-8432214-1-1.html)
## 💻 主要功能
📡 **多格式**:支持返回 DIYP/百川、超级直播以及 xmltv 格式文件。
🐳 **多架构**:提供 amd64、arm64 和 armv7 架构的 Docker 镜像。
📦 **小体积镜像**:基于 Alpine 构建,压缩后仅 20 MB。
🗃️ **数据库管理**:支持 SQLite 和 MySQL 数据库,内置 phpLiteAdmin 管理工具。
🖼️ **台标管理**:支持台标模糊匹配,支持 tvbox 接口。
➰ **直播源管理**:支持聚合 TXT/M3U 直播源、测速校验、直播源代理。
🔒 **访问权限控制**:支持设置 TOKEN 、User-Agent、IP 黑白名单。
⏱️ **缓存支持**:集成 Memcached,支持 Redis。
🔄 **频道匹配**:支持繁体中文频道匹配、模糊匹配;支持频道别名、正则表达式。
⏳ **定时任务**:支持定时更新数据。
📝 **节目单生成**:支持生成指定频道节目单并匹配 M3U 的 xmltv 格式文件。
🗂️ **兼容多种格式**:支持不同标准格式的 XMLTV 文件,支持自定义数据源。
🛠️ **文件管理**:集成 tinyfilemanager 文件管理器。
🌐 **界面设置**:包含简单易用的网页设置页面,便于操作和管理。
<picture>
<source
media="(prefers-color-scheme: dark)"
srcset="/pic/management-dark.png"
/>
<source
media="(prefers-color-scheme: light)"
srcset="/pic/management.png"
/>
<img
alt="设置页面"
src="/pic/management.png"
/>
</picture>
> **内置正则表达式说明:**
> - 包含 `regex:`
> - 示例:
> - `CCTV$1 => regex:/^CCTV[-\s]*(\d{1,2}(\s*P(LUS)?|[K\+])?)(?![\s-]*(美洲|欧洲)).*/i` :将 `CCTV 1综合`、`CCTV-4K频道`、`CCTV - 5+频道`、`CCTV - 5PLUS频道` 等替换成 `CCTV1`、`CCTV4K`、`CCTV5+`、`CCTV5PLUS`(排除 `CCTV4美洲` 和 `CCTV4欧洲`)
## 📝 更新日志
### [CHANGELOG.md](./CHANGELOG.md)
## 🚀 部署步骤
安装、更新、卸载脚本:
```
bash <(curl -Ls https://raw.githubusercontent.com/taksssss/iptv-tool/master/install.sh)
```
或者
```
bash <(curl -Ls https://gitee.com/taksssss/iptv-tool/raw/main/install.sh)
```
或者
```
bash <(curl -Ls https://gcore.jsdelivr.net/gh/taksssss/iptv-tool@master/install.sh)
```
## 🛠️ 使用步骤
1. 在浏览器中打开 `http://{服务器IP地址}:5678/manage.php`
2. **默认密码为空**,根据需要自行设置
3. 添加 `EPG 地址`, GitHub 源确保能够访问,点击 `保存配置` 保存
4. 点击 `更新数据` 拉取数据,点击 `更新日志` 查看日志,点击 `频道管理` 查看具体条目
5. 设置 `定时任务` ,点击 `保存配置` 保存,点击 `定时日志` 查看定时任务时间表
> 建议从 `凌晨1点` 左右开始抓,很多源 `00:00 ~ 00:30` 都是无数据。
> 隔 `6 ~ 12` 小时抓一次即可。
6. 点击 `更多设置`,选择是否 `生成xml文件`、`xml内容`,设置`匹配频道列表`
7. 测试各个接口的返回结果是否正确:
- `xmltv` 接口:`http://{服务器IP地址}:5678/index.php`
- `DIYP/百川` 接口:`http://{服务器IP地址}:5678/index.php?ch=CCTV1`
- `超级直播` 接口:`http://{服务器IP地址}:5678/index.php?channel=CCTV1`
- `tvbox` 接口:
- `"epg":"http://{服务器IP地址}:5678/index.php?ch={name}&date={date}"`
- `"logo":"http://{服务器IP地址}:5678/index.php?ch={name}&type=icon"`
8. 将 **`http://{服务器IP地址}:5678/index.php`** 填入 `DIYP`、`TiviMate` 等软件的 `EPG 地址栏`
- ⚠️ 直接使用 `docker run` 运行的话,可以将 `:5678/index.php` 替换为 **`:5678/`**。
- ⚠️ 部分软件不支持跳转解析 `xmltv` 文件,可直接使用 **`:5678/t.xml.gz`** 或 **`:5678/t.xml`** 访问。
> **快捷键:**
>
> - `Ctrl + S`:保存设置
> - `Ctrl + /`:对选中 EPG 地址设置(取消)注释
## ☕ Buy Me a Coffee
<picture>
<source
media="(prefers-color-scheme: dark)"
srcset="/pic/buymeacofee-dark.png"
/>
<source
media="(prefers-color-scheme: light)"
srcset="/pic/buymeacofee.png"
/>
<img
alt="Buy Me a Coffee"
src="/pic/buymeacofee.png"
/>
</picture>
[查看打赏列表](/DONATIONS.md)
## ⭐ Star History
<picture>
<source
media="(prefers-color-scheme: dark)"
srcset="https://api.star-history.com/svg?repos=taksssss/iptv-tool&type=Date&theme=dark"
/>
<source
media="(prefers-color-scheme: light)"
srcset="https://api.star-history.com/svg?repos=taksssss/iptv-tool&type=Date"
/>
<img
alt="Star History Chart"
src="https://api.star-history.com/svg?repos=taksssss/iptv-tool&type=Date"
/>
</picture>
## 👍 特别鸣谢
- [ChatGPT](https://chatgpt.com/)
- [celetor/epg](https://github.com/celetor/epg)
- [sparkssssssssss/epg](https://github.com/sparkssssssssss/epg)
- [Black_crow/xmlgz](https://gitee.com/Black_crow/xmlgz)
- [112114](https://diyp.112114.xyz/)
- [EPG 51zmt](http://epg.51zmt.top:8000/)
- [fanmingming/live](https://github.com/fanmingming/live)
- [wanglindl/TVlogo](https://github.com/wanglindl/TVlogo)
- [Guovin/iptv-api](https://github.com/Guovin/iptv-api)
", Assign "at most 3 tags" to the expected json: {"id":"12969","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"