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
8ea86108
Commit
8ea86108
authored
Oct 10, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
format
parent
0ec3e1ff
Pipeline
#913
passed with stages
in 2 minutes and 17 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
src/dbreader.ts
src/dbreader.ts
+12
-12
No files found.
src/dbreader.ts
View file @
8ea86108
...
...
@@ -50,17 +50,17 @@ export class DBReader extends Base {
private
async
openOutputDatabase
()
{
const
fullPath
=
`
${
this
.
config
.
outputPath
}
/expansions/cn.cdb`
;
const
createDirectoryPaths
=
[
`
${
this
.
config
.
outputPath
}
/deck/cn`
,
`
${
this
.
config
.
outputPath
}
/expansions`
];
for
(
let
createDirectoryPath
of
createDirectoryPaths
)
{
try
{
await
fs
.
access
(
createDirectoryPath
);
}
catch
(
e
)
{
this
.
log
.
debug
(
`Creating directory
${
createDirectoryPath
}
...`
);
await
fs
.
mkdir
(
createDirectoryPath
,
{
recursive
:
true
});
}
}
`
${
this
.
config
.
outputPath
}
/deck/cn`
,
`
${
this
.
config
.
outputPath
}
/expansions`
];
for
(
let
createDirectoryPath
of
createDirectoryPaths
)
{
try
{
await
fs
.
access
(
createDirectoryPath
);
}
catch
(
e
)
{
this
.
log
.
debug
(
`Creating directory
${
createDirectoryPath
}
...`
);
await
fs
.
mkdir
(
createDirectoryPath
,
{
recursive
:
true
});
}
}
try
{
await
fs
.
unlink
(
fullPath
);
}
catch
(
e
)
{
}
...
...
@@ -123,7 +123,7 @@ export class DBReader extends Base {
this
.
log
.
debug
(
`Reading card
${
code
}
.`
);
const
datas
=
await
this
.
cndb
.
get
(
"
select * from datas where id = ?
"
,
[
code
]);
const
texts
=
await
this
.
cndb
.
get
(
"
select * from texts where id = ?
"
,
[
code
]);
texts
.
desc
+=
'
\r\n\r\n\
u2605简体中文卡
'
;
texts
.
desc
+=
'
\r\n\r\n\
u2605简体中文卡
'
;
const
datasArray
=
this
.
getDatasArray
(
datas
);
const
textsArray
=
this
.
getTextsArray
(
texts
);
return
[
...
...
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