-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from ne-peer/feat/dere-guide-api
[update] starlight db api connection
- Loading branch information
Showing
24 changed files
with
79,081 additions
and
87,563 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
18 changes: 18 additions & 0 deletions
18
resource/db/maintenance/02_json-converter/inject_sldb-list_to_overview.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const sldbJson = ``; | ||
const sldb = JSON.parse(sldbJson)['result']; | ||
|
||
const overviewJson = ``; | ||
const ov = JSON.parse(overviewJson); | ||
|
||
const fs = require("fs"); | ||
// execute | ||
for (let sldbKey in sldb) { | ||
const cards = sldb[sldbKey]['cards']; | ||
const name = sldb[sldbKey]['kanji_spaced']; | ||
|
||
ov[name]['sldb_cards'] = cards; | ||
} | ||
console.log(ov); | ||
|
||
// export | ||
fs.writeFile('out.json', JSON.stringify(ov)); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.