Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-cn-database-generator
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
MyCard
ygopro-cn-database-generator
Commits
93a34cdb
Commit
93a34cdb
authored
Oct 24, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
generate all locale data
parent
1696f378
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
15 deletions
+35
-15
.gitlab-ci.yml
.gitlab-ci.yml
+33
-13
README.md
README.md
+1
-1
src/config.ts
src/config.ts
+1
-1
No files found.
.gitlab-ci.yml
View file @
93a34cdb
...
@@ -6,20 +6,38 @@ variables:
...
@@ -6,20 +6,38 @@ variables:
GIT_DEPTH
:
"
1"
GIT_DEPTH
:
"
1"
POST_DEPTH
:
10
POST_DEPTH
:
10
generate
:
zh-CN
:
stage
:
generate
stage
:
generate
tags
:
tags
:
-
linux
-
linux
image
:
node
image
:
node
script
:
variables
:
-
apt update ; apt -y install build-essential python3 sqlite3 git tar
LOCALE
:
zh-CN
-
git clone --depth=1 https://code.mycard.moe/mycard/ygopro-database
script
:
./ci-scripts/generate.sh
-
npm ci
artifacts
:
-
npm run build
paths
:
-
npm start
-
output
-
cd output
-
tar zcvf cn-data.tar.gz deck expansions
en-US
:
-
cd ..
stage
:
generate
tags
:
-
linux
image
:
node
variables
:
LOCALE
:
en-US
script
:
./ci-scripts/generate.sh
artifacts
:
paths
:
-
output
ja-JP
:
stage
:
generate
tags
:
-
linux
image
:
node
variables
:
LOCALE
:
ja-JP
script
:
./ci-scripts/generate.sh
artifacts
:
artifacts
:
paths
:
paths
:
-
output
-
output
...
@@ -27,7 +45,9 @@ generate:
...
@@ -27,7 +45,9 @@ generate:
upload_to_minio
:
upload_to_minio
:
stage
:
deploy
stage
:
deploy
dependencies
:
dependencies
:
-
generate
-
zh-CN
-
en-US
-
ja-JP
tags
:
tags
:
-
linux
-
linux
image
:
python
image
:
python
...
@@ -40,7 +60,7 @@ upload_to_minio:
...
@@ -40,7 +60,7 @@ upload_to_minio:
deploy_to_ygopro_server
:
deploy_to_ygopro_server
:
stage
:
deploy
stage
:
deploy
dependencies
:
dependencies
:
-
generate
-
zh-CN
tags
:
tags
:
-
linux
-
linux
script
:
script
:
...
@@ -50,6 +70,6 @@ deploy_to_ygopro_server:
...
@@ -50,6 +70,6 @@ deploy_to_ygopro_server:
-
ssh-keyscan koishi.momobako.com >> ~/.ssh/known_hosts
-
ssh-keyscan koishi.momobako.com >> ~/.ssh/known_hosts
-
echo $NANAHIRA_SSH_KEY | base64 --decode > ~/.ssh/id_rsa
-
echo $NANAHIRA_SSH_KEY | base64 --decode > ~/.ssh/id_rsa
-
chmod 600 ~/.ssh/*
-
chmod 600 ~/.ssh/*
-
rsync -4cavzP --delete output/expansions/ nanahira@koishi.momobako.com:~/ygopro-cn/expansions
-
rsync -4cavzP --delete output/
zh-CN/
expansions/ nanahira@koishi.momobako.com:~/ygopro-cn/expansions
only
:
only
:
-
master
-
master
README.md
View file @
93a34cdb
...
@@ -20,6 +20,6 @@ By default, configurations are not needed for default settings. Configurations a
...
@@ -20,6 +20,6 @@ By default, configurations are not needed for default settings. Configurations a
*
`POST_DEPTH`
How many pages it would read in the homepage of NWBBS.
*
`POST_DEPTH`
How many pages it would read in the homepage of NWBBS.
*
`
CN_DATABASE
_PATH`
`JP_DATABASE_PATH`
Japanese and Chinese database path.
*
`
SOURCE_TARGET
_PATH`
`JP_DATABASE_PATH`
Japanese and Chinese database path.
*
`OUTPUT_PATH`
Output path.
*
`OUTPUT_PATH`
Output path.
src/config.ts
View file @
93a34cdb
...
@@ -13,7 +13,7 @@ export async function loadConfig(): Promise<Config> {
...
@@ -13,7 +13,7 @@ export async function loadConfig(): Promise<Config> {
return
{
return
{
postDepth
:
process
.
env
.
POST_DEPTH
?
parseInt
(
process
.
env
.
POST_DEPTH
)
:
5
,
postDepth
:
process
.
env
.
POST_DEPTH
?
parseInt
(
process
.
env
.
POST_DEPTH
)
:
5
,
jpDatabasePath
:
process
.
env
.
JP_DATABASE_PATH
||
"
./ygopro-database/locales/ja-JP/cards.cdb
"
,
jpDatabasePath
:
process
.
env
.
JP_DATABASE_PATH
||
"
./ygopro-database/locales/ja-JP/cards.cdb
"
,
cnDatabasePath
:
process
.
env
.
CN_DATABASE
_PATH
||
"
./ygopro-database/locales/zh-CN/cards.cdb
"
,
cnDatabasePath
:
process
.
env
.
SOURCE_TARGET
_PATH
||
"
./ygopro-database/locales/zh-CN/cards.cdb
"
,
outputPath
:
process
.
env
.
OUTPUT_PATH
||
"
./output
"
outputPath
:
process
.
env
.
OUTPUT_PATH
||
"
./output
"
}
}
}
}
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