Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
celetor committed Nov 29, 2023
0 parents commit e9a3ea1
Show file tree
Hide file tree
Showing 24 changed files with 2,713,760 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/epg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: EPG

on:
schedule:
- cron: 6 * * * *
push:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main

- name: export xml-file
working-directory: xml
run: curl -ssL https://epg.112114.xyz/pp.xml -o e.xml

- name: xml to json
run: |
pip3 install -r requirements.txt
python3 xml2json.py
- name: copy file
run: |
now_date=$(date -u -d '+8 hour' '+%Y-%m-%d')
cp -f ./xml/e.xml ./xml/e_$now_date.xml
cp -f ./json/e.json ./json/e_$now_date.json
- name: Commit
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
sed "2c * 更新时间: $(date -u -d '+8 hour' '+%Y-%m-%d %H:%M:%S')" README.md -i
git add --all
git commit -m "update"
git push -f origin main
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.idea/
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* 节目表
* 更新时间: 2023-11-29 19:48:04
* 数据来自[https://epg.112114.xyz](https://epg.112114.xyz),为减轻服务器负担,将2023/11/22(含)以后的数据保存至本项目
Loading

0 comments on commit e9a3ea1

Please sign in to comment.