Modify Dockerfile and xml-cleaner.sh

Updated dockerfile to use cron in order to set up automated script execution once per day, every morning.
This commit is contained in:
Nicolas 2025-06-11 14:41:52 -04:00
parent 6d1243e487
commit 6af77289e5
2 changed files with 3 additions and 9 deletions

View File

@ -1,19 +1,14 @@
FROM debian:12-slim
# Install wget and xmlstarlet, an optimized xml parser. Then clear apt cache
RUN apt update && apt install -y --no-install-recommends \
bash \
wget \
lighttpd \
curl \
xmlstarlet \
&& rm -rf /var/lib/apt/lists/*
# Copy channel id list to data directory, cleaner script to opt directory
COPY xml_tv_ids.txt /data/
COPY xml_cleaner.sh /opt/
# Going to need a static IP adress for this part
# RUN wget -P /data/ --no-check-certificate https://download2.iptvboss.pro/2da279ce-ce9a-4491-8b92-f72c60e92092/xmlonly/CANADA.xml \
# && wget -P /data/ --no-check-certificate https://download2.iptvboss.pro/R5SQ-4GRG-KK00-0XQT-JZ67-7TSA-D5O7-UC1U/xmlonly/USA.xml
# ENTRYPOINT ["/opt/xml_cleaner.sh"]
CMD ["bash"]

View File

@ -6,8 +6,7 @@ wget -q --no-check-certificate https://download2.iptvboss.pro/R5SQ-4GRG-KK00-0XQ
ids="/data/xml_tv_ids.txt"
raw_can_xml="/data/CANADA.xml"
raw_us_xml="/data/USA.xml"
dir=$(dirname "$raw_can_xml")
output="/var/www/html/clean_CANADA_US.xml"
output="/data/clean_CANADA_US.xml"
# On crée les filtres pour trouver les channels/programmes qui nous intéressent
id_filter=$(awk '{printf "@id='\''%s'\'' or ", $0}' "$ids" | sed 's/ or $//')