Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Freevo Wiki" for change 
notification.

The following page has been changed by 134.102.218.42:
http://freevo.sourceforge.net/cgi-bin/moin.cgi/DocumentationPage_2fXmlTv

------------------------------------------------------------------------------
@@ -1,277 +1 @@
-'''Index'''[[TableOfContents]]
-
-
-
-= XMLTV =
-
-''How can I get the XML files for my TV listings?''
-
-You can use scripts from the [http://membled.com/work/apps/xmltv/ XMLTV 
project] to pull XML files describing your local programming. Put them in 
/tmp/TV.xml so that freevo can find them.  Run tv_grab_na (if you are in the 
US) with the --configure once to have it ask you for your location and figure 
out the channels you want. You now need to carefully read the instructions in 
the TV section of the freevo_config.py file to '''manually''' set up the 
channels for your system.
-
-Also, if your listing provider supports it, you can use station cover logos 
into the freevo interface. To download and prepare the cover logos for usage in 
freevo, all you need to do is run the makelogos.py program. Then, the next time 
you go into the TV guide, you'll see all the stations logos.
-
-== Installation ==
-
-XMLTV: [http://sourceforge.net/project/showfiles.php?group_id=39046 
http://sourceforge.net/project/showfiles.php?group_id=39046] [[BR]]
-
-To install XMLTV, a number of modules are required, for convenience, here are 
some places to get the modules, "precompiled":
-
-RPMS:
-
-Manually download from [http://atrpms.physik.fu-berlin.de/dist/fc1/xmltv/] or
-
-Install [http://atrpms.physik.fu-berlin.de/name/apt/ apt-get] as suggested on 
the site. There are a lot of different Perl dependendencies which apt-get will 
take care of for you. As of writing (03/03/2004) you need to add 
-
-rpm http://apt.physik.fu-berlin.de fedora/1/en/i386 at-bleeding 
-
-to your /etc/apt/sources.list
-
-to get all of xmltv installed as it needs the "bleeding-edge" installation of 
pwlib to satifsfy dependancies. Be sure to change it back to at-testing, 
at-good or at-stable as other bleeding edge packages may lead to alot of 
instability.
-
-If prefered a yum repository is also available - 
-
-[atrpms testing]
-name=Red Hat Linux 9 ATrpms testing
-baseurl=http://apt.physik.fu-berlin.de/fedora/1/en/i386/at-bleeding
-
-Debian Packages:
-[http://packages.qa.debian.org/x/xmltv.html 
http://packages.qa.debian.org/x/xmltv.html]
-
-The XMLTV README has instructions for using the Perl CPAN method of 
downloading and installing missing modules. [[BR]]
-Try using "force install <modulename>" if the regular install fails due to 
broken tests. The CPAN install process is quite noisy, make sure to read all 
output to find the real problem when a step fails.
-
-
-== Grabbing listings ==
-
-Configure xmltv via the xmltv documented installation instructions.
-Then run the xml tv guide grabber periodically to have it pull the XML files 
describing your television programming.
-
-For automatic downloading, you can add a line like this to your crontab:
- {{{
-0 3 * * * /usr/bin/tv_grab_na --days=2 > /tmp/TV.xml 2>/tmp/TV.xml.error &
-}}}
-
-The "2>/tmp/TV.xml.error" bit saves the grabber's stderr output to a file.  
The "&" backgrounds the grabbing process.  Without the "&", XMLTV will run in 
the foreground and if the process takes more than a minute, cron will kill it, 
leaving you with a partial XML file that Freevo can't use.
-
-The Freevo module "epg_xmltv.py" can be run standalone to generate a 
translated version of the TV guide that makes the first startup a lot quicker.
-''NOTE'' Add better instructions
-
-
-Here's another shell script that you can cron that may help you out.
- {{{
-#!/bin/sh
-
-/usr/bin/tv_grab_na --listings "$HOME/freevo/xmltv/listings_%d%m%Y.xml" --days 
1
-rm /tmp/TV.xml
-ln -s `date +'$HOME/freevo/xmltv/listings_%d%m%Y.xml'` /tmp/TV.xml
-}}}
-
-=== Belgian(Dutch) listings ===
-
-The old xml_tv_be.py script has been removed from the Freevo CVS repository. A 
new grabber was developped to replace it. The new tv grabber is part of the 
PyTVGrab package and can be found at the following adress : 
http://pytvgrab.sourceforge.net 
-
-Usage is the same as the Perl XMLTV scripts. More documentation can be found 
on the PyTVGrab Site
-
- * download the guide for the next two days :
- {{{
-# tv_grab_be_tvb -n2 -o /tmp/TV.xml
-}}}
- * download the guide for the next n days, example 7 days :
- {{{
-# tv_grab_be_tvb -n7 -o /tmp/TV.xml
-}}}
-
-
-=== Dutch listings ===
-
-Use tv_grab_nl from the XMLTV package for NL listings or use PyTVGrab (See 
above)
-
-As an alternative, you can use the script from 
http://www.addictivesoftware.net/index.php?option=content&task=view&id=3&Itemid=28.
 The maintainer of the script gives the following description of the script:
-
-''Because the standard tv_grab_nl script can be quite a strain on the 
www.tvgids.nl website and takes about an hour to get 1 day of detailed 
information. I wrote a script to get that info once a night, and make the 
resulting xml available. The tv_grab_nl_wolf script from XMLTV does a similar 
thing, but this script only parses the minimum information required, 
programname, channel and start/stop times, and I wanted the extended info.''
-
-As an added feature, the script contains imagelinks for all the channel logo's.
-
-=== Danish listings ===
-
-Use tv_grab_dk from the XMLTV package for danish listings.
-
-=== UK listings ===
-
-The tv_grab_uk_rt script from the XMLTV package for UK listings is no longer 
working.  I found the following from the 
[http://www.mail-archive.com/[email protected]/msg05710.html 
mailing lists] worked:
- {{{
-#!/bin/bash
-# Get yesterday's, and the following weeks' listings in XMLTV format
-#
-BASE_URL='http://bleb.org/tv/data/listings'
-DAYS=-1,0,1,2,3,4,5,6
-FORMAT=XMLTV
-FILE=BZIP2
-TIME_OFFSET="+0060"
-CHANNELS=bbc1,bbc2,itv1,ch4,five,sky_one,uk_history,uk_horizons,e4,itv2,cartoon_network,uk_gold,bbc_radio4,bbc3,bbc4,bbc7
-wget -U 'Freevo Listing' -O '/tmp/listings.xml.bz2' 
"$BASE_URL?days=$DAYS&format=$FORMAT&file=$FILE&channels=$CHANNELS"
-rm -f /tmp/listings.xml
-bunzip2 /tmp/listings.xml.bz2
-cat /tmp/listings.xml | perl -pi -e 's/(\d{14,})/$1 ${TIME_OFFSET}/g' 
>/tmp/TV.xml
-cd /usr/lib/python2.3/site-packages/freevo/
-su -c "freevo execute tv/epg_xmltv.py" freevo
-}}}
-
-=== North American listings ===
-
-XMLTV 0.5.32 is out tv_grab_na_dd from version 0.5.31 was a preview release 
0.5.32 has different arguments. zap2it has notified XMLTV developers that 
changes to their site in mid may 2004 will break tv_grab_na.
-XMLTV will discontinue tv_grab_na in further releases in favor of 
tv_grab_na_dd.
-
-UPDATE Apr 2/04 from XMLTV website: The latest version is 0.5.31. This fixes 
some grabber problems with the changeover from winter to summer time in many 
countries, and '''adds a new grabber tv_grab_na_dd for US and Canadian 
listings''' using the Zap2it Data Direct service. (Sign up using certificate 
code TGYM-ZKOC-BUTV). It also has some other fixes in various grabbers and 
tv_check
-
-TIP: Upgrade to XMLTV 5.23 or higher as earlier versions will now give you an 
error similar to "check your postal code/zip code"
-
-Because the provider of North American listings has recently stopped providing 
stop time data, an extra step is required to guess the stop times if you are a 
user of the ''tv_grab_na'' tool. The simplest way to fix it is to re-process 
the guide with ''tv_sort'', which will fix the broken listings. (''tv_sort'' is 
included with xmltv, so you shouldn't need to install anything)
-
- {{{
-#!/bin/sh
-
-todayis=`date +%Y%m%d`
-/usr/bin/tv_grab_na --days 1 | tv_sort > 
$HOME/freevo/xmltv/listings_$todayis.xml
-rm -f /tmp/TV.xml
-ln -s $HOME/freevo/xmltv/listings_$todayis.xml /tmp/TV.xml
-}}} 
-
-=== German listings ===
-
-Use tv_grab_de from a recent XMLTV package (currently  0.5.15).
-After configuring your local_conf.py (see above) you need to edit the TV 
Settings
-to specify the Tuner Id's.
-
-It seems that tv_grab_de doesn't work anymore, use tv_grab_de_tvtoday instead,
-coming with official XMLTV package since Version 0.5.30.
-(http://sourceforge.net/project/showfiles.php?group_id=39046)
-
-=== Swedish listings ===
-
-The swedish listings grabber is now called tv_grab_se since tv_grab_sn broke.
-
-Seems like freevo 1.3.4 dosent handle the channelnames correctly, they will be 
named
-to something like 14.dagenstv.com in xmltv. But when you try to schedule it 
with freevo
-it get's renamed to 14.dagenscom. You have to change a line in the tv_grab_sn 
in order
-to get it to work (might be changed in freevo cvs to handle the original names 
thow..).
-Jump to the line 268 and change
-    my $ch_xid = "$ch_did.dagenstv.com";
-to
-    my $ch_xid = "$ch_did";
-then edit your xmltv names in local_config.py to point to 14 instead of 
14.dagenstv.com.
-Dont really know if anyone else were experiencing any problems on this matter, 
but anyway,
-if you are > here's the solution ;)
-
-
-=== New Zealand listings ===
-
-tv_grab_nz appears to have some problems in the version tested as of 
xmltv-0.5.31. Things appear to work ok, but TVTime doesn't interpret the lack 
of +1200 in the start and stop of channels so you end up with out of synch 
time. 
-
-=== Australia ===
-
-search Google for "tv_grab_au". Its not part of the xmltv package yet, but its 
usable and its out there.
-
-There is an error in the listings source for Australia where xml special 
characters are escaped twice, so you get &amp;amp rather than &amp; . Here's a 
small script that grabs the listings and fixes this error.
-
-{{{
-#!/bin/bash -x
-
-XMLTV_FILE="/tmp/TV.xml"
-LISTINGS_FILE=`date +"$HOME/xmltv/listings_%Y%m%d.xml"`
-
-tv_grab_au --output "${LISTINGS_FILE}" --days 7
-
-# make sure the file is larger than 4k - otherwise there was an error in the 
data
-if [ `ls -sk "${LISTINGS_FILE}" | awk '{print $1;}'` -gt 4 ] ; then
-        # fix the double escapes
-        sed -i 's/\&amp;amp;/\&amp;/g' "${LISTINGS_FILE}"
-        echo Listing is good
-        rm "${XMLTV_FILE}"
-        ln -s "${LISTINGS_FILE}" "${XMLTV_FILE}"
-else
-        echo Listing is bad
-fi
-
-freevo schedulefavorites
-
-}}}
-
-
-== Use in Freevo ==
-
-Update the TV_CHANNELS variable in local_conf.py. [[BR]]
-Please see that file for more detailed instructions!
-
-If you're too lazy to edit local_conf.py manually, and you have a /tmp/TV.xml 
file downloaded, here's a small shell script which will generate the TV 
channels for you. You can then change the order or make corrections to the 
naming.
-
- {{{
-# cat /tmp/TV.xml | grep "id=" | awk '{FS="\""; a=a+1; print "(\x27" $2 "\x27, 
" \
-"\x27" $2 "\x27, \x27" a "\x27),"}'
-}}}
-or, alternatively, to create a sorted list:
- {{{
-# grep "<channel id=" /tmp/TV.xml | sed -e 's#^.*<channel 
id="\([^"]\+\)">#\1#g' \
-| sort -n | awk '{a=a+1; printf("(\x27%s\x27, \x27%s\x27, \x27%s\x27),\n", $0, 
$0, a)}'
-}}} 
-
-If the above script is not parsing your TV listing properly, and you TV 
listing looks like:
- {{{
-  <channel id="C20tsn.zap2it.com">
-    <display-name>20 TSN</display-name>
-    <display-name>20</display-name>
-    <icon src="http://tvlistings2.zap2it.com/tms_network_logos/tsn.jpg"; />
-  </channel>
-}}}
-Then try this script:
- {{{
-#!/usr/bin/perl
-
-while (<STDIN>) {
-        chomp;
-        if (/^\s+<channel\sid=\"(.*)\">$/) {
-                $last_id = $1;
-        } elsif (/^\s+<display-name.*>(.+)<\/display-name>$/) {
-                $last_chan = $1;
-        } elsif (/^\s+<display-name>\d+\s(.*)<\/display-name>$/) {
-                $last_name = $1;
-        } elsif (/^\s+<\/channel>$/) {
-                print "('$last_id', '$last_name', '$last_chan'),\n";
-        }
-}
-}}}
-Save it as 'xmltv2freevo.pl' or whatever, and execute it:
- {{{
-./xmltv2freevo.pl </tmp/TV.xml
-}}}
-
-== Thanks ==
-
-Much thanks to James Oakley of the openpvr project, who wrote the Python XMLTV 
parsing module which is used extensively for XMLTV support in Freevo.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+Moved to new Wiki at [http://freevo.sourceforge.net/cgi-bin/doc/XMLTV]


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Freevo-wikilog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-wikilog

Reply via email to