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
0ec3e1ff
Commit
0ec3e1ff
authored
Oct 09, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change path
parent
d0f17449
Pipeline
#898
passed with stages
in 2 minutes and 51 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
11 deletions
+16
-11
.gitlab-ci.yml
.gitlab-ci.yml
+2
-2
src/dbreader.ts
src/dbreader.ts
+14
-9
No files found.
.gitlab-ci.yml
View file @
0ec3e1ff
...
@@ -18,7 +18,7 @@ generate:
...
@@ -18,7 +18,7 @@ generate:
-
npm run build
-
npm run build
-
npm start
-
npm start
-
cd output
-
cd output
-
tar zcvf cn-data.tar.gz deck
cn.cdb lflist.conf
-
tar zcvf cn-data.tar.gz deck
expansions
-
cd ..
-
cd ..
artifacts
:
artifacts
:
paths
:
paths
:
...
@@ -50,6 +50,6 @@ deploy_to_ygopro_server:
...
@@ -50,6 +50,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
--exclude=cn-data.tar.gz --exclude=deck output
/ nanahira@koishi.momobako.com:~/ygopro-cn/expansions
-
rsync -4cavzP --delete
output/expansions
/ nanahira@koishi.momobako.com:~/ygopro-cn/expansions
only
:
only
:
-
master
-
master
src/dbreader.ts
View file @
0ec3e1ff
...
@@ -48,14 +48,19 @@ export class DBReader extends Base {
...
@@ -48,14 +48,19 @@ export class DBReader extends Base {
}
}
}
}
private
async
openOutputDatabase
()
{
private
async
openOutputDatabase
()
{
const
fullPath
=
`
${
this
.
config
.
outputPath
}
/cn.cdb`
;
const
fullPath
=
`
${
this
.
config
.
outputPath
}
/expansions/cn.cdb`
;
const
createDirectoryPath
=
`
${
this
.
config
.
outputPath
}
/deck/cn`
;
const
createDirectoryPaths
=
[
try
{
`
${
this
.
config
.
outputPath
}
/deck/cn`
,
await
fs
.
access
(
createDirectoryPath
);
`
${
this
.
config
.
outputPath
}
/expansions`
}
catch
(
e
)
{
];
this
.
log
.
debug
(
`Creating directory
${
createDirectoryPath
}
...`
);
for
(
let
createDirectoryPath
of
createDirectoryPaths
)
{
await
fs
.
mkdir
(
createDirectoryPath
,
{
recursive
:
true
});
try
{
}
await
fs
.
access
(
createDirectoryPath
);
}
catch
(
e
)
{
this
.
log
.
debug
(
`Creating directory
${
createDirectoryPath
}
...`
);
await
fs
.
mkdir
(
createDirectoryPath
,
{
recursive
:
true
});
}
}
try
{
try
{
await
fs
.
unlink
(
fullPath
);
await
fs
.
unlink
(
fullPath
);
}
catch
(
e
)
{
}
}
catch
(
e
)
{
}
...
@@ -145,7 +150,7 @@ export class DBReader extends Base {
...
@@ -145,7 +150,7 @@ export class DBReader extends Base {
]
]
}
}
]);
]);
await
fs
.
writeFile
(
`
${
this
.
config
.
outputPath
}
/lflist.conf`
,
banlistString
);
await
fs
.
writeFile
(
`
${
this
.
config
.
outputPath
}
/
expansions/
lflist.conf`
,
banlistString
);
}
}
private
async
checkExtraDeckCards
(
code
:
number
)
{
private
async
checkExtraDeckCards
(
code
:
number
)
{
const
sql
=
`select id from datas where type & (0x4000000 | 0x800000 | 0x2000 | 0x40) > 0 AND id = ?`
;
const
sql
=
`select id from datas where type & (0x4000000 | 0x800000 | 0x2000 | 0x40) > 0 AND id = ?`
;
...
...
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