From 6d1243e487d798fe2ebcd00c1cb1c621ec0624f9 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Tue, 10 Jun 2025 16:13:47 -0400 Subject: [PATCH] Update README.md --- README.md | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index c49f2c6..40f1843 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,13 @@ -### BREAKDOWN -# On rends le .txt unix-friendly -sed -i 's/\r//' /data/xmltvids.txt - -# On fait un big XPATH avec et on truncate le dernier "or" -awk '{printf "@id='\''%s'\'' or ", $0}' | sed 's/ or $//' -awk '{printf "@channel='\''%s'\'' or ", $0}' | sed 's/ or $//' - -# On filter ce qu'on veut -xargs -0 -I{} xmlstarlet sel -t -c "//channel[{}]" CANADA.xml -xargs -0 -I{} xmlstarlet sel -t -c "//programme[{}]" /data/CANADA.xml - -### FINAL CODE -echo '' > filtered_CANADA.xml -awk '{printf "@id='\''%s'\'' or ", $0}' /data/xmltvids.txt | sed 's/ or $//' | xargs -0 -I{} xmlstarlet sel -t -c "//channel[{}]" /data/CANADA.xml >> filtered_CANADA.xml -awk '{printf "@channel='\''%s'\'' or ", $0}' /data/xmltvids.txt | sed 's/ or $//' | xargs -0 -I{} xmlstarlet sel -t -c "//programme[{}]" /data/CANADA.xml >> filtered_CANADA.xml -echo '' >> filtered_CANADA.xml - -### OPTIONAL PRETTY VERSION -xmlstarlet fo filtered_CANADA.xml > pretty_filtered_CANADA.xml - -### COUNT CHECK -CANADA.xml --> 739 channels, 129 538 programmes -filtered_CANADA.xml --> 173 channels, 39067 programmes - -USA.xml --> 11 668 channels, 975 691 programmes -filtered_USA.xml --> ??? \ No newline at end of file + +## IPTV XML CLEANER +A tool used to remove unnecessary channels and programs from IPTVBoss's exhaustive Electronic program guide. It uses [xmlstarlet](https://xmlstar.sourceforge.net/) to parse through and select relevant info from CANADA and USA, then gathers the data in a new filtered XML which is exposed for the Ministra service by using a combination of [Lighttpd](https://www.lighttpd.net/) and [Nginx Proxy Manager](https://nginxproxymanager.com/). + +### USAGE +IPTV XML Cleaner runs automatically on a fixed schedule and exposes resulting XML file. + +### PERFORMANCE +#### Canadian EPG +173 channels and 39067 programmes, down from 739 channels and 129 538 programmes. Time < 10s + +#### USA EPG +??? channels and ??? programmes, down from 11 668 channels and 975 691 programmes. Time < 50s \ No newline at end of file