TV_CAT(1)

πŸ“¦ version 1.4.0, in alpine 3.24

πŸ’… tv_cat β€” the XMLTV concatenator bestie πŸ’…

okay so this is TV_CAT(1), from the User Contributed Perl Documentation section β€” and no cap, it's a whole vibe. let's get into it 🫢


✨ NAME ✨

tv_cat β€” literally just concatenates XMLTV listings files. that's the whole job. iconic behavior, honestly πŸŽ€

🌸 SYNOPSIS 🌸

tv_cat [--help] [--utf8] [--output FILE] [FILE...]

that's it. that's the whole invocation. slay πŸ’…

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea: it reads one or more XMLTV files, and then it writes a file out to standard output. and what's in that file? the programmes are the concatenation of the programmes from all your input files, and the channels are the union of the channels from all your input files. math girl summer πŸ”₯

  • --output FILE β€” write to FILE instead of standard output. simple as that, bestie.

so why are programmes and channels treated slightly differently? great question, i'm so glad you asked 🧚 it's because for programmes, the ordering is important β€” typically programmes get processed or displayed in the same order as they appear in the input, yk? but channels are just a set, indexed by channel id, so order doesn't really matter for them. also, if channel details clash for the same id, you get a warning. so watch out πŸ‘€

one more wrinkle (and bestie there's always a wrinkle 😭): the credits β€” y'know, source, generator and so on β€” they get taken from one of the files, and then there's a warning if the other files differ. so if your files are disagreeing about who made them, you'll hear about it.

and now the big one: if two input files have different character encodings, then it is not meaningful to combine their data (not without recoding or other processing, anyway) and tv_cat will straight up die with an error message. dramatic? yes. correct? also yes πŸ’€

but bestie β€” if you do want to combine multiple input files with different character encodings, there's a way out: use the --utf8 command-line parameter, and it'll create a combined output file in UTF-8 format. πŸ¦‹

and some notes on that, because apparently we're doing notes now:

Note: it is not safe to combine mixed encodings to anything other than UTF-8, so no other output encoding is provided for. periodt.
Note 2: any input file which does not have an encoding specified in the xml tag is not only naughty but is assumed to already be UTF-8 β€” which may not be true! πŸ™ˆ so like. be aware.

finally, the honest-to-god truth: this tool is rather useless, but it makes a good testbed for the XMLTV module. it's giving "I'm not the main character but I'm still in the group chat" energy and honestly? respect πŸ’œ

πŸ¦‹ SEE ALSO πŸ¦‹

xmltv(5). go read it, iykyk ✨

πŸ‘‘ AUTHOR πŸ‘‘

Ed Avis, ed@membled.com β€” thank you for your service 🫢


and that's the whole page, bestie!! 🌈 this one's from perl v5.42.2, dated 2025-06-30 β€” so yeah, go forth and concatenate your listings, and remember: keep those encodings consistent unless you're using --utf8. mwah πŸ’‹β­

πŸ“¦ where this page comes from