mirror of
https://github.com/tcgdex/compiler.git
synced 2025-04-22 10:42:09 +00:00
Changed logs to be quieter
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
821bfecd71
commit
853feeb904
8
main.ts
8
main.ts
@ -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')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})()
|
})()
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user