Skip to content

Commit bbd54b8

Browse files
committed
.
0 parents  commit bbd54b8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+4072
-0
lines changed

.github/workflows/update.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Update JSON Files - CI
2+
3+
on:
4+
schedule:
5+
# 每周日凌晨 0 点执行一次
6+
- cron: "0 0 * * 0"
7+
push:
8+
paths-ignore:
9+
- "LICENSE"
10+
- "README.md"
11+
- "README_**"
12+
- "README-**"
13+
branches:
14+
- main
15+
workflow_dispatch:
16+
17+
permissions:
18+
contents: write
19+
20+
jobs:
21+
download-and-upload:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
# 检出需要使用的代码到工作区
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
with:
29+
# 保留任何凭证(后续git push需要使用)
30+
persist-credentials: true
31+
ref: main
32+
33+
# 建立 Python 环境和包
34+
- name: Install Python, pipenv and Pipfile packages
35+
uses: palewire/install-python-pipenv-pipfile@v4
36+
with:
37+
# Netlify运行环境: https://github.com/netlify/build-image/blob/focal/included_software.md
38+
python-version: '3.8'
39+
40+
# 运行本仓库文件
41+
- name: update-json-files
42+
# # 如果是 Secrets 变量, 则启用这里的设置
43+
# env:
44+
# GPTAGENT_API_KEYS: ${{ secrets.GPTAGENT_API_KEYS }}
45+
# WEB_PLATFORM_ARGS: ${{ secrets.WEB_PLATFORM_ARGS }}
46+
run: |
47+
# 域名可以是:msdn.lopins.cn,msdn.lopins.cn/docs
48+
pipenv run python main.py -d msdn.lopins.cn
49+
50+
- name: Commit and Push
51+
run: |
52+
git diff --sparse || true
53+
if [ -n "$(git status --porcelain)" ]; then
54+
git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
55+
git config --global user.name "${{ github.actor }}"
56+
git add -A
57+
git commit -m "Updated JSON Files"
58+
git push
59+
else
60+
echo "No Required Updates"
61+
fi
62+
63+
- name: Deploy 🚀
64+
uses: peaceiris/actions-gh-pages@v4
65+
with:
66+
github_token: ${{ secrets.GITHUB_TOKEN }}
67+
publish_branch: gh-pages # default: gh-pages
68+
publish_dir: ./docs # default: public
69+
cname: msdn.lopins.cn # default: 可选:如果使用 username.github.io/repository 可以不要这个参数
70+
# user_name: 'github-actions[bot]'
71+
# user_email: 'github-actions[bot]@users.noreply.github.com'
72+
# commit_message: ${{ github.event.head_commit.message }}
73+
# full_commit_message: ${{ github.event.head_commit.message }}
74+
# enable_jekyll: true

.gitignore

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
.vercel
2+
node_modules/
3+
package-lock.json
4+
5+
# Byte-compiled / optimized / DLL files
6+
__pycache__/
7+
*.py[cod]
8+
*$py.class
9+
10+
# C extensions
11+
*.so
12+
13+
# Distribution / packaging
14+
.Python
15+
build/
16+
develop-eggs/
17+
dist/
18+
downloads/
19+
eggs/
20+
.eggs/
21+
lib/
22+
lib64/
23+
parts/
24+
sdist/
25+
var/
26+
wheels/
27+
share/python-wheels/
28+
*.egg-info/
29+
.installed.cfg
30+
*.egg
31+
MANIFEST
32+
33+
# PyInstaller
34+
# Usually these files are written by a python script from a template
35+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
36+
*.manifest
37+
*.spec
38+
39+
# Installer logs
40+
pip-log.txt
41+
pip-delete-this-directory.txt
42+
43+
# Unit test / coverage reports
44+
htmlcov/
45+
.tox/
46+
.nox/
47+
.coverage
48+
.coverage.*
49+
.cache
50+
nosetests.xml
51+
coverage.xml
52+
*.cover
53+
*.py,cover
54+
.hypothesis/
55+
.pytest_cache/
56+
cover/
57+
58+
# Translations
59+
*.mo
60+
*.pot
61+
62+
# Django stuff:
63+
*.log
64+
local_settings.py
65+
db.sqlite3
66+
db.sqlite3-journal
67+
68+
# Flask stuff:
69+
instance/
70+
.webassets-cache
71+
72+
# Scrapy stuff:
73+
.scrapy
74+
75+
# Sphinx documentation
76+
docs/_build/
77+
78+
# PyBuilder
79+
.pybuilder/
80+
target/
81+
82+
# Jupyter Notebook
83+
.ipynb_checkpoints
84+
85+
# IPython
86+
profile_default/
87+
ipython_config.py
88+
89+
# pyenv
90+
# For a library or package, you might want to ignore these files since the code is
91+
# intended to run in multiple environments; otherwise, check them in:
92+
# .python-version
93+
94+
# pipenv
95+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
96+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
97+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
98+
# install all needed dependencies.
99+
#Pipfile.lock
100+
101+
# poetry
102+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
103+
# This is especially recommended for binary packages to ensure reproducibility, and is more
104+
# commonly ignored for libraries.
105+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
106+
#poetry.lock
107+
108+
# pdm
109+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
110+
#pdm.lock
111+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
112+
# in version control.
113+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
114+
.pdm.toml
115+
.pdm-python
116+
.pdm-build/
117+
118+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
119+
__pypackages__/
120+
121+
# Celery stuff
122+
celerybeat-schedule
123+
celerybeat.pid
124+
125+
# SageMath parsed files
126+
*.sage.py
127+
128+
# Environments
129+
.env
130+
.venv
131+
env/
132+
venv/
133+
ENV/
134+
env.bak/
135+
venv.bak/
136+
137+
# Spyder project settings
138+
.spyderproject
139+
.spyproject
140+
141+
# Rope project settings
142+
.ropeproject
143+
144+
# mkdocs documentation
145+
/site
146+
147+
# mypy
148+
.mypy_cache/
149+
.dmypy.json
150+
dmypy.json
151+
152+
# Pyre type checker
153+
.pyre/
154+
155+
# pytype static type analyzer
156+
.pytype/
157+
158+
# Cython debug symbols
159+
cython_debug/
160+
161+
# PyCharm
162+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
163+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
164+
# and can be added to the global gitignore or merged into this file. For a more nuclear
165+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
166+
#.idea/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 lopins
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Pipfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[[source]]
2+
url = "https://mirrors.aliyun.com/pypi/simple"
3+
verify_ssl = true
4+
name = "pip_conf_index_global"
5+
6+
[packages]
7+
requests = "*"
8+
9+
[dev-packages]
10+
11+
[requires]
12+
python_version = "3.8"

0 commit comments

Comments
 (0)