Changed logs to be quieter

Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
Florian Bouillon 2021-04-23 15:32:48 +02:00
parent 821bfecd71
commit 853feeb904
Signed by: Florian Bouillon
GPG Key ID: 50BD648F12C86AB6
2 changed files with 6 additions and 4 deletions

View File

@ -36,14 +36,13 @@ const VERSION = 'v2'
await fs.writeFile(`${folder}/index.json`, JSON.stringify( await fs.writeFile(`${folder}/index.json`, JSON.stringify(
await endpoint.index(common) await endpoint.index(common)
)) ))
console.log(file, 'Finished Index', 'Running Item') console.log(file, 'Finished Index')
console.log(file, 'Running Item')
const item = await endpoint.item(common) const item = await endpoint.item(common)
console.log(file, 'Finished Item')
if (item) { if (item) {
for (const key of Object.keys(item)) { for (const key of Object.keys(item)) {
const val = item[key] const val = item[key]
const subFolder = `${folder}/${urlize(key)}` const subFolder = `${folder}/${urlize(key)}`
console.log(subFolder)
await fs.mkdir(subFolder, {recursive: true}) await fs.mkdir(subFolder, {recursive: true})
await fs.writeFile(`${subFolder}/index.json`, JSON.stringify(val)) await fs.writeFile(`${subFolder}/index.json`, JSON.stringify(val))
if (endpoint.sub) { if (endpoint.sub) {
@ -59,6 +58,9 @@ const VERSION = 'v2'
console.log(file, 'Finished subItem', key) console.log(file, 'Finished subItem', key)
} }
} }
console.log(file, 'Finished Item')
} else {
console.log(file, 'skipped Item')
} }
} }
})() })()

View File

@ -129,7 +129,7 @@ export async function getCards(lang: SupportedLanguages,set?: Set): Promise<Arra
const part1 = path.substr(0, path.lastIndexOf(setName) - 1) const part1 = path.substr(0, path.lastIndexOf(setName) - 1)
return part1.substr(part1.lastIndexOf('/') + 1) return part1.substr(part1.lastIndexOf('/') + 1)
})() })()
console.log(path, id, setName) // console.log(path, id, setName)
const c = await getCard(serieName, setName, id) const c = await getCard(serieName, setName, id)
if (!c.name[lang]) { if (!c.name[lang]) {
continue continue