FetchEPG BETA 1.00
What is it?
The program downloads TV guides pages from internet and insert them to the SQLite database,
giving you days of EPG overview, at the moment the only images supported is Pli Garnet because
it have SQLite embedded with the Enigma EPG, it aslo requires a storage location specified for the
SQLite database in Pli Garnet (USB is recommended).
Installation
Copy the /var/bin/fetchEPG binary file to a runnable location on your dreambox (/var/bin is recommended)
chmod 755 on the fetchEPG binary file
Choose one of the config file included (Swedish,Danish or United Kingdom) and copy it to /var/etc
Make sure that you have selected SQlite database in EPG settings
How to use it
Log on to your box with telnet or SSH and run the fetchEPG binary file running without any Command line options
is standard and could be used by most users then wait until itīs done
root@DB ~ # fetchEPG
Command line options
-help
Shows small help menu with a small overview on the command line options.
-debug x
Debug messages level from 0 to 4, where 0 is off and 4 is alot
-clean
Removes all in the database before adding all new elements.
-pretend
Donīt add data to the database only show all debug messages, good for testing new sites
-group x
A group can be specified to only update that group (value start on 0), if this options is not uses all group except 0 is updated
Config file structure
name (feed)
Name of the channel only used in messages, not used in the database
group (global,feed*)
Used together with the Command line options -group to specify channels to update
skey (feed)
This is used to specify channel in the database, to get this value select "Information" - "Streaminfo" in enigma menu, check below for the structure
"Service ID":"Original Network ID":"Transport Stream ID"
As for exempel take TV3 Stockholm (5E)
Service ID 044ch
Original Network ID 0056h
Transport Stream ID 0003h
skey=44c:56:3
url (feed)
The URL to the webpage with TV guide info
The follow syntax gets replaced with the the value according to the list
(yyyy) = year (2007)
(mm) = month (03)
(dd) = day (14)
(nr) = a increasing value starting on zero
(NR) = a increasing value starting on one
timezone (global,feed*)
Timezone on the url pages, this could also be used on a channel like TV1000 Plus One to get the times right from a TV1000 url
00:00 = GMT
+01:00 = GMT+1
-01:00 = GMT-1
days (global,feed*)
Days to update, make sure the url have program info to it
locklen (feed*)
Locks the size on the clock len when reading from a webpages used to avoid clocks that is not part of the TV guide info
* = optional
Daily autoupdate epg
To daily update the epg copy cronjob/root to /var/spool/cron/crontabs/ this make the program to run every day at 05:00 using cron,
to change time or adding command line options check below for the structure.
cronjob/root structure +---------------- minute (0 - 59) | +------------- hour (0 - 23) | | +---------- day of month (1 - 31) | | | +------- month (1 - 12) | | | | +---- day of week (0 - 7) (Sunday=0 or 7) | | | | | * * * * * command to be executed 0 5 * * * /var/bin/fetchEPGNote you also need to enable "Start crond" in "Services to run" to start the cron daemon..
Site compatibility
To get a webpage to work with this program it first needs to support changing date in the URL
either using year/month/day in a variable(like date=2007-03-18) or a incresing value in a variable (like day=0).
The program basically support two pages structure with Clock and Programname seperated by htmltags or together
structure 1
clock htmltags programname htmltags description
structure 2
clock programname htmltags description
Iīm aware at the moment it does not work perfect and it easy to break the reader process but hopefully with some work it should get improved
Confirmed working sites
http://tv.tv3.se
http://tv.hallandsposten.se
http://www.dr.dk
http://www.tvguide.co.uk
http://www.realitytv.co.uk
Problems
If the database gets corrupt (malformed error) to do a total clean remove the epg.db & epg.db-journal
then reboot and wait for PLI to be done with the epg file then run the program.
Iīm aware that there is alot of limits in the way the current version handles the reading and understanding
webpages with TV guide info but itīs possible to make it better to anylizing pages but it takes time.
Also the current version donīt support PM/AM clock on a webpage.
Donate:
For further developing please consider to make a donation for all the work that goes in to a project like this.