Skip to content

Commit

Permalink
⚡ epg
Browse files Browse the repository at this point in the history
  • Loading branch information
mraniki committed Nov 4, 2023
1 parent d747df0 commit c86cbfe
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 43 deletions.
87 changes: 46 additions & 41 deletions .github/workflows/epg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,55 +5,60 @@ on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-22.04
epg:
name: Make EPG
runs-on: ubuntu-latest
steps:
- name: Download WebGrab+Plus
run: |
wget http://webgrabplus.com/sites/default/files/download/SW/V3.2.0/WebGrabPlus_V3.2_install.tar.gz
- name: Extract WebGrabPlus_V3.2_install.tar.gz
run: |
tar -zxvf WebGrabPlus_V3.2_install.tar.gz
- name: Install WebGrab+Plus
run: |
cd .wg++
./install.sh
- name: Download WebGrab++.config.xml
run: |
cd .wg++
wget -N https://raw.githubusercontent.com/LiuYi0526/IPTV/master/WebGrab++.config.xml
- name: Run
run: |
cd .wg++
./run.sh
# - 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++
wget https://xmltvfr.fr/xmltv/xmltv.xml
wget https://raw.githubusercontent.com/bebawy6/EPG/master/usEPG.xml
# 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++
tv_cat guide.xml xmltv.xml > part1.xml
tv_cat part1.xml usEPG.xml > guide_merge.xml
- name : Upload artifact
uses: actions/upload-artifact@main
with:
name: guide.xml
path: .wg++/guide.xml
- name: Git push assets to "EPG" branch
# 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: |
cd .wg++
git init
git config --local user.name "actions"
git config --local user.email "[email protected]"
git checkout -b EPG
git add .
git commit -m "Update EPG"
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
git push -f -u origin EPG
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
2 changes: 0 additions & 2 deletions config/egp.txt

This file was deleted.

3 changes: 3 additions & 0 deletions config/epg.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://xmltvfr.fr/xmltv/xmltv.xml
https://raw.githubusercontent.com/bebawy6/EPG/master/usEPG.xml
https://epgshare01.online/epgshare01/epg_ripper_SG1.xml.gz

0 comments on commit c86cbfe

Please sign in to comment.