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
0069742e
Commit
0069742e
authored
Feb 12, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add 706
parent
7fd31f1e
Pipeline
#33142
failed with stages
in 5 minutes and 56 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
182 additions
and
9 deletions
+182
-9
.gitignore
.gitignore
+2
-1
.gitlab-ci.yml
.gitlab-ci.yml
+17
-0
ci-scripts/generate.sh
ci-scripts/generate.sh
+9
-1
extras/env706/lflist.conf
extras/env706/lflist.conf
+140
-0
subenv.ts
subenv.ts
+14
-7
No files found.
.gitignore
View file @
0069742e
...
...
@@ -104,8 +104,9 @@ dist
.tern-port
/build
/output
/output
*
/config.yaml
/ygopro-*
/pack.db
/lflist.conf
.gitlab-ci.yml
View file @
0069742e
...
...
@@ -50,6 +50,16 @@ env408:
FILE_SYMBOL
:
'
env408'
OVERRIDE_TEXT_DB_PATH
:
./extras/2012.cdb
env706
:
extends
:
.task
variables
:
LOCALE
:
zh-CN
NPM_SCRIPT
:
start:subenv
DATE
:
'
2011-08-20'
CARD_SYMBOL
:
'
706环境'
FILE_SYMBOL
:
'
env706'
OVERRIDE_TEXT_DB_PATH
:
./extras/2012.cdb
upload_to_minio
:
stage
:
deploy
dependencies
:
...
...
@@ -58,6 +68,7 @@ upload_to_minio:
-
ja-JP
-
ko-KR
-
env408
-
env706
tags
:
-
linux
script
:
...
...
@@ -88,6 +99,12 @@ upload_to_minio:
deploy_server_env408
:
extends
:
.deploy_server
deploy_server_env706
:
extends
:
.deploy_server
variables
:
OUTPUT_ENV
:
env706-zh-CN
SERVER_IDENTIFIER
:
'
706'
.deploy_mycard
:
stage
:
deploy
dependencies
:
...
...
ci-scripts/generate.sh
View file @
0069742e
...
...
@@ -9,6 +9,7 @@ export OUTPUT_PATH="./output/$FILE_SYMBOL-$LOCALE"
apt update
;
apt
-y
install
build-essential python3 sqlite3 git
tar
git clone
--depth
=
1 https://code.mycard.moe/mycard/ygopro-database
wget
-O
pack.db https://cdn02.moecube.com:444/ygopro-card-list/pack.db
wget
-O
lflist.conf https://cdn02.moecube.com:444/ygopro-database/zh-CN/lflist.conf
cp
-rf
./ygopro-database/locales/ja-JP/cards.cdb
"
$JP_DATABASE_PATH
"
...
...
@@ -20,4 +21,11 @@ cp -rf ./extras/$FILE_SYMBOL/injects/* "$OUTPUT_PATH/" || true
cd
"
$OUTPUT_PATH
"
tar
zcvf
"../
$FILE_SYMBOL
-data-
$LOCALE
.tar.gz"
deck expansions
cd
..
7z a
-mx9
"../
$FILE_SYMBOL
-data-
$LOCALE
.zip"
deck expansions
7z a
-mx9
"../
$FILE_SYMBOL
-data-
$LOCALE
.7z"
deck expansions
cd
expansions
7z a
-mx9
../../
$FILE_SYMBOL
-expansions-
$LOCALE
-ypk
.zip
*
.cdb
cd
../..
mv
$FILE_SYMBOL
-expansions-
$LOCALE
-ypk
.zip
$FILE_SYMBOL
-expansions-
$LOCALE
.ypk
extras/env706/lflist.conf
0 → 100644
View file @
0069742e
#[2011.3.1]
!
2011
.
3
.
1
#forbidden
72989439
0
82301904
0
40737112
0
44910027
0
21593977
0
33184167
0
34853266
0
78010363
0
14878871
0
34124316
0
78706415
0
69015963
0
3078576
0
31560081
0
34206604
0
56570271
0
8131171
0
20663556
0
4031928
0
12580477
0
17375316
0
18144506
0
19613556
0
23557835
0
42829885
0
44763025
0
46411259
0
55144522
0
60682203
0
74191942
0
79571449
0
85602018
0
87910978
0
29762407
0
34906152
0
41482598
0
57953380
0
45986603
0
69243953
0
70828912
0
3280747
0
17484499
0
28566710
0
35316708
0
57728570
0
83555666
0
61740673
0
63519819
0
32646477
0
7391448
0
#limit
7902349
1
8124921
1
44519536
1
70903634
1
98777036
1
65192027
1
44330098
1
40044918
1
92826944
1
41470137
1
28297833
1
37742478
1
423585
1
85215458
1
2009101
1
33396948
1
95503687
1
26202165
1
80344569
1
4906301
1
31305911
1
15341821
1
16226786
1
33508719
1
33420078
1
96782886
1
1475311
1
2295440
1
32807846
1
37520316
1
42703248
1
43040603
1
45809008
1
53129443
1
58577036
1
72302403
1
72892473
1
81439173
1
83764718
1
94886282
1
46052429
1
14087893
1
23171610
1
48976825
1
67723438
1
73915051
1
3136426
1
27970830
1
66957584
1
77565204
1
91351370
1
52687916
1
50321796
1
15800838
1
27174286
1
32723153
1
36468556
1
44095762
1
46652477
1
53582587
1
64697231
1
17078030
1
85742772
1
93016201
1
97077563
1
41420027
1
#semi limit
57774843
2
59509952
2
9411399
2
14943837
2
48686504
2
85087012
2
23205979
2
3659803
2
72405967
2
98494543
2
5318639
2
91623717
2
22046459
2
29401950
2
29843091
2
53567095
2
62279055
2
84749824
2
subenv.ts
View file @
0069742e
import
{
DBReader
}
from
"
./src/dbreader
"
;
import
{
Card
,
DBReader
}
from
"
./src/dbreader
"
;
import
_
from
"
lodash
"
;
import
{
PackDbFetcher
}
from
"
./src/packdbfetcher
"
;
import
axios
from
"
axios
"
;
import
{
Banlist
,
mergeBanlists
,
readLFList
}
from
"
./src/utility
"
;
import
moment
from
"
moment
"
;
import
fs
from
'
fs
'
;
const
DATE
=
process
.
env
.
DATE
;
const
lflistPath
=
process
.
env
.
LFLIST_PATH
||
"
./lflist.conf
"
;
const
includes
=
(
process
.
env
.
INCLUDES
||
""
).
split
(
"
,
"
).
filter
(
i
=>
i
).
map
(
i
=>
parseInt
(
i
.
trim
()));
const
excludes
=
new
Set
((
process
.
env
.
EXCLUDES
||
""
).
split
(
"
,
"
).
filter
(
i
=>
i
).
map
(
i
=>
parseInt
(
i
.
trim
())));
async
function
getBanlist
()
{
const
lflistReq
=
await
axios
.
get
<
string
>
(
"
https://cdn02.moecube.com:444/ygopro-database/zh-CN/lflist.conf
"
,
{
responseType
:
'
document
'
});
const
lflists
=
(
await
readLFList
(
lflistReq
.
data
)).
filter
(
l
=>
!
l
.
name
.
includes
(
'
TCG
'
)).
map
(
l
=>
({
const
lflistData
=
await
fs
.
promises
.
readFile
(
lflistPath
,
'
utf-8
'
);
const
lflists
=
(
await
readLFList
(
lflistData
)).
filter
(
l
=>
!
l
.
name
.
includes
(
'
TCG
'
)).
map
(
l
=>
({
...
l
,
date
:
moment
(
l
.
name
.
split
(
'
'
)[
0
],
'
YYYY.MM
'
)
})).
filter
(
l
=>
l
.
date
.
isBefore
(
DATE
));
...
...
@@ -32,7 +32,14 @@ async function main() {
//level: Logger.DEBUG
});
await
dbreader
.
init
();
const
cards
=
await
PackDbFetcher
.
fetchOnce
(
dbreader
,
`date <= '
${
DATE
}
'`
);
const
cards
=
(
await
PackDbFetcher
.
fetchOnce
(
dbreader
,
`date <= '
${
DATE
}
'`
))
.
filter
(
c
=>
!
excludes
.
has
(
c
.
code
));
const
existingIds
=
new
Set
(
cards
.
map
(
c
=>
c
.
code
));
for
(
const
include
of
includes
)
{
if
(
!
existingIds
.
has
(
include
))
{
cards
.
push
(
new
Card
(
include
));
}
}
console
.
log
(
cards
.
length
);
const
extraBanlist
=
await
getBanlist
();
...
...
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