.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "TV_MERGE 1p" .TH TV_MERGE 1p 2024-02-24 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME tv_merge \- Merge (combine) two XMLTV files. .SH SYNOPSIS .IX Header "SYNOPSIS" tv_merge [\-t] \-i FILE \-m FILE \-o FILE .SH DESCRIPTION .IX Header "DESCRIPTION" Read XMLTV listings from two files and merge them together. Unlike tv_cat (which just joins files) this will update (add/replace/delete) the original XMLTV file with channels and programmes contained in the second file. .PP It works with multiple channels, and will insert any new programmes and delete any overlapping programmes. .PP \&\fBIMPORTANT\fR The input files must be pre-sorted into datetime within channel order by using the "\-\-by\-channel" option to tv_sort: .PP .Vb 1 \& tv_sort \-\-by\-channel \-\-output FILE FILE .Ve .PP All programmes must have start and stop times. .PP (Note: programmes in the merged-in file \fIreplace\fR any in the master file, i.e. data are not updated \fIwithin\fR programmes) .PP This program uses XML::TreePP which doesn't write definitions in the output file. If you need to add a suitable tag then use the optional \&\-t parameter: .PP .Vb 1 \& tv_merge \-t \-i FILE \-m FILE \-o FILE .Ve .SH EXAMPLE .IX Header "EXAMPLE" To merge all channels/programmes in \fInewadditions.xml\fR into \fImaster.xml\fR, and write the output to \fInewmaster.xml\fR with a DOCTYPE tag: .PP .Vb 1 \& tv_merge \-t \-i master.xml \-m newadditions.xml \-o newmaster.xml .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBtv_sort\fR\|(1), \fBXMLTV\fR\|(3) .SH AUTHOR .IX Header "AUTHOR" Copyright Geoff Westcott, February 2013. .PP This code is distributed under the GNU General Public License v2 (GPLv2).