Added emoji flags to list of countries

This commit is contained in:
freearhey 2020-05-06 18:02:07 +03:00
parent 1e20a90b0d
commit 057948d6c2

View File

@ -3,7 +3,7 @@ const helper = require('./helper')
let output = { let output = {
countries: [], countries: [],
languages: [], languages: [],
categories: [], categories: []
} }
function main() { function main() {
@ -39,11 +39,13 @@ function parseIndex() {
if (countries[countryCode]) { if (countries[countryCode]) {
countries[countryCode].channels++ countries[countryCode].channels++
} else { } else {
let flag = helper.code2flag(countryCode)
countries[countryCode] = { countries[countryCode] = {
country: countryName, country: flag + ' ' + countryName,
channels: 1, channels: 1,
playlist: `<code>https://iptv-org.github.io/iptv/countries/${countryCode}.m3u</code>`, playlist: `<code>https://iptv-org.github.io/iptv/countries/${countryCode}.m3u</code>`,
epg: countryEpg, epg: countryEpg
} }
} }
@ -62,7 +64,7 @@ function parseIndex() {
languages[languageCode] = { languages[languageCode] = {
language: languageName, language: languageName,
channels: 1, channels: 1,
playlist: `<code>https://iptv-org.github.io/iptv/languages/${languageCode}.m3u</code>`, playlist: `<code>https://iptv-org.github.io/iptv/languages/${languageCode}.m3u</code>`
} }
} }
} }
@ -76,7 +78,7 @@ function parseIndex() {
categories[categoryCode] = { categories[categoryCode] = {
category: categoryName, category: categoryName,
channels: 1, channels: 1,
playlist: `<code>https://iptv-org.github.io/iptv/categories/${categoryCode}.m3u</code>`, playlist: `<code>https://iptv-org.github.io/iptv/categories/${categoryCode}.m3u</code>`
} }
} }
} }
@ -93,8 +95,8 @@ function generateCountriesTable() {
{ name: 'Country', align: 'left' }, { name: 'Country', align: 'left' },
{ name: 'Channels', align: 'right' }, { name: 'Channels', align: 'right' },
{ name: 'Playlist', align: 'left', nowrap: true }, { name: 'Playlist', align: 'left', nowrap: true },
{ name: 'EPG', align: 'left' }, { name: 'EPG', align: 'left' }
], ]
}) })
helper.createFile('./.readme/_countries.md', table) helper.createFile('./.readme/_countries.md', table)
@ -121,8 +123,8 @@ function generateLanguagesTable() {
columns: [ columns: [
{ name: 'Language', align: 'left' }, { name: 'Language', align: 'left' },
{ name: 'Channels', align: 'right' }, { name: 'Channels', align: 'right' },
{ name: 'Playlist', align: 'left' }, { name: 'Playlist', align: 'left' }
], ]
}) })
helper.createFile('./.readme/_languages.md', table) helper.createFile('./.readme/_languages.md', table)
@ -149,8 +151,8 @@ function generateCategoriesTable() {
columns: [ columns: [
{ name: 'Category', align: 'left' }, { name: 'Category', align: 'left' },
{ name: 'Channels', align: 'right' }, { name: 'Channels', align: 'right' },
{ name: 'Playlist', align: 'left' }, { name: 'Playlist', align: 'left' }
], ]
}) })
helper.createFile('./.readme/_categories.md', table) helper.createFile('./.readme/_categories.md', table)