mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Delete unused scripts
This commit is contained in:
parent
e68df665c2
commit
9cfc51cac3
7 changed files with 0 additions and 576 deletions
|
@ -1,31 +0,0 @@
|
|||
const { file, parser, logger } = require('../../core')
|
||||
const { program } = require('commander')
|
||||
const _ = require('lodash')
|
||||
|
||||
const LOGS_DIR = process.env.LOGS_DIR || 'scripts/logs'
|
||||
const OUTPUT_DIR = process.env.OUTPUT_DIR || '.api'
|
||||
|
||||
async function main() {
|
||||
let guides = []
|
||||
|
||||
const logPath = `${LOGS_DIR}/guides/update.log`
|
||||
const results = await parser.parseLogs(logPath)
|
||||
|
||||
for (const result of results) {
|
||||
guides.push({
|
||||
channel: result.channel,
|
||||
site: result.site,
|
||||
lang: result.lang,
|
||||
days: result.days,
|
||||
url: `https://iptv-org.github.io/epg/guides/${result.filename}.xml`
|
||||
})
|
||||
}
|
||||
|
||||
guides = _.sortBy(guides, 'channel')
|
||||
|
||||
const outputFilepath = `${OUTPUT_DIR}/guides.json`
|
||||
await file.create(outputFilepath, JSON.stringify(guides))
|
||||
logger.info(`saved to "${outputFilepath}"...`)
|
||||
}
|
||||
|
||||
main()
|
Loading…
Add table
Add a link
Reference in a new issue