TV_MERGE(1)

πŸ“¦ version 1.4.0, in alpine 3.24

πŸ¦‹ NAME πŸ¦‹

okay bestie, this is tv_merge(1) β€” the little icon that merges (combines) two XMLTV files. That's the whole name vibe: tv_merge = merge (combine) two XMLTV files, periodt. πŸ’…

✨ SYNOPSIS ✨

Here's the exact group-chat invite, no cap:

tv_merge [-t] -i FILE -m FILE -o FILE

πŸ’– DESCRIPTION πŸ’–

So picture this: you've got XMLTV listings chilling in two files, and tv_merge reads them and merges them together. Unlike tv_cat (which literally just joins files), this one will update (add/replace/delete) the original XMLTV file with the channels and programmes contained in the second file. It's giving glow-up, not just copy-paste. 🫢

It works with multiple channels, and it will insert any new programmes and delete any overlapping programmes. Main character merge behavior, honestly. 🌈

⚠️ IMPORTANT bestie: the input files must be pre-sorted into datetime within channel order by using the --by-channel option to tv_sort. Like, exactly this:
tv_sort --by-channel --output FILE FILE

All programmes must have start and stop times. No skipping that, fr fr.

(Note: programmes in the merged-in file replace any in the master file, i.e. data are not updated within programmes. So it's replace energy, not merge-inside-each-programme energy. πŸ’€)

This program uses XML::TreePP, which doesn't write <DOCTYPE> definitions in the output file. If you need to add a suitable <DOCTYPE> tag, then use the optional -t parameter:

tv_merge -t -i FILE -m FILE -o FILE

🌸 EXAMPLE 🌸

To merge all channels/programmes in newadditions.xml into master.xml, and write the output to newmaster.xml with a DOCTYPE tag:

tv_merge -t -i master.xml -m newadditions.xml -o newmaster.xml

slay. new master file, who dis. πŸ‘‘

πŸ”₯ SEE ALSO πŸ”₯

πŸ‘‘ AUTHOR πŸ‘‘

Copyright Geoff Westcott, February 2013. πŸŽ€

This code is distributed under the GNU General Public License v2 (GPLv2).


mwah πŸ’‹ β€” this page is from perl v5.42.2, dated 2025-06-30, and it's TV_MERGE(1) all the way. 🧚

πŸ“¦ where this page comes from