8000 GitHub - suuhm/xmltv-splitter: tool to filter an XMLTV EPG file by specific channels. Ideal for use with TVHeadend, Plex, or any XMLTV-compatible app · GitHub
[go: up one dir, main page]

Skip to content
{"props":{"color_mode":"dark","logged_in":false,"marketing_page":false,"home_path":"/","login_path":"/login?return_to=https%3A%2F%2Fgithub.com%2Fsuuhm%2Fxmltv-splitter","signup_path":"/signup?ref_cta=Sign+up\u0026ref_loc=header+logged+out\u0026ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E\u0026source=header-repo\u0026source_repo=suuhm%2Fxmltv-splitter","signup_enabled":true,"is_signup_controller":false,"show_search_and_nav":true,"hide_search":false,"private_mode_enabled":false,"should_use_dotcom_links":true,"auth_hydro_click":"{\"event_type\":\"authentication.click\",\"payload\":{\"location_in_page\":\"site header menu\",\"repository_id\":null,\"auth_type\":\"SIGN_UP\",\"originating_url\":\"https://github.com/suuhm/xmltv-splitter\",\"user_id\":null}}","auth_hydro_click_hmac":"292835cbde2ea80e1be119aefbd0e94c7a465004d29700810226188f22421079"}}

About

tool to filter an XMLTV EPG file by specific channels. Ideal for use with TVHeadend, Plex, or any XMLTV-compatible app

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

xmltv-splitter

tool to filter an XMLTV EPG file by specific channels. Ideal for use with TVHeadend, Plex, or any XMLTV-compatible app

XMLTV Splitter is a lightweight Python script that filters large XMLTV EPG files down to only the channels you care about — by name or from a remote source.


✅ Features

  • Filter EPG data for specific channels by display name
  • Accepts input from a local file or remote URL
  • Automatically removes broken stop="19700101..." entries
  • Fixes common character encoding issues (Latin-1 interpreted as UTF-8)
  • Outputs clean, valid XMLTV for use with TVHeadend, Plex, etc.

📦 Requirements

  • Python 3.6+
  • lxml library

Install via pip:

pip install lxml

🚀 Usage

From a local file:

python3 xmltv-splitter.py \
  --input epg.xml \
  --output epg_filtered.xml \
  --channels RTL,ProSieben,ProSieben Maxx

From a remote URL:

python3 xmltv-splitter.py \
  --url-extern https://example.com/guide.xml \
  --output epg_filtered.xml \
  --channels RTL,ProSieben

Import to TVHeadend EPG XMLTV Grabber

cat epg_filtered.xml | socat - UNIX-CONNECT:/etc/tvheadend/epggrab/xmltv.sock

📂 Arguments

Option Description
--input Path to local XMLTV input file (optional if --url-extern)
--url-extern URL to download XMLTV file (optional if --input used)
--output Path to save the filtered XMLTV result
--channels Comma-separated list of display names to include

🧹 Post-processing

Filtered XMLTV output will:

  • Contain only matching <channel> and <programme> entries
  • Remove broken stop-times (1970-01-01)
  • Normalize character encodings (fix Günther → Günther)

📜 License

MIT License. Use at your own risk.


💡 Contributions

Feel free to submit pull requests or open issues!

About

tool to filter an XMLTV EPG file by specific channels. Ideal for use with TVHeadend, Plex, or any XMLTV-compatible app

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

0