Commit 8ea86108 authored by nanahira's avatar nanahira

format

parent 0ec3e1ff
Pipeline #913 passed with stages
in 2 minutes and 17 seconds
...@@ -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 [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment