/* $Id: README.xmltv2mei,v 1.4 2005/05/11 11:49:08 d1mag Exp $ */

--------------------------
README file to xmltv2mei
--------------------------
This is a converter from the xmltv-output (such as tv_grab_se_swedb) to a MyStuff.mei file.
So far, this program is only tested in Sweden with the Swedish distributor Boxer.
It allows you to download 7 days of EPG-information from the internet
and upload it to you Topfield 5700PVRt.

I have tried xmltv2mei with the output from tv_grab_uk_bleb & tv_grab_uk_rt quickly, and
it seems to work. I have no correct lcnfile to include yet, so you have to write your own
and perhaps submit it to me to make it useable for UK-users.

------------------------------------------

Quick example:
# tv_grab_se_swedb --days 7 --output /tmp/epg.xml
# xmltv2mei -c -t -i /tmp/epg.xml -l /opt/etc/xmltv2mei/lcnfile_se_boxer.conf -o MyStuff.mei

The lcnfile.conf should contain a list of all the channels-names + LCN-number (channel-number on your Toppy)
If you want to use xmltv2mei other distributors than Boxer in Sweden, then you have to create your own lcn-file.

------------------------------------------

Requirements:
	Toppy 5700PVRt (other models should work as well)
	      MyStuff 5.51
	      eit2mei Beta 7.8m3
	      DescriptionExtender 2.22

	A host server with (Fedora Core 7 + NSLU2 with Unslung 6.8 & 6.10 tested):
	      xmltv (to download epg-information from the internet)
	      puppy (to upload the mei-file to your Topfield.
	      Lots of perl-packages... (used by xmltv)

------------------------------------------

Installation:

If you want to upload the MyStuff.mei file from your NSLU2 to the Toppy, then you should install
the following packages from my repository.

# echo "src/gz mag http://owfs.sourceforge.net/nslu2/packages" > /etc/ipkg/mag-feed.conf
# ipkg update
# ipkg install xmltv2mei
# ipkg install xmltv-se       (xmltv-se only contains tv_grab_se_swedb)
                              (xmltv-all only contains almost all xmltv-modules,
                               but requires many more perl-packages to be installed)
# ipkg install puppy
# ipkg install ntpclient      (Correct time in your NSLU2 is needed)
# ipkg install ftpd-topfield  (optional package if you want ftp-access to your Toppy)

It might be helpful to add a cronjob to set the clock in your NSLU2 automatically...
1,21,41 * * * * root /opt/bin/ntpclient -s -l -h pool.ntp.org >>/var/log/ntp.log && /usr/sbin/hwclock --systohc --utc &>/dev/null 


Configure Mystuff to use the new MyStuff.mei with the following options:
N1 Always
N2 7 days (to warn you if the MyStuff.mei file is old)

------------------------------------------

Test your xmltv2mei-installation:

I have included some scripts and config-files to test xmltv + xmltv2mei.

config/tv_grab_se_swedb.conf.default
        This file ontains some default channels distributed by Boxer in Sweden.
        This could be copied to ~/.xmltv/tv_grab_se_swedb.conf if you don't want to run
           "tv_grab_se_swedb --configure" manually
config/lcnfile_se_boxer.conf
        This file contains some default channels + LCN-number distributed by Boxer in Sweden.
        This could be copied to /etc/xmltv2mei/lcnfile_se_boxer.conf for example.


# test_xmltv2mei.sh
	Creates a epg.xml file with xmltv (tv_grab_se_swedb)
	Converts the epg.xml file to MyStuff.mei

# cron_xmltv2mei_se.sh
	(This script is based on rt2mei)
	Creates a epg.xml file with xmltv (tv_grab_se_swedb)
	Converts the epg.xml file to MyStuff.mei
	Uploads the file to your Toppy with "puppy".


/Christian Magnusson
E-mail: mag@mag.cx

