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
神之吹息
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
Changes
1
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 {
...
@@ -50,17 +50,17 @@ export class DBReader extends Base {
private
async
openOutputDatabase
()
{
private
async
openOutputDatabase
()
{
const
fullPath
=
`
${
this
.
config
.
outputPath
}
/expansions/cn.cdb`
;
const
fullPath
=
`
${
this
.
config
.
outputPath
}
/expansions/cn.cdb`
;
const
createDirectoryPaths
=
[
const
createDirectoryPaths
=
[
`
${
this
.
config
.
outputPath
}
/deck/cn`
,
`
${
this
.
config
.
outputPath
}
/deck/cn`
,
`
${
this
.
config
.
outputPath
}
/expansions`
`
${
this
.
config
.
outputPath
}
/expansions`
];
];
for
(
let
createDirectoryPath
of
createDirectoryPaths
)
{
for
(
let
createDirectoryPath
of
createDirectoryPaths
)
{
try
{
try
{
await
fs
.
access
(
createDirectoryPath
);
await
fs
.
access
(
createDirectoryPath
);
}
catch
(
e
)
{
}
catch
(
e
)
{
this
.
log
.
debug
(
`Creating directory
${
createDirectoryPath
}
...`
);
this
.
log
.
debug
(
`Creating directory
${
createDirectoryPath
}
...`
);
await
fs
.
mkdir
(
createDirectoryPath
,
{
recursive
:
true
});
await
fs
.
mkdir
(
createDirectoryPath
,
{
recursive
:
true
});
}
}
}
}
try
{
try
{
await
fs
.
unlink
(
fullPath
);
await
fs
.
unlink
(
fullPath
);
}
catch
(
e
)
{
}
}
catch
(
e
)
{
}
...
@@ -123,7 +123,7 @@ export class DBReader extends Base {
...
@@ -123,7 +123,7 @@ export class DBReader extends Base {
this
.
log
.
debug
(
`Reading card
${
code
}
.`
);
this
.
log
.
debug
(
`Reading card
${
code
}
.`
);
const
datas
=
await
this
.
cndb
.
get
(
"
select * from datas where id = ?
"
,
[
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
]);
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
datasArray
=
this
.
getDatasArray
(
datas
);
const
textsArray
=
this
.
getTextsArray
(
texts
);
const
textsArray
=
this
.
getTextsArray
(
texts
);
return
[
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