Make EPG #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Make EPG | |
on: | |
# schedule: | |
# - cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
epg: | |
name: Make EPG | |
runs-on: ubuntu-latest | |
steps: | |
# - 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: Download Other EPG | |
run: | | |
# cd .wg++ | |
# Specify the path to the epg.txt file | |
epg_file="config/epg.txt" | |
# Read the URLs from the epg.txt file | |
urls=$(cat $epg_file) | |
# Iterate over the URLs and download the XML files | |
for url in $urls; do | |
wget $url | |
done | |
- name: Install xmltv | |
run: | | |
sudo apt update | |
sudo apt -y install xmltv | |
- name: Merge EPG | |
run: | | |
# cd .wg++ | |
# 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 |