diff --git a/.sites/.gitignore b/.sites/.gitignore
deleted file mode 100644
index 3eab715b..00000000
--- a/.sites/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-_table.md
\ No newline at end of file
diff --git a/.sites/config.json b/.sites/config.json
deleted file mode 100644
index d77113c1..00000000
--- a/.sites/config.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "build" : "SITES.md",
- "files" : ["./.sites/template.md"]
-}
\ No newline at end of file
diff --git a/.sites/template.md b/.sites/template.md
deleted file mode 100644
index 0f16f542..00000000
--- a/.sites/template.md
+++ /dev/null
@@ -1,4 +0,0 @@
-# Sites
-
-
-#include "./.sites/_table.md"
diff --git a/SITES.md b/SITES.md
index 25429c7a..cdcb604d 100644
--- a/SITES.md
+++ b/SITES.md
@@ -1,11 +1,233 @@
# Sites
-
+\* Total number of channels / with a valid `xmltv-id`
+
- Site | Status | Notes |
+ Site | Channels * | Status | Notes |
+ 9tv.co.il | 1 / 1 | 🟢 | |
+ abc.net.au | 540 / 55 | 🟢 | |
+ allente.dk | 74 / 44 | 🟢 | |
+ allente.fi | 71 / 25 | 🟢 | |
+ allente.no | 84 / 53 | 🟢 | |
+ allente.se | 92 / 92 | 🟢 | |
+ andorradifusio.ad | 1 / 1 | 🟢 | |
+ anteltv.com.uy | 53 / 47 | 🟢 | |
+ antennaeurope.gr | 1 / 1 | 🟢 | |
+ antennapacific.gr | 1 / 1 | 🟢 | |
+ antennasatellite.gr | 1 / 1 | 🟢 | |
+ arianaafgtv.com | 1 / 1 | 🟢 | |
+ arianatelevision.com | 1 / 1 | 🟢 | |
+ arirang.com | 3 / 3 | 🟢 | |
+ artonline.tv | 5 / 5 | 🟢 | |
+ awilime.com | 111 / 0 | 🟢 | |
+ bein.com | 160 / 160 | 🟢 | |
+ beinsports.com | 104 / 81 | 🟢 | |
+ berrymedia.co.kr | 5 / 5 | 🟢 | |
+ cablego.com.pe | 100 / 20 | 🟢 | |
+ cableplus.com.uy | 171 / 47 | 🟢 | |
+ canalplus.com | 11591 / 212 | 🟢 | |
+ cgates.lt | 102 / 61 | 🟢 | |
+ chada.ma | 1 / 1 | 🟢 | |
+ chaines-tv.orange.fr | 296 / 147 | 🟢 | |
+ clickthecity.com | 32 / 30 | 🟢 | |
+ content.astro.com.my | 157 / 112 | 🟢 | |
+ cosmotetv.gr | 108 / 0 | 🟢 | |
+ cubmu.com | 174 / 122 | 🟢 | |
+ cyta.com.cy | 116 / 0 | 🟢 | |
+ dens.tv | 67 / 64 | 🟢 | |
+ digea.gr | 92 / 0 | 🟢 | |
+ digiturk.com.tr | 108 / 107 | 🟢 | |
+ directv.com | 1043 / 698 | 🔴 | https://github.com/iptv-org/epg/issues/2284 |
+ directv.com.ar | 412 / 229 | 🔴 | https://github.com/iptv-org/epg/issues/2339 |
+ directv.com.uy | 143 / 142 | 🟢 | |
+ dishtv.in | 394 / 287 | 🔴 | https://github.com/iptv-org/epg/issues/2445 |
+ dna.fi | 122 / 0 | 🟢 | |
+ dsmart.com.tr | 104 / 90 | 🟢 | |
+ dstv.com | 6983 / 181 | 🟢 | |
+ elcinema.com | 224 / 193 | 🟢 | |
+ ena.skylifetv.co.kr | 6 / 6 | 🟢 | |
+ energeek.cl | 6 / 3 | 🟢 | |
+ entertainment.ie | 109 / 95 | 🟢 | |
+ epg.112114.xyz | 930 / 1 | 🟢 | |
+ epg.iptvx.one | 2862 / 0 | 🟢 | |
+ epg.telemach.ba | 259 / 0 | 🟢 | |
+ epg.telemach.me | 216 / 0 | 🟢 | |
+ firstmedia.com | 116 / 101 | 🟢 | |
+ foxsports.com.au | 7 / 7 | 🟢 | |
+ foxtel.com.au | 155 / 87 | 🟢 | |
+ freeview.co.uk | 165 / 89 | 🟢 | |
+ frikanalen.no | 1 / 1 | 🟢 | |
+ galamtv.kz | 27 / 22 | 🟢 | |
+ gatotv.com | 475 / 362 | 🟢 | |
+ getafteritmedia.com | 5 / 5 | 🟢 | |
+ gigatv.3bbtv.co.th | 79 / 38 | 🟢 | |
+ guiadetv.com | 124 / 0 | 🟢 | |
+ guida.tv | 88 / 88 | 🟢 | |
+ guidatv.sky.it | 168 / 153 | 🟢 | |
+ horizon.tv | 184 / 172 | 🟢 | |
+ hoy.tv | 3 / 1 | 🟢 | |
+ i.mjh.nz | 6458 / 1488 | 🟢 | |
+ i24news.tv | 4 / 3 | 🟢 | |
+ iltalehti.fi | 142 / 44 | 🟢 | |
+ indihometv.com | 130 / 124 | 🟢 | |
+ ionplustv.com | 1 / 1 | 🟢 | |
+ ipko.tv | 194 / 152 | 🟢 | |
+ jiotv.com | 1094 / 0 | 🟢 | |
+ kan.org.il | 3 / 3 | 🔴 | https://github.com/iptv-org/epg/issues/2273 |
+ knr.gl | 1 / 1 | 🟢 | |
+ kvf.fo | 1 / 1 | 🟢 | |
+ m.tv.sms.cz | 1027 / 451 | 🟢 | |
+ m.tving.com | 30 / 26 | 🟢 | |
+ magticom.ge | 240 / 110 | 🟢 | |
+ mako.co.il | 1 / 1 | 🟢 | |
+ maxtvgo.mk | 110 / 48 | 🟢 | |
+ mediagenie.co.kr | 5 / 4 | 🟢 | |
+ mediaklikk.hu | 8 / 8 | 🟢 | |
+ mediasetinfinity.mediaset.it | 13 / 13 | 🟢 | |
+ melita.com | 127 / 111 | 🟢 | |
+ meo.pt | 216 / 127 | 🟢 | |
+ meuguia.tv | 102 / 97 | 🟢 | |
+ mewatch.sg | 25 / 24 | 🟢 | |
+ mi.tv | 2084 / 620 | 🟢 | |
+ mncvision.id | 276 / 223 | 🟢 | |
+ moji.id | 1 / 1 | 🟢 | |
+ mojmaxtv.hrvatskitelekom.hr | 243 / 0 | 🟢 | |
+ mon-programme-tv.be | 111 / 95 | 🟢 | |
+ movistarplus.es | 178 / 0 | 🟢 | |
+ mtel.ba | 417 / 220 | 🟢 | |
+ mts.rs | 457 / 0 | 🟢 | |
+ mujtvprogram.cz | 216 / 203 | 🟢 | |
+ musor.tv | 181 / 146 | 🟢 | |
+ mysky.com.ph | 115 / 43 | 🟢 | |
+ mytelly.co.uk | 488 / 401 | 🟢 | |
+ mytvsuper.com | 108 / 99 | 🟢 | |
+ neo.io | 337 / 241 | 🟢 | |
+ nhkworldpremium.com | 2 / 2 | 🟢 | |
+ nhl.com | 1 / 1 | 🟢 | |
+ nostv.pt | 168 / 141 | 🟢 | |
+ novacyprus.com | 29 / 24 | 🟢 | |
+ novasports.gr | 16 / 16 | 🟢 | |
+ nowplayer.now.com | 288 / 229 | 🟢 | |
+ nuevosiglo.com.uy | 173 / 47 | 🟢 | |
+ nzxmltv.com | 532 / 118 | 🟢 | |
+ ontvtonight.com | 5177 / 532 | 🟢 | |
+ opto.sic.pt | 4 / 2 | 🟢 | |
+ orangetv.orange.es | 168 / 165 | 🟢 | |
+ osn.com | 118 / 98 | 🟢 | |
+ pbsguam.org | 1 / 1 | 🟢 | |
+ pickx.be | 378 / 332 | 🟢 | |
+ player.ee.co.uk | 241 / 206 | 🟢 | |
+ playtv.unifi.com.my | 66 / 61 | 🟢 | |
+ plex.tv | 170 / 119 | 🟢 | |
+ pluto.tv | 3302 / 0 | 🟢 | |
+ programacion-tv.elpais.com | 195 / 105 | 🟢 | |
+ programacion.tcc.com.uy | 149 / 56 | 🟢 | |
+ programetv.ro | 331 / 225 | 🟢 | |
+ programme-tv.net | 295 / 197 | 🟢 | |
+ programme-tv.vini.pf | 58 / 2 | 🟢 | |
+ programme.tvb.com | 8 / 6 | 🟢 | |
+ programtv.onet.pl | 589 / 315 | 🟢 | |
+ raiplay.it | 17 / 13 | 🟢 | |
+ reportv.com.ar | 163 / 97 | 🟢 | |
+ rikstv.no | 80 / 0 | 🟢 | |
+ rotana.net | 32 / 28 | 🟢 | |
+ rtb.gov.bn | 3 / 3 | 🔴 | https://github.com/iptv-org/epg/issues/2257 |
+ rthk.hk | 8 / 8 | 🟢 | |
+ rtmklik.rtm.gov.my | 8 / 6 | 🟢 | |
+ rtp.pt | 10 / 10 | 🟢 | |
+ ruv.is | 2 / 2 | 🟢 | |
+ s.mxtv.jp | 2 / 2 | 🟢 | |
+ sat.tv | 31173 / 277 | 🟢 | |
+ shahid.mbc.net | 306 / 120 | 🟢 | |
+ siba.com.co | 98 / 96 | 🟢 | |
+ singtel.com | 155 / 113 | 🟢 | |
+ sjonvarp.is | 13 / 13 | 🟢 | |
+ sky.co.nz | 111 / 93 | 🟢 | |
+ sky.com | 532 / 433 | 🟢 | |
+ sky.de | 75 / 75 | 🟢 | |
+ skylife.co.kr | 251 / 0 | 🟢 | |
+ skyperfectv.co.jp | 137 / 130 | 🟢 | |
+ snrt.ma | 11 / 5 | 🟢 | |
+ sporttv.pt | 9 / 8 | 🟢 | |
+ starhubtvplus.com | 232 / 208 | 🟢 | |
+ startimestv.com | 77 / 58 | 🟢 | |
+ stod2.is | 12 / 8 | 🟢 | |
+ streamingtvguides.com | 3066 / 1 | 🟢 | |
+ superguidatv.it | 204 / 163 | 🟢 | |
+ taiwanplus.com | 1 / 1 | 🟢 | |
+ tapdmv.com | 39 / 7 | 🟢 | |
+ telebilbao.es | 1 / 1 | 🟢 | |
+ telenet.tv | 260 / 91 | 🟢 | |
+ teliatv.ee | 342 / 233 | 🟢 | |
+ telkussa.fi | 66 / 32 | 🟢 | |
+ telsu.fi | 17 / 15 | 🟢 | |
+ thesportplus.com | 3 / 0 | 🟢 | |
+ tivie.id | 50 / 49 | 🟢 | |
+ tivu.tv | 69 / 66 | 🟢 | |
+ toonamiaftermath.com | 1 / 1 | 🟢 | |
+ turksatkablo.com.tr | 175 / 167 | 🟢 | |
+ tv-programme.telecablesat.fr | 268 / 250 | 🟢 | |
+ tv-spored.siol.net | 312 / 0 | 🟢 | |
+ tv.blue.ch | 1030 / 565 | 🟢 | |
+ tv.cctv.com | 94 / 88 | 🟢 | |
+ tv.dir.bg | 111 / 96 | 🟢 | |
+ tv.lv | 137 / 49 | 🟢 | |
+ tv.magenta.at | 307 / 228 | 🟢 | |
+ tv.mail.ru | 664 / 644 | 🟢 | |
+ tv.movistar.com.pe | 282 / 40 | 🟢 | |
+ tv.nu | 199 / 181 | 🟢 | |
+ tv.post.lu | 332 / 242 | 🟢 | |
+ tv.sfr.fr | 503 / 0 | 🟢 | |
+ tv.trueid.net | 266 / 74 | 🟢 | |
+ tv.yandex.ru | 97 / 67 | 🟢 | |
+ tv24.co.uk | 119 / 45 | 🟢 | |
+ tv24.se | 326 / 157 | 🟢 | |
+ tv2go.t-2.net | 335 / 254 | 🟢 | |
+ tvarenasport.com | 14 / 12 | 🟢 | |
+ tvarenasport.hr | 10 / 10 | 🟢 | |
+ tvcesoir.fr | 135 / 133 | 🟢 | |
+ tvcubana.icrt.cu | 10 / 10 | 🟢 | |
+ tvgids.nl | 115 / 90 | 🟢 | |
+ tvguide.com | 153 / 150 | 🟢 | |
+ tvguide.myjcom.jp | 145 / 140 | 🟢 | |
+ tvhebdo.com | 317 / 215 | 🟢 | |
+ tvheute.at | 53 / 53 | 🟢 | |
+ tvim.tv | 25 / 19 | 🟢 | |
+ tvinsider.com | 374 / 0 | 🟢 | |
+ tvireland.ie | 334 / 304 | 🟢 | |
+ tvmi.mt | 3 / 3 | 🟢 | |
+ tvmusor.hu | 99 / 68 | 🟢 | |
+ tvmustra.hu | 188 / 0 | 🟢 | |
+ tvpassport.com | 19287 / 0 | 🟢 | |
+ tvplus.com.tr | 143 / 134 | 🟢 | |
+ tvprofil.com | 5836 / 457 | 🟢 | |
+ tvtv.us | 2299 / 2256 | 🟢 | |
+ v3.myafn.dodmedia.osd.mil | 8 / 8 | 🟢 | |
+ vidio.com | 47 / 46 | 🟢 | |
+ virginmediatelevision.ie | 5 / 5 | 🟢 | |
+ virgintvgo.virginmedia.com | 238 / 195 | 🟢 | |
+ visionplus.id | 250 / 226 | 🟢 | |
+ vivoplay.com.br | 389 / 0 | 🟢 | |
+ vtm.be | 7 / 6 | 🟢 | |
+ walesi.com.fj | 9 / 8 | 🟢 | |
+ watch.sportsnet.ca | 8 / 8 | 🟢 | |
+ watchyour.tv | 40 / 24 | 🟢 | |
+ wavve.com | 77 / 76 | 🟢 | |
+ web.magentatv.de | 348 / 247 | 🟢 | |
+ webtv.delta.nl | 247 / 218 | 🟢 | |
+ winplay.co | 2 / 2 | 🟢 | |
+ worldfishingnetwork.com | 1 / 1 | 🟢 | |
+ www3.nhk.or.jp | 1 / 1 | 🟢 | |
+ xem.kplus.vn | 77 / 0 | 🟢 | |
+ xumo.tv | 350 / 32 | 🟢 | |
+ zap.co.ao | 114 / 64 | 🟢 | |
+ ziggogo.tv | 152 / 130 | 🟢 | |
+ znbc.co.zm | 4 / 4 | 🟢 | |
+ zuragt.mn | 36 / 25 | 🟢 | |
+=======
9tv.co.il | 🟢 | |
abc.net.au | 🟢 | |
allente.dk | 🟢 | |
diff --git a/package-lock.json b/package-lock.json
index 39b678c5..31a33148 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -56,7 +56,6 @@
"libxml2-wasm": "^0.5.0",
"lodash": "^4.17.21",
"luxon": "^3.3.0",
- "markdown-include": "^0.4.3",
"mockdate": "^3.0.5",
"nedb-promises": "^6.0.3",
"node-cleanup": "^2.1.2",
@@ -6420,17 +6419,6 @@
"tmpl": "1.0.5"
}
},
- "node_modules/markdown-include": {
- "version": "0.4.3",
- "resolved": "https://registry.npmjs.org/markdown-include/-/markdown-include-0.4.3.tgz",
- "integrity": "sha512-kw1f+iJ8jAH9SYljv2RXmhRQFr2oMPPVdyoKaZIH+uA1rrQqDjLk6EQZW65oVz1Y+BkC3V//9lEvKKjRZNb1Jg==",
- "dependencies": {
- "q": "^1.2.0"
- },
- "bin": {
- "markdown-include": "bin/cli.js"
- }
- },
"node_modules/merge-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
@@ -7144,15 +7132,6 @@
}
]
},
- "node_modules/q": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
- "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
- "engines": {
- "node": ">=0.6.0",
- "teleport": ">=0.2.0"
- }
- },
"node_modules/queue-microtask": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
@@ -12894,14 +12873,6 @@
"tmpl": "1.0.5"
}
},
- "markdown-include": {
- "version": "0.4.3",
- "resolved": "https://registry.npmjs.org/markdown-include/-/markdown-include-0.4.3.tgz",
- "integrity": "sha512-kw1f+iJ8jAH9SYljv2RXmhRQFr2oMPPVdyoKaZIH+uA1rrQqDjLk6EQZW65oVz1Y+BkC3V//9lEvKKjRZNb1Jg==",
- "requires": {
- "q": "^1.2.0"
- }
- },
"merge-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
@@ -13432,11 +13403,6 @@
"resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.4.tgz",
"integrity": "sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA=="
},
- "q": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
- "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc="
- },
"queue-microtask": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
diff --git a/package.json b/package.json
index a755815b..46dcb653 100644
--- a/package.json
+++ b/package.json
@@ -85,7 +85,6 @@
"libxml2-wasm": "^0.5.0",
"lodash": "^4.17.21",
"luxon": "^3.3.0",
- "markdown-include": "^0.4.3",
"mockdate": "^3.0.5",
"nedb-promises": "^6.0.3",
"node-cleanup": "^2.1.2",
diff --git a/scripts/commands/sites/update.ts b/scripts/commands/sites/update.ts
index b9550550..4b587df4 100644
--- a/scripts/commands/sites/update.ts
+++ b/scripts/commands/sites/update.ts
@@ -1,51 +1,63 @@
+import { Channel } from 'epg-grabber'
import { Logger, Storage, Collection } from '@freearhey/core'
-import { IssueLoader, HTMLTable, Markdown } from '../../core'
+import { IssueLoader, HTMLTable, ChannelsParser } from '../../core'
import { Issue, Site } from '../../models'
-import { SITES_DIR, DOT_SITES_DIR } from '../../constants'
-import path from 'path'
+import { SITES_DIR, ROOT_DIR } from '../../constants'
async function main() {
const logger = new Logger({ disabled: true })
const loader = new IssueLoader()
- const storage = new Storage(SITES_DIR)
+ const sitesStorage = new Storage(SITES_DIR)
+ const channelsParser = new ChannelsParser({ storage: sitesStorage })
const sites = new Collection()
logger.info('loading list of sites')
- const folders = await storage.list('*/')
+ const folders = await sitesStorage.list('*/')
logger.info('loading issues...')
const issues = await loadIssues(loader)
logger.info('putting the data together...')
- folders.forEach((domain: string) => {
+ for (const domain of folders) {
const filteredIssues = issues.filter((issue: Issue) => domain === issue.data.get('site'))
const site = new Site({
domain,
issues: filteredIssues
})
+ const files = await sitesStorage.list(`${domain}/*.channels.xml`)
+ for (const filepath of files) {
+ const channels = await channelsParser.parse(filepath)
+
+ site.totalChannels += channels.count()
+ site.markedChannels += channels.filter((channel: Channel) => channel.xmltv_id).count()
+ }
+
sites.add(site)
- })
+ }
logger.info('creating sites table...')
const data = new Collection()
sites.forEach((site: Site) => {
data.add([
`${site.domain}`,
+ `${site.totalChannels} / ${site.markedChannels}`,
site.getStatus().emoji,
site.getIssues().all().join(', ')
])
})
- const table = new HTMLTable(data.all(), [{ name: 'Site' }, { name: 'Status' }, { name: 'Notes' }])
-
- const readmeStorage = new Storage(DOT_SITES_DIR)
- await readmeStorage.save('_table.md', table.toString())
-
logger.info('updating sites.md...')
- const configPath = path.join(DOT_SITES_DIR, 'config.json')
- const sitesMarkdown = new Markdown(configPath)
- sitesMarkdown.compile()
+ const table = new HTMLTable(data.all(), [
+ { name: 'Site' },
+ { name: 'Channels *', align: 'center' },
+ { name: 'Status' },
+ { name: 'Notes' }
+ ])
+ const rootStorage = new Storage(ROOT_DIR)
+ const sitesTemplate = await new Storage().load('scripts/templates/_sites.md')
+ const sitesContent = sitesTemplate.replace('_TABLE_', table.toString())
+ await rootStorage.save('SITES.md', sitesContent)
}
main()
diff --git a/scripts/constants.ts b/scripts/constants.ts
index e15b8b45..8af78b1d 100644
--- a/scripts/constants.ts
+++ b/scripts/constants.ts
@@ -1,3 +1,4 @@
+export const ROOT_DIR = process.env.ROOT_DIR || '.'
export const SITES_DIR = process.env.SITES_DIR || './sites'
export const GUIDES_DIR = process.env.GUIDES_DIR || './guides'
export const DATA_DIR = process.env.DATA_DIR || './temp/data'
diff --git a/scripts/core/index.ts b/scripts/core/index.ts
index 14a0ffa0..2c7309ed 100644
--- a/scripts/core/index.ts
+++ b/scripts/core/index.ts
@@ -13,4 +13,3 @@ export * from './queueCreator'
export * from './issueLoader'
export * from './issueParser'
export * from './htmlTable'
-export * from './markdown'
diff --git a/scripts/core/markdown.ts b/scripts/core/markdown.ts
deleted file mode 100644
index 4efaddb0..00000000
--- a/scripts/core/markdown.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import markdownInclude from 'markdown-include'
-
-export class Markdown {
- filepath: string
-
- constructor(filepath: string) {
- this.filepath = filepath
- }
-
- compile() {
- markdownInclude.compileFiles(this.filepath)
- }
-}
diff --git a/scripts/models/site.ts b/scripts/models/site.ts
index 4fd5b33a..fa95165f 100644
--- a/scripts/models/site.ts
+++ b/scripts/models/site.ts
@@ -14,15 +14,21 @@ type Status = {
type SiteProps = {
domain: string
+ totalChannels?: number
+ markedChannels?: number
issues: Collection
}
export class Site {
domain: string
+ totalChannels: number
+ markedChannels: number
issues: Collection
- constructor({ domain, issues }: SiteProps) {
+ constructor({ domain, totalChannels = 0, markedChannels = 0, issues }: SiteProps) {
this.domain = domain
+ this.totalChannels = totalChannels
+ this.markedChannels = markedChannels
this.issues = issues
}
diff --git a/scripts/templates/_sites.md b/scripts/templates/_sites.md
new file mode 100644
index 00000000..a4c4b906
--- /dev/null
+++ b/scripts/templates/_sites.md
@@ -0,0 +1,5 @@
+# Sites
+
+\* Total number of channels / with a valid `xmltv-id`
+
+_TABLE_
diff --git a/tests/__data__/expected/SITES.md b/tests/__data__/expected/SITES.md
new file mode 100644
index 00000000..5f8597e3
--- /dev/null
+++ b/tests/__data__/expected/SITES.md
@@ -0,0 +1,14 @@
+# Sites
+
+\* Total number of channels / with a valid `xmltv-id`
+
+
+
+ Site | Channels * | Status | Notes |
+
+
+ iltalehti.fi | 142 / 44 | 🟡 | https://github.com/iptv-org/epg/issues/2396 |
+ indihometv.com | 130 / 124 | 🟢 | |
+ kan.org.il | 6 / 6 | 🔴 | https://github.com/iptv-org/epg/issues/2273 |
+
+
diff --git a/tests/__data__/expected/_sites.md b/tests/__data__/expected/_sites.md
deleted file mode 100644
index bd63aa62..00000000
--- a/tests/__data__/expected/_sites.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Sites
-
-
-
diff --git a/tests/__data__/input/.sites/config.json b/tests/__data__/input/.sites/config.json
deleted file mode 100644
index 2574a566..00000000
--- a/tests/__data__/input/.sites/config.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "build" : "tests/__data__/output/sites.md",
- "files" : ["tests/__data__/output/.sites/template.md"]
-}
\ No newline at end of file
diff --git a/tests/__data__/input/.sites/template.md b/tests/__data__/input/.sites/template.md
deleted file mode 100644
index c630b91b..00000000
--- a/tests/__data__/input/.sites/template.md
+++ /dev/null
@@ -1,4 +0,0 @@
-# Sites
-
-
-#include "tests/__data__/output/.sites/_table.md"
diff --git a/tests/__data__/input/sites-update/sites/iltalehti.fi/iltalehti.fi.channels.xml b/tests/__data__/input/sites-update/sites/iltalehti.fi/iltalehti.fi.channels.xml
new file mode 100644
index 00000000..253417a5
--- /dev/null
+++ b/tests/__data__/input/sites-update/sites/iltalehti.fi/iltalehti.fi.channels.xml
@@ -0,0 +1,145 @@
+
+
+ Viron ETV
+ National Geographic
+ Disney Channel
+ Disney Junior
+ Nat Geo Wild Scandinavia
+ V sport 1 Suomi
+ V sport 2 Suomi
+ Viasat Nature/Crime
+ V sport
+ V sport + Suomi
+ V Sport Live 1
+ V Sport Live 2
+ V Sport Live 3
+ V Sport Live 4
+ V Sport Live 5
+ Discovery Science
+ The History Channel
+ Investigation Discovery
+ Nat Geo Wild Scandinavia
+ National Geographic
+ Travel Channel
+ Viasat Explore
+ Viasat History
+ Viasat Nature/Crime
+ Barnkanalen
+ Cartoon Network
+ Cartoonito
+ Disney Channel
+ Disney Junior
+ MTV juniori
+ Nick Jr.
+ V film FAMILY
+ iConcerts
+ Club MTV
+ MTV Finland
+ MTV Live HD
+ VH1 Classic
+ Al Jazeera
+ BBC World News
+ Bloomberg TV
+ CNBC
+ CNN
+ Deutsche Welle
+ EuroNews
+ Sky News
+ MTV Ava
+ Fashion TV
+ Food Network
+ Frii
+ Liv
+ TLC
+ Travel Channel
+ V film FAMILY
+ V film HITS
+ BBC Nordic
+ RTL
+ TV Finland
+ TV5 Monde
+ Barnkanalen
+ SF-kanalen
+ MTV Urheilu 3
+ MTV Aitio
+ MTV Viihde
+ V film PREMIERE
+ V film ACTION
+ V film FAMILY
+ V film HITS
+ Eurosport
+ Eurosport 2
+ MTV Liiga 1
+ MTV Liiga 2
+ MTV Liiga 3
+ MTV Liiga 4
+ MTV Liiga 5
+ MTV Liiga 6
+ MTV Liiga 7
+ MTV Liiga UHD
+ MTV Max
+ MTV Urheilu 1
+ MTV Urheilu 2
+ MTV Urheilu 3
+ V sport FOOTBALL
+ V sport GOLF
+ V sport vinter
+ V sport 1 Suomi
+ V sport 2 Suomi
+ V sport
+ V sport PREMIUM
+ V sport + Suomi
+ V Sport Live 1
+ V Sport Live 2
+ V Sport Live 3
+ V Sport Live 4
+ V Sport Live 5
+ Animal Planet
+ MTV Ava
+ Cartoon Network
+ MTV juniori
+ MTV Max
+ MTV Urheilu 1
+ MTV Urheilu 2
+ Discovery Channel
+ Extreme Sports
+ Star
+ Frii
+ Hero
+ Himlen TV7
+ Jim
+ Kanal5
+ Kutonen
+ Liv
+ MTV3
+ MTV Aitio
+ MTV Viihde
+ National Geographic
+ Nelonen
+ SF-kanalen
+ MTV Sub
+ SVT 1
+ SVT 2
+ SVT24
+ TV7
+ TLC
+ TV3
+ TV4
+ TV5
+ TV6
+ V film ACTION
+ V film FAMILY
+ V film HITS
+ V film PREMIERE
+ Viasat Explore
+ Viasat History
+ H2
+ V sport FOOTBALL
+ V sport GOLF
+ V sport PREMIUM
+ V sport ULTRA HD
+ V sport vinter
+ Yle Teema Fem
+ Yle TV1
+ Yle TV2
+
\ No newline at end of file
diff --git a/tests/__data__/input/sites-update/sites/indihometv.com/indihometv.com.channels.xml b/tests/__data__/input/sites-update/sites/indihometv.com/indihometv.com.channels.xml
new file mode 100644
index 00000000..6eb233d8
--- /dev/null
+++ b/tests/__data__/input/sites-update/sites/indihometv.com/indihometv.com.channels.xml
@@ -0,0 +1,133 @@
+
+
+ ABC Australia
+ Aljazeera
+ Animal Planet
+ Animax
+ Aniplus
+ Antara
+ ANTV
+ Arirang
+ Asian Food Network
+ ATV
+ AXN
+ Bali TV
+ Bioskop Indonesia
+ Bloomberg
+ BTV
+ Cartoonito
+ Cartoon Network
+ CCTV4
+ Celestial Movie
+ CGTN Documentary
+ Chinese Drama
+ Cinema World
+ Citra Dangdut
+ Citra Drama
+ News Asia
+ CNBC Asia
+ CNBC Indonesia
+ CNN Indonesia
+ CNN International
+ Crime Investigation
+ Curiosity
+ Daai TV
+ Da Vinci Learning
+ Discovery Asia
+ Discovery Channel
+ Dreamworks
+ Dunia anak
+ Dunia Lain
+ DW (English)
+ Eat & Go
+ Euronews
+ FashionTV
+ Fight Sport
+ Flik
+ France 24
+ Galaxy
+ Galaxy Premium
+ HGTV
+ History
+ Hits
+ HIts Movie
+ HITS Now
+ Horee
+ Horizon Sports
+ I-Konser
+ IDTV
+ IDX
+ IMC
+ FunPlanet
+ Indonesiana TV
+ Indosiar
+ iNews
+ JakTV
+ Jawa Pos TV
+ JTV
+ KBS World
+ Kix
+ Kompas TV
+ Kplus
+ Lifetime
+ Lingua
+ Love Nature
+ Maxstream
+ Mentari TV
+ Metro TV
+ MOJI
+ Moonbug
+ MQTV
+ MTATV
+ MTV Live
+ Musik Indonesia
+ MyKidz
+ NBA
+ Net.
+ New Tv Comprehensive
+ New Tv Finance
+ New Tv Variety
+ nhk world Japan
+ Nickelodeon
+ Nick Junior
+ Insert
+ Nusantara TV
+ SONE
+ Phoenix Chinese
+ Phoenix InfoNews
+ Prambors
+ AlQuran Kareem
+ Rajawali TV
+ Rock Entertainment
+ Rock Action
+ Rodja TV
+ RRI NET
+ SCTV
+ SEA Today
+ Seru!
+ Shenzen
+ SINDO News TV
+ SPOTV 2
+ SPOTV
+ Studio Universal
+ Tawaf TV
+ Tech Storm
+ Thrill
+ TLC
+ Trans7
+ TransTV
+ TV5Monde
+ TV9 NU
+ TVBS News
+ Muhammadiyah TV
+ MUI TV
+ TVN
+ TVN Movies
+ TV One
+ TVRI
+ UChannel
+ AllPlay Ent
+ Warner
+ ZBioskop
+ Zhejiang
+
diff --git a/tests/__data__/input/sites-update/sites/kan.org.il/kan.org.il_1.channels.xml b/tests/__data__/input/sites-update/sites/kan.org.il/kan.org.il_1.channels.xml
new file mode 100644
index 00000000..c89752bc
--- /dev/null
+++ b/tests/__data__/input/sites-update/sites/kan.org.il/kan.org.il_1.channels.xml
@@ -0,0 +1,6 @@
+
+
+ مكان
+ כאן 11
+ חינוכית
+
diff --git a/tests/__data__/input/sites-update/sites/kan.org.il/kan.org.il_2.channels.xml b/tests/__data__/input/sites-update/sites/kan.org.il/kan.org.il_2.channels.xml
new file mode 100644
index 00000000..c89752bc
--- /dev/null
+++ b/tests/__data__/input/sites-update/sites/kan.org.il/kan.org.il_2.channels.xml
@@ -0,0 +1,6 @@
+
+
+ مكان
+ כאן 11
+ חינוכית
+
diff --git a/tests/commands/sites/update.test.ts b/tests/commands/sites/update.test.ts
index 0af18d4c..c14a7370 100644
--- a/tests/commands/sites/update.test.ts
+++ b/tests/commands/sites/update.test.ts
@@ -3,24 +3,14 @@ import fs from 'fs-extra'
import { pathToFileURL } from 'node:url'
import os from 'os'
-let ENV_VAR =
- 'DOT_SITES_DIR=tests/__data__/output/.sites SITES_DIR=tests/__data__/input/sites-update/sites'
+let ENV_VAR = 'SITES_DIR=tests/__data__/input/sites-update/sites ROOT_DIR=tests/__data__/output'
if (os.platform() === 'win32') {
ENV_VAR =
- 'SET "DOT_SITES_DIR=tests/__data__/output/.sites" && SET "SITES_DIR=tests/__data__/input/sites-update/sites" &&'
+ 'SET "SITES_DIR=tests/__data__/input/sites-update/sites" && SET "ROOT_DIR=tests/__data__/output" &&'
}
beforeEach(() => {
fs.emptyDirSync('tests/__data__/output')
- fs.mkdirSync('tests/__data__/output/.sites')
- fs.copyFileSync(
- 'tests/__data__/input/.sites/config.json',
- 'tests/__data__/output/.sites/config.json'
- )
- fs.copyFileSync(
- 'tests/__data__/input/.sites/template.md',
- 'tests/__data__/output/.sites/template.md'
- )
})
it('can update SITES.md', () => {
@@ -29,11 +19,9 @@ it('can update SITES.md', () => {
const stdout = execSync(cmd, { encoding: 'utf8' })
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
- expect(content('tests/__data__/output/sites.md')).toEqual(
- content('tests/__data__/expected/_sites.md')
+ expect(content('tests/__data__/output/SITES.md')).toEqual(
+ content('tests/__data__/expected/SITES.md')
)
-
- expect(true).toBe(true)
})
function content(filepath: string) {
diff --git a/yarn.lock b/yarn.lock
index b715fa72..1ba3d3bd 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3600,13 +3600,6 @@ makeerror@1.0.12:
dependencies:
tmpl "1.0.5"
-markdown-include@^0.4.3:
- version "0.4.3"
- resolved "https://registry.npmjs.org/markdown-include/-/markdown-include-0.4.3.tgz"
- integrity sha512-kw1f+iJ8jAH9SYljv2RXmhRQFr2oMPPVdyoKaZIH+uA1rrQqDjLk6EQZW65oVz1Y+BkC3V//9lEvKKjRZNb1Jg==
- dependencies:
- q "^1.2.0"
-
merge-stream@^2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz"
@@ -4109,11 +4102,6 @@ pure-rand@^6.0.0:
resolved "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.4.tgz"
integrity sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==
-q@^1.2.0:
- version "1.5.1"
- resolved "https://registry.npmjs.org/q/-/q-1.5.1.tgz"
- integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=
-
queue-microtask@^1.2.2:
version "1.2.3"
resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz"