01 January 2009 , ver. 0.50 beta


E2_LOADEPG has the following flow:

1) each download module (skyitaliaweb, skyitaliasat, bskyb, ....) download epg data from its source
2) when download is completed, the module must write epg data in text file (UTF-8 encoded) in e2_loadepg/cache/ directory with a common format (see below)
3) after all download module are executed (see DOWLOAD_MODULE option in e2_loadepg.conf), e2_loadepg read files in cache/ , process them and create
ext.epg.dat


Anyone can write its download module. The module goal is to put epg file in cache/ dir.



File in cache/ directory must have the following structure:


1) 
It's a simple Unix text file (each line end with '\n') encoded in UTF-8


2) 
One file for a single channel and day


3)
FIELD_SEPARATOR it's a three chars (default is '###' ) used to distiguish different fields record


4)
*** FILE NAME ***

"module_name" + FIELD_SEPARATOR + "channel_name" + FIELD_SEPARATOR + "day in format YYYYMMDD"

"channel_name" is encoded to strip illegal chars like "/" and convert in UTF-8  (using fn_escape() , see e2_coremod/stuff.py )
"channel_name" is used only as informational purpose, so you can add other infos into it (i.e. the channel ID)

Example:
skyitalia###cartoon network_473###20080718
raisat###rai4###20081213


5)
*** FILE CONTENT ***

- The first row has a special meaning.
- The following rows are one row for each event
- Events MUST be in ascending time ordered


The first row:
"real channel name (not escaped)" + FIELD_SEPARATOR + "provider name (as in lamedb) , use the special word 'noprovider' if empty provider" + FIELD_SEPARATOR + "other informational stuff (like channel id) (not used by e2_loadepg)"

Example for first row:
BBC1 World###BSKYB###100
Fox###SkyItalia###100
Retequattro###noprovider###800


The following event rows:

"Unix event start time with GMT correction" + FIELD_SEPARATOR + "original event start time (no GMT correction) format HH:MM:SS (used only as informative field, not used by e2_loadpeg)" + FIELD_SEPARATOR + "event title" + FIELD_SEPARATOR + "event description"

"event description" can be empty

Example for event rows:
1216329000###01:10:00###L'avvocato del diavolo###L'avvocato del diavolo - 1997. Un giovane avvocato che ha raggiunto fama e successo dovra lottare per la salvezza della propria anima Con Keanu Reeves, Al Pacino e Charlize Theron.
1229164200###12:30:00###Middle East Business Report###
1229706000###19:00:00###Casa Alice###Puntata 44 - Tutti a casa di Franca Rizzi! Nella cucina di Casa Alice ogni giorno tanti ospiti, chef e artigiani del gusto, trucchi in cucina, consigli per il vino
1229629200###21:40:00###Titeuf###


