mirror of
https://github.com/iptv-org/epg
synced 2025-12-17 10:56:57 -05:00
Update update-readme.js
This commit is contained in:
@@ -8,6 +8,7 @@ const _ = require('lodash')
|
|||||||
let log = []
|
let log = []
|
||||||
|
|
||||||
const LOGS_DIR = process.env.LOGS_DIR || 'scripts/logs'
|
const LOGS_DIR = process.env.LOGS_DIR || 'scripts/logs'
|
||||||
|
const LOG_PATH = `${LOGS_DIR}/update-guides.log`
|
||||||
|
|
||||||
const options = program
|
const options = program
|
||||||
.option('-c, --config <config>', 'Set path to config file', '.readme/config.json')
|
.option('-c, --config <config>', 'Set path to config file', '.readme/config.json')
|
||||||
@@ -17,6 +18,11 @@ const options = program
|
|||||||
async function main() {
|
async function main() {
|
||||||
await setUp()
|
await setUp()
|
||||||
|
|
||||||
|
if (!log.length) {
|
||||||
|
logger.error(`File "${LOG_PATH}" is empty`)
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
await generateCountriesTable()
|
await generateCountriesTable()
|
||||||
await generateUSStatesTable()
|
await generateUSStatesTable()
|
||||||
await generateCanadaProvincesTable()
|
await generateCanadaProvincesTable()
|
||||||
@@ -107,5 +113,5 @@ async function updateReadme() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function setUp() {
|
async function setUp() {
|
||||||
log = await parser.parseLogs(`${LOGS_DIR}/update-guides.log`)
|
log = await parser.parseLogs(LOG_PATH)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user