Skip to content

Make EPG

Make EPG #2

Workflow file for this run

name: Make EPG
on:
# schedule:
# - cron: "0 0 * * *"
workflow_dispatch:
jobs:
epg:
name: Make EPG
runs-on: ubuntu-latest
steps:
- name: Download EPG
run: |
mapfile -t urls < config/epg.txt
# Iterate over the URLs and download the XML files
for url in $urls; do
wget $url
done
# - name: Download & Install WebGrab+Plus
# run: |
# wget http://webgrabplus.com/sites/default/files/download/SW/V3.2.0/WebGrabPlus_V3.2_install.tar.gz
# tar -zxvf WebGrabPlus_V3.2_install.tar.gz
# cd .wg++
# ./install.sh
# - name: Download and Run WebGrab++.config.xml
# run: |
# cd .wg++
# wget -N https://raw.githubusercontent.com/LiuYi0526/IPTV/master/WebGrab++.config.xml
# ./run.sh
- name: Install xmltv
run: |
sudo apt update
sudo apt -y install xmltv
- name: Merge EPG
run: |
# Get a list of downloaded XML files
xml_files=$(ls *.xml)
# Iterate over the XML files and perform the tv_cat command
for xml_file in $xml_files; do
tv_cat guide.xml $xml_file > guide.xml
done
- name: 🪪 Identify
run: |
git config --global user.email "[email protected]"
git config --global user.name "${GITHUB_ACTOR}"
- name: Clean
run: |
git checkout --orphan latest_branch
git add -A
git commit -am "${{ steps.date.outputs.DATE }} - ${{ steps.quote.outputs.TITLE }}"
git branch -D main
git branch -m main
git push -f origin main