diff --git a/xml_cleaner_v3.sh b/xml_cleaner_v3.sh index 2c1d689..4f06865 100644 --- a/xml_cleaner_v3.sh +++ b/xml_cleaner_v3.sh @@ -7,6 +7,7 @@ raw="/data/xmltv.xml" parse_output="/data/parsed_new_epg.xml" update_output="/data/updated_new_epg.xml" format_output="/data/formatted_new_epg.xml" +final_output="/data/ep_corrected_new_epg.xml" rm $parse_output $update_output $format_output @@ -26,6 +27,7 @@ if [ -f "/tmp/newtmpxmltv.xml" ]; then rm /tmp/newtmpxmltv.xml fi +# On change les channels-id d'UpTélé pour concorder avec ceux dans notre Ministra cp $parse_output /tmp/tmpxmltv.xml while read LINE; do @@ -39,5 +41,8 @@ done < channels_translate.txt mv /tmp/tmpxmltv.xml $update_output +# On ajuste/ajoute l'élément pour être en format S00E00 +xmlstarlet tr -s /opt/tmpl.xsl $update_output > $format_output + # On format le xml pour un bon indent -xmlstarlet fo -t $update_output > $format_output \ No newline at end of file +xmlstarlet fo -t $format_output > $final_output \ No newline at end of file