Update create-matrix.js

This commit is contained in:
Aleksandr Statciuk 2021-10-13 06:03:12 +03:00
parent fa4fd2fa89
commit a3ff63c090

View file

@ -8,16 +8,17 @@ file
])
.then(files => {
const matrix = {
site: [],
country: []
guide: []
}
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())
matrix.guide.push({
site: parsed.site,
country: group.country.toLowerCase()
})
})
})