From 1b835f2bca99be0de5a90ba5d007e9886b5e5ab6 Mon Sep 17 00:00:00 2001 From: freearhey Date: Wed, 9 Oct 2019 05:33:52 +0300 Subject: [PATCH] Added auto-generated README.md --- helpers/_readme.md | 37 +++++++++ helpers/categories.md | 32 ++++++++ helpers/countries.md | 170 ++++++++++++++++++++++++++++++++++++++++++ helpers/generate.js | 29 +++++++ helpers/markdown.json | 4 + helpers/util.js | 8 +- package-lock.json | 87 +++++++++++++++++++++ package.json | 5 +- 8 files changed, 370 insertions(+), 2 deletions(-) create mode 100644 helpers/_readme.md create mode 100644 helpers/categories.md create mode 100644 helpers/countries.md create mode 100644 helpers/markdown.json diff --git a/helpers/_readme.md b/helpers/_readme.md new file mode 100644 index 0000000000..987f215c3a --- /dev/null +++ b/helpers/_readme.md @@ -0,0 +1,37 @@ +# IPTV + +Collection of 8000+ publicly available IPTV channels from all over the world. + +Internet Protocol television (IPTV) is the delivery of television content over Internet Protocol (IP) networks. + +## Usage + +To watch IPTV you just need to paste this link `https://iptv-org.github.io/iptv/index.m3u` to any player with support M3U-playlists. + +![VLC Network Panel](preview.png) + +If your application does not support nested playlists, you can instead use one of these playlists: + +- `https://iptv-org.github.io/iptv/index.full.m3u` (grouped by country and content) +- `https://iptv-org.github.io/iptv/index.country.m3u` (grouped by country) +- `https://iptv-org.github.io/iptv/index.content.m3u` (grouped by content) + +Or select one of the playlists from the list below. + +## Playlists by category + +#include "./helpers/categories.md" + +## Playlists by country + +#include "./helpers/countries.md" + +## Resources + +You can find a links to various IPTV related resources in a separate [iptv-org/awesome-iptv](https://github.com/iptv-org/awesome-iptv) repository. + +## Contribution + +Please make sure to read the [Contributing Guide](.github/CONTRIBUTING.md) before making a pull request. + +If you just found an error or have any suggestions on how to organize a playlist please send an [issue](https://github.com/iptv-org/iptv/issues). diff --git a/helpers/categories.md b/helpers/categories.md new file mode 100644 index 0000000000..1644f98f04 --- /dev/null +++ b/helpers/categories.md @@ -0,0 +1,32 @@ +| Category | Channels | Playlist | +| :------------ | -------: | :------------------------------------------------------------- | +| Auto | 3 | `https://iptv-org.github.io/iptv/categories/auto.m3u` | +| Business | 40 | `https://iptv-org.github.io/iptv/categories/business.m3u` | +| Classic | 1 | `https://iptv-org.github.io/iptv/categories/classic.m3u` | +| Comedy | 3 | `https://iptv-org.github.io/iptv/categories/comedy.m3u` | +| Documentary | 14 | `https://iptv-org.github.io/iptv/categories/documentary.m3u` | +| Education | 9 | `https://iptv-org.github.io/iptv/categories/education.m3u` | +| Entertainment | 93 | `https://iptv-org.github.io/iptv/categories/entertainment.m3u` | +| Family | 6 | `https://iptv-org.github.io/iptv/categories/family.m3u` | +| Fashion | 35 | `https://iptv-org.github.io/iptv/categories/fashion.m3u` | +| Food | 7 | `https://iptv-org.github.io/iptv/categories/food.m3u` | +| General | 40 | `https://iptv-org.github.io/iptv/categories/general.m3u` | +| Health | 0 | `https://iptv-org.github.io/iptv/categories/health.m3u` | +| History | 6 | `https://iptv-org.github.io/iptv/categories/history.m3u` | +| Hobby | 8 | `https://iptv-org.github.io/iptv/categories/hobby.m3u` | +| Kids | 51 | `https://iptv-org.github.io/iptv/categories/kids.m3u` | +| Legislative | 10 | `https://iptv-org.github.io/iptv/categories/legislative.m3u` | +| Lifestyle | 5 | `https://iptv-org.github.io/iptv/categories/lifestyle.m3u` | +| Local | 263 | `https://iptv-org.github.io/iptv/categories/local.m3u` | +| Movies | 134 | `https://iptv-org.github.io/iptv/categories/movies.m3u` | +| Music | 244 | `https://iptv-org.github.io/iptv/categories/music.m3u` | +| News | 333 | `https://iptv-org.github.io/iptv/categories/news.m3u` | +| Quiz | 0 | `https://iptv-org.github.io/iptv/categories/quiz.m3u` | +| Religious | 93 | `https://iptv-org.github.io/iptv/categories/religious.m3u` | +| Sci-Fi | 0 | `https://iptv-org.github.io/iptv/categories/sci-fi.m3u` | +| Shop | 22 | `https://iptv-org.github.io/iptv/categories/shop.m3u` | +| Sport | 242 | `https://iptv-org.github.io/iptv/categories/sport.m3u` | +| Travel | 9 | `https://iptv-org.github.io/iptv/categories/travel.m3u` | +| Weather | 6 | `https://iptv-org.github.io/iptv/categories/weather.m3u` | +| XXX | 47 | `https://iptv-org.github.io/iptv/categories/xxx.m3u` | +| Other | 5829 | `https://iptv-org.github.io/iptv/categories/other.m3u` | diff --git a/helpers/countries.md b/helpers/countries.md new file mode 100644 index 0000000000..06bb74508b --- /dev/null +++ b/helpers/countries.md @@ -0,0 +1,170 @@ +| Country | Channels | Playlist | EPG | +| :---------------------------------- | -------: | :------------------------------------------------- | :---------------------------------------------------- | +| Afghanistan | 23 | `https://iptv-org.github.io/iptv/channels/af.m3u` | | +| Albania | 31 | `https://iptv-org.github.io/iptv/channels/al.m3u` | `http://195.154.221.171/epg/guidealbania.xml.gz` | +| Algeria | 2 | `https://iptv-org.github.io/iptv/channels/dz.m3u` | `http://195.154.221.171/epg/guidearab.xml.gz` | +| Andorra | 4 | `https://iptv-org.github.io/iptv/channels/ad.m3u` | | +| Angola | 1 | `https://iptv-org.github.io/iptv/channels/ao.m3u` | | +| Argentina | 85 | `https://iptv-org.github.io/iptv/channels/ar.m3u` | | +| Armenia | 52 | `https://iptv-org.github.io/iptv/channels/am.m3u` | | +| Aruba | 3 | `https://iptv-org.github.io/iptv/channels/aw.m3u` | | +| Australia | 15 | `https://iptv-org.github.io/iptv/channels/au.m3u` | `http://i.mjh.nz/nzau/epg.xml.gz` | +| Austria | 20 | `https://iptv-org.github.io/iptv/channels/at.m3u` | `http://epg.streamstv.me/epg/guide-austria.xml.gz` | +| Azerbaijan | 30 | `https://iptv-org.github.io/iptv/channels/az.m3u` | `https://iptvx.one/epg/epg.xml.gz` | +| Bahamas | 3 | `https://iptv-org.github.io/iptv/channels/bs.m3u` | | +| Bahrain | 5 | `https://iptv-org.github.io/iptv/channels/bh.m3u` | `http://195.154.221.171/epg/guidearab.xml.gz` | +| Bangladesh | 15 | `https://iptv-org.github.io/iptv/channels/bd.m3u` | | +| Barbados | 1 | `https://iptv-org.github.io/iptv/channels/bb.m3u` | | +| Belarus | 7 | `https://iptv-org.github.io/iptv/channels/by.m3u` | `https://iptvx.one/epg/epg.xml.gz` | +| Belgium | 39 | `https://iptv-org.github.io/iptv/channels/be.m3u` | `http://195.154.221.171/epg/guidebelgium.xml.gz` | +| Bolivia | 9 | `https://iptv-org.github.io/iptv/channels/bo.m3u` | | +| Bosnia and Herzegovina | 9 | `https://iptv-org.github.io/iptv/channels/ba.m3u` | `http://epg.streamstv.me/epg/guide-exyu.xml.gz` | +| Brazil | 88 | `https://iptv-org.github.io/iptv/channels/br.m3u` | `http://infinitytv.xyz/guide.xml` | +| Brunei | 2 | `https://iptv-org.github.io/iptv/channels/bn.m3u` | | +| Bulgaria | 26 | `https://iptv-org.github.io/iptv/channels/bg.m3u` | `http://195.154.221.171/epg/guidebulgaria.xml.gz` | +| Burkina Faso | 2 | `https://iptv-org.github.io/iptv/channels/bf.m3u` | | +| Cambodia | 27 | `https://iptv-org.github.io/iptv/channels/kh.m3u` | | +| Cameroon | 3 | `https://iptv-org.github.io/iptv/channels/cm.m3u` | | +| Canada | 48 | `https://iptv-org.github.io/iptv/channels/ca.m3u` | `http://epg.streamstv.me/epg/guide-canada.xml.gz` | +| Cape Verde | 1 | `https://iptv-org.github.io/iptv/channels/cv.m3u` | | +| Chile | 72 | `https://iptv-org.github.io/iptv/channels/cl.m3u` | | +| China | 2524 | `https://iptv-org.github.io/iptv/channels/cn.m3u` | | +| Colombia | 33 | `https://iptv-org.github.io/iptv/channels/co.m3u` | | +| Costa Rica | 12 | `https://iptv-org.github.io/iptv/channels/cr.m3u` | | +| Croatia | 35 | `https://iptv-org.github.io/iptv/channels/hr.m3u` | `http://tvprofil.net/xmltv/data/epg_tvprofil.net.xml` | +| Cuba | 0 | `https://iptv-org.github.io/iptv/channels/cu.m3u` | | +| CuraƧao | 3 | `https://iptv-org.github.io/iptv/channels/cw.m3u` | | +| Cyprus | 16 | `https://iptv-org.github.io/iptv/channels/cy.m3u` | `http://195.154.221.171/epg/guidegreece.xml.gz` | +| Czech Republic | 33 | `https://iptv-org.github.io/iptv/channels/cz.m3u` | `http://epg.streamstv.me/epg/guide-cz.xml.gz` | +| Democratic Republic of the Congo | 2 | `https://iptv-org.github.io/iptv/channels/cd.m3u` | | +| Denmark | 17 | `https://iptv-org.github.io/iptv/channels/dk.m3u` | `http://195.154.221.171/epg/guidedenmark.xml.gz` | +| Dominican Republic | 51 | `https://iptv-org.github.io/iptv/channels/do.m3u` | | +| Ecuador | 11 | `https://iptv-org.github.io/iptv/channels/ec.m3u` | | +| Egypt | 54 | `https://iptv-org.github.io/iptv/channels/eg.m3u` | `http://195.154.221.171/epg/guidearab.xml.gz` | +| El Salvador | 2 | `https://iptv-org.github.io/iptv/channels/sv.m3u` | | +| Equatorial Guinea | 3 | `https://iptv-org.github.io/iptv/channels/gq.m3u` | | +| Estonia | 12 | `https://iptv-org.github.io/iptv/channels/ee.m3u` | `http://195.154.221.171/epg/guideestonia.xml.gz` | +| Ethiopia | 2 | `https://iptv-org.github.io/iptv/channels/et.m3u` | | +| Faroe Islands | 2 | `https://iptv-org.github.io/iptv/channels/fo.m3u` | | +| Finland | 3 | `https://iptv-org.github.io/iptv/channels/fi.m3u` | `http://195.154.221.171/epg/guidefinland.xml.gz` | +| Fiji | 1 | `https://iptv-org.github.io/iptv/channels/fj.m3u` | | +| France | 91 | `https://iptv-org.github.io/iptv/channels/fr.m3u` | `http://195.154.221.171/epg/guidefrance.xml.gz` | +| Gambia | 1 | `https://iptv-org.github.io/iptv/channels/gm.m3u` | | +| Georgia | 11 | `https://iptv-org.github.io/iptv/channels/ge.m3u` | | +| Germany | 179 | `https://iptv-org.github.io/iptv/channels/de.m3u` | `http://195.154.221.171/epg/guidegermany.xml.gz` | +| Ghana | 4 | `https://iptv-org.github.io/iptv/channels/gh.m3u` | | +| Gibraltar | 1 | `https://iptv-org.github.io/iptv/channels/gi.m3u` | | +| Greece | 70 | `https://iptv-org.github.io/iptv/channels/gr.m3u` | `http://195.154.221.171/epg/guidegreece.xml.gz` | +| Grenada | 1 | `https://iptv-org.github.io/iptv/channels/gd.m3u` | | +| Guadeloupe | 2 | `https://iptv-org.github.io/iptv/channels/gp.m3u` | | +| Guam | 0 | `https://iptv-org.github.io/iptv/channels/gu.m3u` | | +| Guatemala | 1 | `https://iptv-org.github.io/iptv/channels/gt.m3u` | | +| Guyana | 2 | `https://iptv-org.github.io/iptv/channels/gy.m3u` | | +| Haiti | 28 | `https://iptv-org.github.io/iptv/channels/ht.m3u` | | +| Honduras | 31 | `https://iptv-org.github.io/iptv/channels/hn.m3u` | | +| Hong Kong | 44 | `https://iptv-org.github.io/iptv/channels/hk.m3u` | | +| Hungary | 27 | `https://iptv-org.github.io/iptv/channels/hu.m3u` | `http://epg.streamstv.me/epg/guide-hungry.xml.gz` | +| Iceland | 12 | `https://iptv-org.github.io/iptv/channels/is.m3u` | | +| India | 307 | `https://iptv-org.github.io/iptv/channels/in.m3u` | `http://epg.streamstv.me/epg/guide-india.xml.gz` | +| Indonesia | 214 | `https://iptv-org.github.io/iptv/channels/id.m3u` | | +| International | 81 | `https://iptv-org.github.io/iptv/channels/int.m3u` | | +| Iran | 41 | `https://iptv-org.github.io/iptv/channels/ir.m3u` | `http://195.154.221.171/epg/guideiran.xml.gz` | +| Iraq | 29 | `https://iptv-org.github.io/iptv/channels/iq.m3u` | `http://195.154.221.171/epg/guidearab.xml.gz` | +| Ireland | 3 | `https://iptv-org.github.io/iptv/channels/ie.m3u` | | +| Israel | 23 | `https://iptv-org.github.io/iptv/channels/il.m3u` | `http://epg.streamstv.me/epg/guide-israel.xml.gz` | +| Italy | 206 | `https://iptv-org.github.io/iptv/channels/it.m3u` | `http://195.154.221.171/epg/guideitaly.xml.gz` | +| Ivory Coast | 4 | `https://iptv-org.github.io/iptv/channels/ci.m3u` | | +| Jamaica | 6 | `https://iptv-org.github.io/iptv/channels/jm.m3u` | | +| Japan | 34 | `https://iptv-org.github.io/iptv/channels/jp.m3u` | | +| Jordan | 14 | `https://iptv-org.github.io/iptv/channels/jo.m3u` | `http://195.154.221.171/epg/guidearab.xml.gz` | +| Kazakhstan | 23 | `https://iptv-org.github.io/iptv/channels/kz.m3u` | `https://iptvx.one/epg/epg.xml.gz` | +| Kenya | 5 | `https://iptv-org.github.io/iptv/channels/ke.m3u` | | +| Kosovo | 20 | `https://iptv-org.github.io/iptv/channels/xk.m3u` | | +| Kuwait | 29 | `https://iptv-org.github.io/iptv/channels/kw.m3u` | `http://195.154.221.171/epg/guidearab.xml.gz` | +| Kyrgyzstan | 6 | `https://iptv-org.github.io/iptv/channels/kg.m3u` | | +| Laos | 4 | `https://iptv-org.github.io/iptv/channels/la.m3u` | | +| Latvia | 22 | `https://iptv-org.github.io/iptv/channels/lv.m3u` | `https://iptvx.one/epg/epg.xml.gz` | +| Lebanon | 28 | `https://iptv-org.github.io/iptv/channels/lb.m3u` | | +| Libya | 7 | `https://iptv-org.github.io/iptv/channels/ly.m3u` | | +| Liechtenstein | 2 | `https://iptv-org.github.io/iptv/channels/li.m3u` | | +| Lithuania | 11 | `https://iptv-org.github.io/iptv/channels/lt.m3u` | `https://iptvx.one/epg/epg.xml.gz` | +| Luxembourg | 5 | `https://iptv-org.github.io/iptv/channels/lu.m3u` | | +| Macau | 14 | `https://iptv-org.github.io/iptv/channels/mo.m3u` | | +| Macedonia | 4 | `https://iptv-org.github.io/iptv/channels/mk.m3u` | | +| Madagascar | 0 | `https://iptv-org.github.io/iptv/channels/mg.m3u` | | +| Malaysia | 23 | `https://iptv-org.github.io/iptv/channels/my.m3u` | | +| Maldives | 5 | `https://iptv-org.github.io/iptv/channels/mv.m3u` | | +| Malta | 8 | `https://iptv-org.github.io/iptv/channels/mt.m3u` | `http://epg.streamstv.me/epg/guide-malta.xml.gz` | +| Mexico | 75 | `https://iptv-org.github.io/iptv/channels/mx.m3u` | | +| Moldova | 14 | `https://iptv-org.github.io/iptv/channels/md.m3u` | `https://iptvx.one/epg/epg.xml.gz` | +| Monaco | 2 | `https://iptv-org.github.io/iptv/channels/mc.m3u` | | +| Mongolia | 6 | `https://iptv-org.github.io/iptv/channels/mn.m3u` | | +| Montenegro | 4 | `https://iptv-org.github.io/iptv/channels/me.m3u` | | +| Morocco | 20 | `https://iptv-org.github.io/iptv/channels/ma.m3u` | `http://195.154.221.171/epg/guidearab.xml.gz` | +| Mozambique | 5 | `https://iptv-org.github.io/iptv/channels/mz.m3u` | | +| Myanmar | 5 | `https://iptv-org.github.io/iptv/channels/mm.m3u` | | +| Nepal | 3 | `https://iptv-org.github.io/iptv/channels/np.m3u` | | +| Netherlands | 72 | `https://iptv-org.github.io/iptv/channels/nl.m3u` | `http://195.154.221.171/epg/guidenetherlands.xml.gz` | +| New Zealand | 10 | `https://iptv-org.github.io/iptv/channels/nz.m3u` | `http://i.mjh.nz/nzau/epg.xml.gz` | +| Nicaragua | 10 | `https://iptv-org.github.io/iptv/channels/ni.m3u` | | +| Niger | 0 | `https://iptv-org.github.io/iptv/channels/ne.m3u` | | +| Nigeria | 13 | `https://iptv-org.github.io/iptv/channels/ng.m3u` | | +| North Korea | 1 | `https://iptv-org.github.io/iptv/channels/kp.m3u` | | +| Norway | 4 | `https://iptv-org.github.io/iptv/channels/no.m3u` | `http://epg.streamstv.me/epg/guide-norway.xml.gz` | +| Oman | 8 | `https://iptv-org.github.io/iptv/channels/om.m3u` | `http://195.154.221.171/epg/guidearab.xml.gz` | +| Pakistan | 23 | `https://iptv-org.github.io/iptv/channels/pk.m3u` | | +| Palestine | 21 | `https://iptv-org.github.io/iptv/channels/ps.m3u` | `http://195.154.221.171/epg/guidearab.xml.gz` | +| Panama | 5 | `https://iptv-org.github.io/iptv/channels/pa.m3u` | | +| Paraguay | 1 | `https://iptv-org.github.io/iptv/channels/py.m3u` | | +| Peru | 30 | `https://iptv-org.github.io/iptv/channels/pe.m3u` | | +| Philippines | 11 | `https://iptv-org.github.io/iptv/channels/ph.m3u` | | +| Poland | 14 | `https://iptv-org.github.io/iptv/channels/pl.m3u` | `http://195.154.221.171/epg/guidepoland.xml.gz` | +| Portugal | 37 | `https://iptv-org.github.io/iptv/channels/pt.m3u` | `http://195.154.221.171/epg/guideportugal.xml.gz` | +| Puerto Rico | 6 | `https://iptv-org.github.io/iptv/channels/pr.m3u` | | +| Qatar | 27 | `https://iptv-org.github.io/iptv/channels/qa.m3u` | `http://195.154.221.171/epg/guidearab.xml.gz` | +| Republic of the Congo | 1 | `https://iptv-org.github.io/iptv/channels/cg.m3u` | | +| Romania | 75 | `https://iptv-org.github.io/iptv/channels/ro.m3u` | `http://195.154.221.171/epg/guideromania.xml.gz` | +| Russia | 343 | `https://iptv-org.github.io/iptv/channels/ru.m3u` | `https://iptvx.one/epg/epg.xml.gz` | +| Rwanda | 2 | `https://iptv-org.github.io/iptv/channels/rw.m3u` | | +| Saint Kitts and Nevis | 3 | `https://iptv-org.github.io/iptv/channels/kn.m3u` | | +| San Marino | 2 | `https://iptv-org.github.io/iptv/channels/sm.m3u` | | +| Saudi Arabia | 16 | `https://iptv-org.github.io/iptv/channels/sa.m3u` | `http://195.154.221.171/epg/guidearab.xml.gz` | +| Senegal | 5 | `https://iptv-org.github.io/iptv/channels/sn.m3u` | | +| Serbia | 14 | `https://iptv-org.github.io/iptv/channels/rs.m3u` | `http://epg.streamstv.me/epg/guide-exyu.xml.gz` | +| Sierra Leone | 1 | `https://iptv-org.github.io/iptv/channels/sl.m3u` | | +| Singapore | 11 | `https://iptv-org.github.io/iptv/channels/sg.m3u` | | +| Sint Maarten | 1 | `https://iptv-org.github.io/iptv/channels/sx.m3u` | | +| Slovakia | 42 | `https://iptv-org.github.io/iptv/channels/sk.m3u` | | +| Slovenia | 6 | `https://iptv-org.github.io/iptv/channels/si.m3u` | `http://195.154.221.171/epg/guideslovenia.xml.gz` | +| Somalia | 6 | `https://iptv-org.github.io/iptv/channels/so.m3u` | | +| South Africa | 3 | `https://iptv-org.github.io/iptv/channels/za.m3u` | `http://i.mjh.nz/za/DStv/epg.xml.gz` | +| South Korea | 83 | `https://iptv-org.github.io/iptv/channels/kr.m3u` | | +| Spain | 185 | `https://iptv-org.github.io/iptv/channels/es.m3u` | `http://195.154.221.171/epg/guidespain.xml.gz` | +| Sri Lanka | 6 | `https://iptv-org.github.io/iptv/channels/lk.m3u` | | +| Sudan | 7 | `https://iptv-org.github.io/iptv/channels/sd.m3u` | | +| Suriname | 0 | `https://iptv-org.github.io/iptv/channels/sr.m3u` | | +| Sweden | 12 | `https://iptv-org.github.io/iptv/channels/se.m3u` | `http://195.154.221.171/epg/guidesweden.xml.gz` | +| Switzerland | 29 | `https://iptv-org.github.io/iptv/channels/ch.m3u` | `http://195.154.221.171/epg/guideswitzerland.xml.gz` | +| Syria | 15 | `https://iptv-org.github.io/iptv/channels/sy.m3u` | `http://195.154.221.171/epg/guidearab.xml.gz` | +| Taiwan | 36 | `https://iptv-org.github.io/iptv/channels/tw.m3u` | | +| Tajikistan | 1 | `https://iptv-org.github.io/iptv/channels/tj.m3u` | | +| Tanzania | 2 | `https://iptv-org.github.io/iptv/channels/tz.m3u` | | +| Thailand | 58 | `https://iptv-org.github.io/iptv/channels/th.m3u` | | +| Togo | 0 | `https://iptv-org.github.io/iptv/channels/tg.m3u` | | +| Trinidad and Tobago | 1 | `https://iptv-org.github.io/iptv/channels/tt.m3u` | | +| Tunisia | 4 | `https://iptv-org.github.io/iptv/channels/tn.m3u` | `http://195.154.221.171/epg/guidearab.xml.gz` | +| Turkey | 94 | `https://iptv-org.github.io/iptv/channels/tr.m3u` | `http://195.154.221.171/epg/guideturkey.xml.gz` | +| Turkmenistan | 10 | `https://iptv-org.github.io/iptv/channels/tm.m3u` | | +| Uganda | 2 | `https://iptv-org.github.io/iptv/channels/ug.m3u` | | +| Ukraine | 182 | `https://iptv-org.github.io/iptv/channels/ua.m3u` | `https://iptvx.one/epg/epg.xml.gz` | +| United Arab Emirates | 143 | `https://iptv-org.github.io/iptv/channels/ae.m3u` | `http://195.154.221.171/epg/guidearab.xml.gz` | +| United Kingdom | 74 | `https://iptv-org.github.io/iptv/channels/uk.m3u` | `http://195.154.221.171/epg/guideuk.xml.gz` | +| United States | 502 | `https://iptv-org.github.io/iptv/channels/us.m3u` | `http://epg.streamstv.me/epg/guide-usa.xml.gz` | +| Uruguay | 5 | `https://iptv-org.github.io/iptv/channels/uy.m3u` | | +| Uzbekistan | 0 | `https://iptv-org.github.io/iptv/channels/uz.m3u` | | +| Venezuela | 13 | `https://iptv-org.github.io/iptv/channels/ve.m3u` | | +| Vietnam | 130 | `https://iptv-org.github.io/iptv/channels/vn.m3u` | | +| Virgin Islands of the United States | 1 | `https://iptv-org.github.io/iptv/channels/vi.m3u` | | +| Western Sahara | 1 | `https://iptv-org.github.io/iptv/channels/eh.m3u` | | +| Yemen | 2 | `https://iptv-org.github.io/iptv/channels/ye.m3u` | | +| Zimbabwe | 2 | `https://iptv-org.github.io/iptv/channels/zw.m3u` | | diff --git a/helpers/generate.js b/helpers/generate.js index cbcd3d6459..c69dfadba7 100644 --- a/helpers/generate.js +++ b/helpers/generate.js @@ -14,6 +14,11 @@ categories.forEach(category => { buffer[category] = [] }) +let repo = { + categories: {}, + countries: {} +} + function main() { console.log(`Parsing 'index.m3u'...`) const playlist = util.parsePlaylist('index.m3u') @@ -33,6 +38,8 @@ function main() { const filename = `categories/${category}.m3u` console.log(`Creating '${filename}'...`) util.createFile(filename, '#EXTM3U\n') + const categoryName = util.supportedCategories.find(c => c.toLowerCase() === category) || 'Other' + repo.categories[category] = { category: categoryName, channels: 0, playlist: `\`https://iptv-org.github.io/iptv/${filename}\`` } } for(let country of countries) { @@ -44,6 +51,9 @@ function main() { code: util.getBasename(country.url).toUpperCase() } + const epg = playlist.header.attrs['x-tvg-url'] ? `\`${playlist.header.attrs['x-tvg-url']}\`` : '' + repo.countries[c.code] = { country: c.name, channels: playlist.items.length, playlist: `\`https://iptv-org.github.io/iptv/${country.url}\``, epg } + for(let item of playlist.items) { let channel = util.createChannel(item) @@ -81,9 +91,28 @@ function main() { if(!util.checkCache(channel.url)) { util.appendToFile(`categories/${category}.m3u`, channel.toString()) util.addToCache(channel.url) + repo.categories[category].channels++ } } } + + const categoriesTable = util.generateTable(Object.values(repo.categories), { + columns: [ + { name: 'Category', align: 'left' }, + { name: 'Channels', align: 'right' }, + { name: 'Playlist', align: 'left' } + ] + }) + util.createFile('./helpers/categories.md', categoriesTable) + const countriesTable = util.generateTable(Object.values(repo.countries), { + columns: [ + { name: 'Country', align: 'left' }, + { name: 'Channels', align: 'right' }, + { name: 'Playlist', align: 'left' }, + { name: 'EPG', align: 'left' } + ] + }) + util.createFile('./helpers/countries.md', countriesTable) } main() diff --git a/helpers/markdown.json b/helpers/markdown.json new file mode 100644 index 0000000000..06857c720a --- /dev/null +++ b/helpers/markdown.json @@ -0,0 +1,4 @@ +{ + "build" : "README.md", + "files" : ["./helpers/_readme.md"] +} \ No newline at end of file diff --git a/helpers/util.js b/helpers/util.js index e79a6697aa..15d4ba3337 100644 --- a/helpers/util.js +++ b/helpers/util.js @@ -5,6 +5,7 @@ const axios = require('axios') const zlib = require("zlib") const DOMParser = require('xmldom').DOMParser const urlParser = require('url') +const tablemark = require('tablemark') const supportedCategories = [ 'Auto','Business', 'Classic','Comedy','Documentary','Education','Entertainment', 'Family','Fashion','Food', 'General', 'Health', 'History', 'Hobby', 'Kids', 'Legislative','Lifestyle','Local', 'Movies', 'Music', 'News', 'Quiz', 'Religious','Sci-Fi', 'Shop', 'Sport', 'Travel', 'Weather', 'XXX' ] @@ -219,6 +220,10 @@ function skipPlaylist(filename) { return false } +function generateTable(data, options) { + return tablemark(data, options) +} + module.exports = { parsePlaylist, sortByTitleAndUrl, @@ -233,5 +238,6 @@ module.exports = { clearCache, validateUrl, skipPlaylist, - supportedCategories + supportedCategories, + generateTable } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6e5dbf7314..2b05e13fe4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,6 +56,12 @@ "debug": "=3.1.0" } }, + "get-stdin": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", + "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=", + "dev": true + }, "iptv-playlist-parser": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/iptv-playlist-parser/-/iptv-playlist-parser-0.2.2.tgz", @@ -72,24 +78,105 @@ "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==", "dev": true }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", + "dev": true + }, "m3u8-file-parser": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/m3u8-file-parser/-/m3u8-file-parser-0.2.2.tgz", "integrity": "sha512-OW2m2wcVh4g55MKpe5jxp4AOkpUVQEuaXEF8YTnIP1eAPmLtmuzfk+QcHqA+raqK3zdkz/nHjNvoCKn0k6UgzA==", "dev": true }, + "markdown-include": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/markdown-include/-/markdown-include-0.4.3.tgz", + "integrity": "sha1-usZVVALG2pOg9SlSIl37mmzMcxs=", + "dev": true, + "requires": { + "q": "^1.2.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, + "no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "dev": true, + "requires": { + "lower-case": "^1.1.1" + } + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, "regenerator-runtime": { "version": "0.13.3", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==", "dev": true }, + "sentence-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-2.1.1.tgz", + "integrity": "sha1-H24t2jnBaL+S0T+G1KkYkz9mftQ=", + "dev": true, + "requires": { + "no-case": "^2.2.0", + "upper-case-first": "^1.1.2" + } + }, + "split-text-to-chunks": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/split-text-to-chunks/-/split-text-to-chunks-1.0.0.tgz", + "integrity": "sha512-HLtEwXK/T4l7QZSJ/kOSsZC0o5e2Xg3GzKKFxm0ZexJXw0Bo4CaEl39l7MCSRHk9EOOL5jT8JIDjmhTtcoe6lQ==", + "dev": true, + "requires": { + "get-stdin": "^5.0.1", + "minimist": "^1.2.0" + } + }, + "tablemark": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tablemark/-/tablemark-2.0.0.tgz", + "integrity": "sha512-bgvShWeSUIWO4j6NH7wGrn1xUQMJ/LRZFIRWE6ka5CFNfQ5qOP9FB4amKCurUUr7C0K4AJGHYDLkaf8A6t5Aww==", + "dev": true, + "requires": { + "sentence-case": "^2.1.1", + "split-text-to-chunks": "^1.0.0" + } + }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", + "dev": true + }, + "upper-case-first": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-1.1.2.tgz", + "integrity": "sha1-XXm+3P8UQZUY/S7bCgUHybaFkRU=", + "dev": true, + "requires": { + "upper-case": "^1.1.1" + } + }, "xmldom": { "version": "0.1.27", "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz", diff --git a/package.json b/package.json index 06ee134418..3760fcf3ef 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,8 @@ "scripts": { "test": "node test/index.js", "generate": "node helpers/generate.js", - "format": "node helpers/format.js" + "format": "node helpers/format.js", + "generate:readme": "node_modules/.bin/markdown-include ./helpers/markdown.json" }, "author": "Arhey ", "private": true, @@ -12,6 +13,8 @@ "devDependencies": { "axios": ">=0.18.1", "iptv-playlist-parser": "^0.2.2", + "markdown-include": "^0.4.3", + "tablemark": "^2.0.0", "xmldom": "^0.1.27" } }