mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 10:26:41 -05:00
Update create-matrix.js
This commit is contained in:
@@ -1,21 +1,26 @@
|
||||
const file = require('./file')
|
||||
const parser = require('./parser')
|
||||
|
||||
file.list('sites/*.channels.xml', ['sites/andorradifusio.ad.channels.xml']).then(files => {
|
||||
const matrix = {
|
||||
site: [],
|
||||
country: []
|
||||
}
|
||||
file
|
||||
.list('sites/*.channels.xml', [
|
||||
'sites/andorradifusio.ad.channels.xml',
|
||||
'sites/arianaafgtv.com.channels.xml'
|
||||
])
|
||||
.then(files => {
|
||||
const matrix = {
|
||||
site: [],
|
||||
country: []
|
||||
}
|
||||
|
||||
files.forEach(filename => {
|
||||
const channelsFile = file.read(filename)
|
||||
const parsed = parser.parseChannels(channelsFile)
|
||||
parsed.groups.forEach(group => {
|
||||
matrix.site.push(parsed.site)
|
||||
matrix.country.push(group.country.toLowerCase())
|
||||
files.forEach(filename => {
|
||||
const channelsFile = file.read(filename)
|
||||
const parsed = parser.parseChannels(channelsFile)
|
||||
parsed.groups.forEach(group => {
|
||||
matrix.site.push(parsed.site)
|
||||
matrix.country.push(group.country.toLowerCase())
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
const output = `::set-output name=matrix::${JSON.stringify(matrix)}`
|
||||
console.log(output)
|
||||
})
|
||||
const output = `::set-output name=matrix::${JSON.stringify(matrix)}`
|
||||
console.log(output)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user