Re: Help with tv_grep

Karl Dietz <[email protected]>
Newsgroups gmane.comp.tv.xmltv.general
Message-ID <[email protected]>
Am 14.12.2010 03:45, schrieb Karl Dietz:
> Hi,
>
>> How to use tv_grep to select all programs broadcasting between 10.00 and
>> 22.00 from one channel for all days of week.
>
> this example matches all programs where the hour of the start time is
> 10-21 or the hour of the stop time is 10-21 (to catch programs that
> start before 10:00, this will only work if you have stop times)
>
> tv_grep --start "^\d{8}(10|11|12|13|14|15|16|17|18|19|20|21)" \
>           --or --stop "^\d{8}(10|11|12|13|14|15|16|17|18|19|20|21)" \
>           tv.xml>  tv.filtered.xml

and this should add the filtering by channel (example filters all
channels starting with "2")

tv_grep \
     --channel "^2" --and \
     --start "^\d{8}(10|11|12|13|14|15|16|17|18|19|20|21)" \
   --or \
     --channel "^2" --and \
     --stop "^\d{8}(10|11|12|13|14|15|16|17|18|19|20|21)" \
   tv.xml > tv.filtered.xml

This will only filter the available programs, it will not cut programs
at 10am/pm.

Regards,
Karl

PS: If you want to mix 2 channels into one based on some time schedule
you need to handle some more cases, like marking the cut off programs
as partial programs... But I would do such processing on the guide
server.

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.