Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-custom-free
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alstroemeria-silentlove
ygopro-custom-free
Commits
87e27cd8
Commit
87e27cd8
authored
Mar 16, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add welcome updater
parent
0d056579
Pipeline
#33681
failed with stages
in 1 minute and 2 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
1 deletion
+53
-1
.gitlab-ci.yml
.gitlab-ci.yml
+12
-0
README.md
README.md
+4
-0
run.sh
run.sh
+1
-1
update-welcome.py
update-welcome.py
+36
-0
No files found.
.gitlab-ci.yml
View file @
87e27cd8
...
@@ -78,3 +78,15 @@ deploy_to_finale:
...
@@ -78,3 +78,15 @@ deploy_to_finale:
SERVER_HOST
:
diyfree.momobako.com
SERVER_HOST
:
diyfree.momobako.com
SERVER_USER
:
root
SERVER_USER
:
root
SERVER_PATH
:
~/ygopro-custom-free/expansions
SERVER_PATH
:
~/ygopro-custom-free/expansions
update_welcome
:
stage
:
deploy
tags
:
-
linux
dependencies
:
-
check
script
:
-
python update-welcome.py
only
:
-
master
-
tags
README.md
View file @
87e27cd8
...
@@ -13,6 +13,10 @@
...
@@ -13,6 +13,10 @@
-
[
ZIP 文件
](
https://cdn02.moecube.com/ygopro-custom-free/ygopro-custom-free.zip
)
-
[
ZIP 文件
](
https://cdn02.moecube.com/ygopro-custom-free/ygopro-custom-free.zip
)
-
单独文件下载:
`https://cdn02.moecube.com/ygopro-custom-free/contents/`
-
单独文件下载:
`https://cdn02.moecube.com/ygopro-custom-free/contents/`
ZIP 形式的整合包里面包含下面的额外文件:
-
`version.txt`
: 记录了整合日期,以便大家检查是不是最新的。
-
`redtexts`
: 记录了各仓库的红字信息,这些卡没有被整合。
## 上传卡片
## 上传卡片
1.
制作自己的 DIY 卡仓库,放置在 GitHub 或者 MCGit 下。仓库需要包含:
1.
制作自己的 DIY 卡仓库,放置在 GitHub 或者 MCGit 下。仓库需要包含:
...
...
run.sh
View file @
87e27cd8
...
@@ -98,4 +98,4 @@ for file in repos/*.txt; do
...
@@ -98,4 +98,4 @@ for file in repos/*.txt; do
done
done
echo
"Finished processing all repos"
echo
"Finished processing all repos"
echo
"
Date:
$(
date
)
"
>
dist/version.txt
echo
"
YGOPro Custom Free Server - Updated at
$(
date
)
"
>
dist/version.txt
update-welcome.py
0 → 100644
View file @
87e27cd8
import
os
import
requests
# 读取环境变量
USERNAME
=
os
.
environ
.
get
(
"SRVPRO_USERNAME"
,
""
)
.
strip
()
PASSWORD
=
os
.
environ
.
get
(
"SRVPRO_PASSWORD"
,
""
)
.
strip
()
# 读取 version.txt 内容
def
get_version_content
():
try
:
with
open
(
"dist/version.txt"
,
"r"
,
encoding
=
"utf-8"
)
as
file
:
return
file
.
read
()
.
strip
()
except
FileNotFoundError
:
print
(
"Error: version.txt not found!"
)
exit
(
1
)
# 构造请求参数
def
send_request
():
url
=
"https://diyfree.momobako.com:11922/api/message"
params
=
{
"welcome"
:
get_version_content
(),
"username"
:
USERNAME
,
"pass"
:
PASSWORD
}
try
:
response
=
requests
.
get
(
url
,
params
=
params
,
timeout
=
10
)
# 10 秒超时
response
.
raise_for_status
()
# 如果状态码不是 200-299,则抛出异常
print
(
"Response Status:"
,
response
.
status_code
)
print
(
"Response Body:"
,
response
.
text
)
except
requests
.
exceptions
.
RequestException
as
e
:
print
(
f
"Request failed: {e}"
)
exit
(
1
)
if
__name__
==
"__main__"
:
send_request
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment