TV_SPLIT(1p)

πŸ“¦
version 1.4.0 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– TV_SPLIT πŸ’–

okay bestie, so tv_split is a User Contributed Perl Documentation page (that's the manual name btw, it lives in section 1p πŸŽ€) and it's literally about splitting XMLTV listings into separate files by date and channel. main character energy fr fr ✨


🌸 SYNOPSIS 🌸

tv_split --output TEMPLATE [FILE...]

πŸ¦‹ DESCRIPTION πŸ¦‹

so what it does: it reads XMLTV listings and splits them into some number of output files. the output file that gets picked for each programme is decided by substitutions on the filename template you hand it. and yeah β€” you can split listings by time and by channel, both at once, slay πŸ’…

the TEMPLATE is a filename, but substitutions get applied to it:

  1. first %channel gets replaced with the id of a programme's channel
  2. and then Date::Manip substitutions (which broadly follow date(1)) get applied based on the start time of each programme

and that's how each programme gets written to a particular output file. periodt.

also, when an output file is created, it will also contain all the channel elements from the input. not me forgetting that detail, it's important ok 😭

you can give one or more input files. if you give more than one, they're concatenated in the same way as tv_cat. if you give no input files at all, then standard input is read. no cap 🫢


🌈 EXAMPLE 🌈

use this:

tv_split --output %channel-%Y%m%d.xml

to separate standard input into separate files for each day and channel. the files will be created with names like bbc1.bbc.co.uk-20020330.xml. iconic naming behaviour honestly πŸ‘‘


πŸ’œ SEE ALSO πŸ’œ


⭐ AUTHOR ⭐

Ed Avis, ed@membled.com.


okay that's the whole vibe check 🧚 this page was brought to you by perl v5.40.1, dated 2025-04-19, and it's TV_SPLIT(1p) from User Contributed Perl Documentation. go split some listings bestie, you got this πŸ’–πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from