mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update update-readme.js
This commit is contained in:
parent
23d9089628
commit
5db31acc83
3 changed files with 16 additions and 25 deletions
|
@ -7,11 +7,6 @@ const _ = require('lodash')
|
|||
|
||||
let log = []
|
||||
|
||||
const statuses = {
|
||||
0: '✗',
|
||||
1: '✓'
|
||||
}
|
||||
|
||||
const LOGS_DIR = process.env.LOGS_DIR || 'scripts/logs'
|
||||
|
||||
const options = program
|
||||
|
@ -43,15 +38,14 @@ async function generateCountriesTable() {
|
|||
rows.push({
|
||||
name: `${country.flag} ${country.name}`,
|
||||
channels: item.count,
|
||||
epg: `<code>https://iptv-org.github.io/epg/guides/${item.gid}/${item.site}.epg.xml</code>`,
|
||||
status: statuses[item.status]
|
||||
epg: `<code>https://iptv-org.github.io/epg/guides/${item.gid}/${item.site}.epg.xml</code>`
|
||||
})
|
||||
}
|
||||
|
||||
rows = _.orderBy(rows, ['name', 'channels'], ['asc', 'desc'])
|
||||
rows = _.groupBy(rows, 'name')
|
||||
|
||||
const table = markdown.createTable(rows, ['Country', 'Channels', 'EPG', 'Status'])
|
||||
const table = markdown.createTable(rows, ['Country', 'Channels', 'EPG'])
|
||||
|
||||
await file.create('./.readme/_countries.md', table)
|
||||
}
|
||||
|
@ -68,15 +62,14 @@ async function generateUSStatesTable() {
|
|||
rows.push({
|
||||
name: state.name,
|
||||
channels: item.count,
|
||||
epg: `<code>https://iptv-org.github.io/epg/guides/${item.gid}/${item.site}.epg.xml</code>`,
|
||||
status: statuses[item.status]
|
||||
epg: `<code>https://iptv-org.github.io/epg/guides/${item.gid}/${item.site}.epg.xml</code>`
|
||||
})
|
||||
}
|
||||
|
||||
rows = _.orderBy(rows, ['name', 'channels'], ['asc', 'desc'])
|
||||
rows = _.groupBy(rows, 'name')
|
||||
|
||||
const table = markdown.createTable(rows, ['State', 'Channels', 'EPG', 'Status'])
|
||||
const table = markdown.createTable(rows, ['State', 'Channels', 'EPG'])
|
||||
|
||||
await file.create('./.readme/_us-states.md', table)
|
||||
}
|
||||
|
@ -93,15 +86,14 @@ async function generateCanadaProvincesTable() {
|
|||
rows.push({
|
||||
name: province.name,
|
||||
channels: item.count,
|
||||
epg: `<code>https://iptv-org.github.io/epg/guides/${item.gid}/${item.site}.epg.xml</code>`,
|
||||
status: statuses[item.status]
|
||||
epg: `<code>https://iptv-org.github.io/epg/guides/${item.gid}/${item.site}.epg.xml</code>`
|
||||
})
|
||||
}
|
||||
|
||||
rows = _.orderBy(rows, ['name', 'channels'], ['asc', 'desc'])
|
||||
rows = _.groupBy(rows, 'name')
|
||||
|
||||
const table = markdown.createTable(rows, ['Province', 'Channels', 'EPG', 'Status'])
|
||||
const table = markdown.createTable(rows, ['Province', 'Channels', 'EPG'])
|
||||
|
||||
await file.create('./.readme/_ca-provinces.md', table)
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ markdown.createTable = function (data, cols) {
|
|||
if (i === 0) output += `<td align="left" valign="top" nowrap${rowspan}>${item.name}</td>`
|
||||
output += `<td align="right">${item.channels}</td>`
|
||||
output += `<td align="left" nowrap>${item.epg}</td>`
|
||||
output += `<td align="center">${item.status}</td>`
|
||||
output += '</tr>\n'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,12 +11,12 @@ To load a program guide, all you need to do is copy the link to one or more of t
|
|||
<!-- prettier-ignore -->
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th align="left">Country</th><th align="left">Channels</th><th align="left">EPG</th><th align="left">Status</th></tr>
|
||||
<tr><th align="left">Country</th><th align="left">Channels</th><th align="left">EPG</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td align="left" valign="top" nowrap rowspan="2">🇺🇸 United States</td><td align="right">372</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/us/tvtv.us.epg.xml</code></td><td align="center">✓</td></tr>
|
||||
<tr><td align="right">74</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/us/magticom.ge.epg.xml</code></td><td align="center">✓</td></tr>
|
||||
<tr><td align="left" valign="top" nowrap>🇿🇦 South Africa</td><td align="right">1</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/za/dstv.com.epg.xml</code></td><td align="center">✓</td></tr>
|
||||
<tr><td align="left" valign="top" nowrap rowspan="2">🇺🇸 United States</td><td align="right">372</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/us/tvtv.us.epg.xml</code></td></tr>
|
||||
<tr><td align="right">74</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/us/magticom.ge.epg.xml</code></td></tr>
|
||||
<tr><td align="left" valign="top" nowrap>🇿🇦 South Africa</td><td align="right">1</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/za/dstv.com.epg.xml</code></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@ -25,12 +25,12 @@ To load a program guide, all you need to do is copy the link to one or more of t
|
|||
<!-- prettier-ignore -->
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th align="left">State</th><th align="left">Channels</th><th align="left">EPG</th><th align="left">Status</th></tr>
|
||||
<tr><th align="left">State</th><th align="left">Channels</th><th align="left">EPG</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td align="left" valign="top" nowrap rowspan="3">Puerto Rico</td><td align="right">14</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/us-pr/tvtv.us.epg.xml</code></td><td align="center">✓</td></tr>
|
||||
<tr><td align="right">7</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/us-pr/gatotv.com.epg.xml</code></td><td align="center">✓</td></tr>
|
||||
<tr><td align="right">1</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/us-pr/directv.com.epg.xml</code></td><td align="center">✓</td></tr>
|
||||
<tr><td align="left" valign="top" nowrap rowspan="3">Puerto Rico</td><td align="right">14</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/us-pr/tvtv.us.epg.xml</code></td></tr>
|
||||
<tr><td align="right">7</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/us-pr/gatotv.com.epg.xml</code></td></tr>
|
||||
<tr><td align="right">1</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/us-pr/directv.com.epg.xml</code></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@ -39,10 +39,10 @@ To load a program guide, all you need to do is copy the link to one or more of t
|
|||
<!-- prettier-ignore -->
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th align="left">Province</th><th align="left">Channels</th><th align="left">EPG</th><th align="left">Status</th></tr>
|
||||
<tr><th align="left">Province</th><th align="left">Channels</th><th align="left">EPG</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td align="left" valign="top" nowrap>Newfoundland and Labrador</td><td align="right">1</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/ca-nl/tvtv.us.epg.xml</code></td><td align="center">✓</td></tr>
|
||||
<tr><td align="left" valign="top" nowrap>Newfoundland and Labrador</td><td align="right">1</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/ca-nl/tvtv.us.epg.xml</code></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue