Update update.js

This commit is contained in:
Aleksandr Statciuk 2023-02-08 03:55:01 +03:00
parent dc986a9d09
commit b7245b18f3

View file

@ -91,15 +91,12 @@ async function save(filepath, programs) {
const xmlFilepath = `${PUBLIC_DIR}/guides/${filepath}.xml`
const gzFilepath = `${PUBLIC_DIR}/guides/${filepath}.xml.gz`
const jsonFilepath = `${PUBLIC_DIR}/guides/${filepath}.json`
logger.info(`creating ${xmlFilepath}...`)
const xmltv = generateXMLTV(output)
await file.create(xmlFilepath, xmltv)
logger.info(`creating ${gzFilepath}...`)
const compressed = await zip.compress(xmltv)
await file.create(gzFilepath, compressed)
logger.info(`creating ${jsonFilepath}...`)
await file.create(jsonFilepath, JSON.stringify(output))
return output
}