-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* progress * trying to reconcile main branchs * created script to get enka files * added cyno and nilou * cleanup
- Loading branch information
Showing
7 changed files
with
2,755 additions
and
2,521 deletions.
There are no files selected for viewing
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
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
32 changes: 32 additions & 0 deletions
32
app/src/Components/Enka/GenshinData/DownloadFromEnkaScript.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,32 @@ | ||
const fs = require('fs'); | ||
const https = require('https'); | ||
let url = 'https://raw.githubusercontent.com/EnkaNetwork/API-docs/master/store/characters.json'; | ||
https.get(url,(res) => { | ||
// Image will be stored at this path | ||
const path = `./src/Components/Enka/GenshinData/EnkaCharacterMap.json`; | ||
const filePath = fs.createWriteStream(path); | ||
res.pipe(filePath); | ||
filePath.on('finish',() => { | ||
filePath.close(); | ||
console.log('Download Completed'); | ||
}) | ||
}) | ||
|
||
url = 'https://raw.githubusercontent.com/EnkaNetwork/API-docs/master/store/loc.json' | ||
https.get(url,(res) => { | ||
// Image will be stored at this path | ||
const path = `./src/Components/Enka/GenshinData/EnkaTextMapEN.json`; | ||
// use key "en" to extract english json | ||
var str = '' | ||
res.on('data', (data) => { | ||
str += data | ||
}) | ||
res.on('end', async function() { | ||
var json = JSON.parse(str) | ||
var en = json['en'] | ||
fs.writeFileSync( | ||
'./src/Components/Enka/GenshinData/EnkaTextMapEN.json', | ||
JSON.stringify({"en":en}) | ||
); | ||
}) | ||
}) |
Oops, something went wrong.