diff --git a/README.md b/README.md index 6c504181cfe..087d9337525 100644 --- a/README.md +++ b/README.md @@ -72,13 +72,7 @@ - - - - - - - + @@ -138,31 +132,24 @@ Fork 本项目并开启工作流更新,具体步骤请见[详细教程](./docs ### 方式二:命令行 -```python -pip -install -pipenv +```shell +pip install pipenv ``` -```python -pipenv -install - -dev +```shell +pipenv install --dev ``` 启动更新: -```python -pipenv -run -dev +```shell +pipenv run dev ``` 启动服务: -```python -pipenv -run -service +```shell +pipenv run service ``` ### 方式三:GUI 软件 @@ -171,10 +158,8 @@ service 2. 或者在项目目录下运行以下命令,即可打开 GUI 软件: -```python -pipenv -run -ui +```shell +pipenv run ui ``` IPTV-API更新软件 diff --git a/README_en.md b/README_en.md index c698ce57907..1d6e70bdd50 100644 --- a/README_en.md +++ b/README_en.md @@ -72,13 +72,7 @@ - - - - - - - + @@ -139,31 +133,24 @@ at [Detailed Tutorial](./docs/tutorial_en.md) ### Method 2: Command Line -```python -pip -install -pipenv +```shell +pip install pipenv ``` -```python -pipenv -install - -dev +```shell +pipenv install --dev ``` Start update: -```python -pipenv -run -dev +```shell +pipenv run dev ``` Start service: -```python -pipenv -run -service +```shell +pipenv run service ``` ### Method 3: GUI Software @@ -173,10 +160,8 @@ service 2. Or run the following command in the project directory to open the GUI software: -```python -pipenv -run -ui +```shell +pipenv run ui ``` IPTV-API update software diff --git a/docs/tutorial.md b/docs/tutorial.md index 1ec93e52219..1ee117287d0 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -58,7 +58,9 @@ 1. 创建文件 2. 模板文件命名为 user_demo.txt -3. 模板文件需要按照(频道分类,#genre#),(频道名称,频道接口)进行编写,注意是英文逗号。如果需要将该接口设为白名单(不测速、保留在结果最前),可在地址后添加$!即可,例如http://xxx$!。后面也可以添加额外说明信息,如:http://xxx$!白名单接口 +3. +模板文件需要按照(频道分类,#genre#),(频道名称,频道接口)进行编写,注意是英文逗号。如果需要将该接口设为白名单(不测速、保留在结果最前),可在地址后添加$!即可,例如http://xxx$! +。后面也可以添加额外说明信息,如:http://xxx$!白名单接口 4. 点击 Commit changes...进行保存 ![创建user_demo.txt](./images/edit-user-demo.png '创建user_demo.txt') @@ -81,8 +83,8 @@ 2. 配置文件命名为 user_config.ini 3. 粘贴默认配置 4. 修改模板和结果文件配置: - - source_file = config/user_demo.txt - - final_file = output/user_result.txt + - source_file = config/user_demo.txt + - final_file = output/user_result.txt 5. 点击 Commit changes...进行保存 ![创建user_config.ini](./images/edit-user-config.png '创建user_config.ini') @@ -124,7 +126,8 @@ 这个时候就可以运行更新工作流了 1. 点击 Run workflow -2. 这里可以切换您要运行的仓库分支,由于 Fork 默认拉取的是 master 分支,如果您修改的模板和配置也在 master 分支,这里选择 master 就好了,点击 Run workflow 确认运行 +2. 这里可以切换您要运行的仓库分支,由于 Fork 默认拉取的是 master 分支,如果您修改的模板和配置也在 master 分支,这里选择 + master 就好了,点击 Run workflow 确认运行 ![运行Workflow](./images/workflows-run.png '运行Workflow') @@ -132,7 +135,8 @@ 稍等片刻,就可以看到您的第一条更新工作流已经在运行了! ![Workflow运行中](./images/workflow-running.png 'Workflow运行中') -(注意:由于运行时间取决于您的模板频道数量以及页数等配置,也很大程度取决于当前网络状况,请耐心等待,默认模板与配置一般需要 25 分钟左右。) +(注意:由于运行时间取决于您的模板频道数量以及页数等配置,也很大程度取决于当前网络状况,请耐心等待,默认模板与配置一般需要 25 +分钟左右。) #### (4)Workflow 取消运行: @@ -147,9 +151,11 @@ https://ghp.ci/raw.githubusercontent.com/您的github用户名/仓库名称(对应上述Fork创建时的TV)/master/output/user_result.txt ![用户名与仓库名称](./images/rep-info.png '用户名与仓库名称') -如果访问该链接能正常返回更新后的接口内容,说明您的直播源接口链接已经大功告成了!将该链接复制粘贴到 TVBox 等软件配置栏中即可使用~ +如果访问该链接能正常返回更新后的接口内容,说明您的直播源接口链接已经大功告成了!将该链接复制粘贴到 TVBox +等软件配置栏中即可使用~ -- 注意:除了首次执行工作流需要您手动触发,后续执行(默认北京时间每日 6:00 与 18:00)将自动触发。如果您修改了模板或配置文件想立刻执行更新,可手动触发(2)中的 Run workflow 即可。 +- 注意:除了首次执行工作流需要您手动触发,后续执行(默认北京时间每日 6:00 与 18:00)将自动触发。如果您修改了模板或配置文件想立刻执行更新,可手动触发(2)中的 + Run workflow 即可。 ### 4.修改工作流更新频率(可选) @@ -174,23 +180,23 @@ https://ghp.ci/raw.githubusercontent.com/您的github用户名/仓库名称( 2. 运行更新 项目目录下打开终端 CMD 依次运行以下命令: -```python +```shell pip install pipenv ``` -```python +```shell pipenv install --dev ``` 启动更新: -```python +```shell pipenv run dev ``` 启动服务: -```python +```shell pipenv run service ``` @@ -200,7 +206,7 @@ pipenv run service 2. 或者在项目目录下运行以下命令,即可打开 GUI 软件: -```python +```shell pipenv run ui ``` @@ -208,7 +214,8 @@ pipenv run ui ### 方式四:Docker -- iptv-api(完整版本):性能要求较高,更新速度较慢,稳定性、成功率高;修改配置 open_driver = False 可切换到 Lite 版本运行模式(推荐酒店源、组播源、关键字搜索使用此版本) +- iptv-api(完整版本):性能要求较高,更新速度较慢,稳定性、成功率高;修改配置 open_driver = False 可切换到 Lite + 版本运行模式(推荐酒店源、组播源、关键字搜索使用此版本) - iptv-api:lite(精简版本):轻量级,性能要求低,更新速度快,稳定性不确定(推荐订阅源使用此版本) 1. 拉取镜像: diff --git a/docs/tutorial_en.md b/docs/tutorial_en.md index f347433d148..e31df28e90f 100644 --- a/docs/tutorial_en.md +++ b/docs/tutorial_en.md @@ -12,18 +12,21 @@ Copy the source code of this repository to your personal account repository ### 2. Fork to create a personal repository: -1. Name your personal repository, you can name it whatever you like (the final live source result link depends on this name), here we use default TV as an example. +1. Name your personal repository, you can name it whatever you like (the final live source result link depends on this + name), here we use default TV as an example. 2. After confirming the information is correct, click to confirm and create. ![Fork Details](./images/fork-detail.png 'Fork Details') ## Step 2: Update the Source Code -Since this project will continue to iterate and improve, if you want to get the latest updates, you can do the following: +Since this project will continue to iterate and improve, if you want to get the latest updates, you can do the +following: ### 1. Star -Go to https://github.com/Guovin/iptv-api, click on Star to bookmark this project (Your Star is my motivation to keep updating). +Go to https://github.com/Guovin/iptv-api, click on Star to bookmark this project (Your Star is my motivation to keep +updating). ![Star](./images/star.png 'Star') ### 2. Watch @@ -35,17 +38,20 @@ Follow this project to be notified by email about the latest updates and release #### Normal update: -Go back to the homepage of your repository after forking. If there are updates to the project, click on "Sync fork" and then "Update branch" to confirm and update to the latest code. +Go back to the homepage of your repository after forking. If there are updates to the project, click on "Sync fork" and +then "Update branch" to confirm and update to the latest code. ![Sync-fork](./images/sync-fork.png 'Sync fork') #### No Update branch button, update conflict: -This is because some files conflict with the default files in the main repository. Click "Discard commits" to update to the latest code. +This is because some files conflict with the default files in the main repository. Click "Discard commits" to update to +the latest code. ![Conflict Resolution](./images/conflict.png 'Conflict Resolution') ## Step 3: Modify the Template -When you click to confirm and create in step one, you will be automatically redirected to your personal repository. At this point, your personal repository is created, and you can customize your personal live source channel menu! +When you click to confirm and create in step one, you will be automatically redirected to your personal repository. At +this point, your personal repository is created, and you can customize your personal live source channel menu! ### 1. Click the demo.txt template file inside the config folder: @@ -55,7 +61,10 @@ When you click to confirm and create in step one, you will be automatically redi 1. Create file 2. Name the template file user_demo.txt -3. The template file needs to be written in the format of (channel category, #genre#), (channel name, channel interface), note that it is an English comma. If you need to set this interface as a whitelist (no speed testing, kept at the front of the results), simply add $! after the address. For example: http://xxx$!. Additional information can also be appended afterward, such as: http://xxx$! Whitelist interface. +3. The template file needs to be written in the format of (channel category, #genre#), (channel name, channel + interface), note that it is an English comma. If you need to set this interface as a whitelist (no speed testing, + kept at the front of the results), simply add $! after the address. For example: http://xxx$!. Additional information + can also be appended afterward, such as: http://xxx$! Whitelist interface. 4. Click Commit changes... to save ![Create user_demo.txt](./images/edit-user-demo.png 'Create user_demo.txt') @@ -78,8 +87,8 @@ Similar to editing the template, modify the running configuration 2. Name the configuration file user_config.ini 3. Paste the default template 4. Modify the template and result file configuration: - - source_file = config/user_demo.txt - - final_file = output/user_result.txt + - source_file = config/user_demo.txt + - final_file = output/user_result.txt 5. Click Commit changes... to save ![Create user_config.ini](./images/edit-user-config.png 'Create user_config.ini') @@ -102,24 +111,29 @@ If your template and configuration modifications are correct, you can configure ### 2. Enable Actions workflow: ![Enable Actions workflow](./images/actions-enable.png 'Enable Actions workflow') -Since the Actions workflow of the forked repository is disabled by default, you need to manually enable it by clicking the button in the red box to confirm. +Since the Actions workflow of the forked repository is disabled by default, you need to manually enable it by clicking +the button in the red box to confirm. ![Actions workflow enabled successfully](./images/actions-home.png 'Actions workflow enabled successfully') -After successful activation, you can see that there are no workflows running at the moment. Don't worry, let's start running your first update workflow below. +After successful activation, you can see that there are no workflows running at the moment. Don't worry, let's start +running your first update workflow below. ### 3. Run the update workflow: #### (1) Enable update schedule: 1. Click on update schedule under the Workflows category. -2. Since the workflow of the forked repository is disabled by default, click the Enable workflow button to confirm the activation. +2. Since the workflow of the forked repository is disabled by default, click the Enable workflow button to confirm the + activation. ![Enable Workflows update](./images/workflows-btn.png 'Enable Workflows update') #### (2) Run the Workflow based on branches: 1. Click Run workflow. -2. Here you can switch to the branch you want to run. Since the fork defaults to the master branch, if the template and configuration you modified are also in the master branch, just choose master here, and click Run workflow to confirm the run. +2. Here you can switch to the branch you want to run. Since the fork defaults to the master branch, if the template and + configuration you modified are also in the master branch, just choose master here, and click Run workflow to confirm + the run. ![Run Workflow](./images/workflows-run.png 'Run Workflow') Now you can run the update workflow. @@ -127,30 +141,40 @@ Now you can run the update workflow. #### (3) Workflow in progress: Wait a moment, and you will see that your first update workflow is running! -(Note: The running time depends on the number of channels and pages in your template and other configurations, and also largely depends on the current network conditions. Please be patient. The default template and configuration usually take about 25 minutes.) +(Note: The running time depends on the number of channels and pages in your template and other configurations, and also +largely depends on the current network conditions. Please be patient. The default template and configuration usually +take about 25 minutes.) ![Workflow in progress](./images/workflow-running.png 'Workflow in progress') #### (4) Cancel the running Workflow: -If you feel that this update is not quite right and you need to modify the template or configuration before running again, you can click Cancel run to cancel this run. +If you feel that this update is not quite right and you need to modify the template or configuration before running +again, you can click Cancel run to cancel this run. ![Cancel running Workflow](./images/workflow-cancel.png 'Cancel running Workflow') #### (5) Workflow executed successfully: -If everything is normal, after a short wait, you will see that the workflow has been executed successfully (green check mark). +If everything is normal, after a short wait, you will see that the workflow has been executed successfully (green check +mark). ![Workflow executed successfully](./images/workflow-success.png 'Workflow executed successfully') At this point, you can visit the proxy file link to see if the latest results have been synchronized: -https://ghp.ci/raw.githubusercontent.com/your github username/repository name (corresponding to the TV created when forking)/master/user_result.txt +https://ghp.ci/raw.githubusercontent.com/your github username/repository name (corresponding to the TV created when +forking)/master/user_result.txt ![Username and Repository Name](./images/rep-info.png 'Username and Repository Name') -If you can access this link and it returns the updated interface content, then your live source interface link has been successfully created! Simply copy and paste this link into software like TVBox in the configuration field to use~ +If you can access this link and it returns the updated interface content, then your live source interface link has been +successfully created! Simply copy and paste this link into software like TVBox in the configuration field to use~ -- Note: Except for the first execution of the workflow, which requires you to manually trigger it, subsequent executions (default: 6:00 AM and 18:00 PM Beijing time daily) will be automatically triggered. If you have modified the template or configuration files and want to execute the update immediately, you can manually trigger (2) Run workflow. +- Note: Except for the first execution of the workflow, which requires you to manually trigger it, subsequent + executions (default: 6:00 AM and 18:00 PM Beijing time daily) will be automatically triggered. If you have modified + the template or configuration files and want to execute the update immediately, you can manually trigger (2) Run + workflow. ### 4.Modify Workflow Update Frequency(optional) -If you want to modify the update frequency (default: 6:00 AM and 18:00 PM Beijing time daily), you can modify the on:schedule:- cron field. +If you want to modify the update frequency (default: 6:00 AM and 18:00 PM Beijing time daily), you can modify the on: +schedule:- cron field. ![.github/workflows/main.yml](./images/schedule-cron.png '.github/workflows/main.yml') If you want to perform updates every 2 days, you can modify it like this: @@ -166,38 +190,40 @@ If you want to perform updates every 2 days, you can modify it like this: ### Method 2: Command Line 1. Install Python - Please download and install Python from the official site. During installation, choose to add Python to the system's environment variables Path. + Please download and install Python from the official site. During installation, choose to add Python to the system's + environment variables Path. 2. Run Update Open a CMD terminal in the project directory and run the following commands in sequence: -```python +```shell pip install pipenv ``` -```python +```shell pipenv install --dev ``` Start update: -```python +```shell pipenv run dev ``` Start service: -```python +```shell pipenv run service ``` ### Method 3: GUI Software -1. Download [IPTV-API software](https://github.com/Guovin/iptv-api/releases), open the software, click update to complete the update. +1. Download [IPTV-API software](https://github.com/Guovin/iptv-api/releases), open the software, click update to + complete the update. 2. Alternatively, run the following command in the project directory to open the GUI software: -```python +```shell pipenv run ui ``` @@ -205,8 +231,11 @@ pipenv run ui ### Method 4: Docker -- iptv-api (Full version): Higher performance requirements, slower update speed, high stability and success rate. Set open_driver = False to switch to the lite running mode (recommended for hotel sources, multicast sources, and online searches) -- iptv-api:lite (Condensed version): Lightweight, low performance requirements, fast update speed, stability uncertain (recommend using this version for the subscription source) +- iptv-api (Full version): Higher performance requirements, slower update speed, high stability and success rate. Set + open_driver = False to switch to the lite running mode (recommended for hotel sources, multicast sources, and online + searches) +- iptv-api:lite (Condensed version): Lightweight, low performance requirements, fast update speed, stability uncertain ( + recommend using this version for the subscription source) It's recommended to try each one and choose the version that suits you @@ -239,7 +268,8 @@ docker run -d -p 8000:8000 guovern/iptv-api:lite ``` Volume Mount Parameter (Optional): -This allows synchronization of files between the host machine and the container. Modifying templates, configurations, and retrieving updated result files can be directly operated in the host machine's folder. +This allows synchronization of files between the host machine and the container. Modifying templates, configurations, +and retrieving updated result files can be directly operated in the host machine's folder. Taking the host path /etc/docker as an example: @@ -265,6 +295,8 @@ docker run -v /etc/docker/config:/iptv-api-lite/config -v /etc/docker/output:/ip ### Update the File to the Repository(optional) -If you do not have your own domain address, after the interface update is completed, upload user_result.txt to your personal repository to use it. -https://ghp.ci/raw.githubusercontent.com/your github username/repository name (corresponding to the TV created when forking)/master/output/user_result.txt +If you do not have your own domain address, after the interface update is completed, upload user_result.txt to your +personal repository to use it. +https://ghp.ci/raw.githubusercontent.com/your github username/repository name (corresponding to the TV created when +forking)/master/output/user_result.txt ![Username and Repository Name](./images/rep-info.png 'Username and Repository Name')