From c86cbfe6200d8330d653d5a88963a5e09fc30a41 Mon Sep 17 00:00:00 2001 From: mraniki <8766259+mraniki@users.noreply.github.com> Date: Sat, 4 Nov 2023 16:38:53 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20epg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/epg.yml | 87 +++++++++++++++++++++------------------ config/egp.txt | 2 - config/epg.txt | 3 ++ 3 files changed, 49 insertions(+), 43 deletions(-) delete mode 100644 config/egp.txt create mode 100644 config/epg.txt diff --git a/.github/workflows/epg.yml b/.github/workflows/epg.yml index dec2486..b4bd92b 100644 --- a/.github/workflows/epg.yml +++ b/.github/workflows/epg.yml @@ -5,32 +5,35 @@ 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: | @@ -38,22 +41,24 @@ jobs: 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 "action@github.com" + 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 "action@github.com" - 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 diff --git a/config/egp.txt b/config/egp.txt deleted file mode 100644 index bb7005f..0000000 --- a/config/egp.txt +++ /dev/null @@ -1,2 +0,0 @@ -https://epgshare01.online/epgshare01/epg_ripper_SG1.xml.gz -https://epgshare01.online/epgshare01/epg_ripper_US1.xml.gz diff --git a/config/epg.txt b/config/epg.txt new file mode 100644 index 0000000..ba1e484 --- /dev/null +++ b/config/epg.txt @@ -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