DigiGuide Export

Copyright ©1999, 2000 GipsyMedia Limited. All rights reserved.
Please read our open source licence agreement.


What is it for?

This is a facility in DigiGuide v5 that allows you to export your marked programmes (favourites/reminders/smart searches). This is an open system which allows anyone to write their own export DLL to export to any format they want.

We will supply with DigiGuide a DLL to export to a text file, the layout of the text file is taken from a template file so this is completely customisable. This DLL is also open source, you can download it by clicking the link below. By documenting this system and providing the source for this DLL other people can now write their own DLLs to export to other formats, e.g. for importing into PDA programs.

There is a limit to the number of programmes you can export per channel per day, the limit is the number of hours in the day you're exporting for (rounded up) divided by two. Hopefully this will be enough for people's genuine use but will stop people using this feature to steal the programme information.

How do I write my own export DLL?

Just read this documentation, download the example by clicking the link below and away you go. You will need DigiGuide v5 Beta or later, and Microsoft Visual C++ 6.0 to build the example.

The DLL must export two functions, InitialiseA and ExportProgrammeA. InitialiseA will be called once with the path to the output file and the handle of the progress dialog window, and ExportProgrammeA will be called repeatedly with details of each programme. Both functions return a boolean value, True to continue and false if there is a problem, this will stop the export. ExportProgrammeA takes a pointer to a DGE_PROGRAMME structure containing details of the programme, and a handle to the progress dialog window. Don't forget to turn off name mangling for this exported function by declaring it extern "C" !

Currently only ANSI is supported, UNICODE support will be added in the future.

There's just one header files you need: DGEProgramme.h (you can take this file from the example). As this rarely changes it's best to include it in the precompiled header file stdafx.h.

The example is very flexible in the format of the file it produces, you can customise the layout and what information to export by editing the template file ExportTemplate.txt. The export template must be in the same location as the export DLL.

How it works

To export the marked programmes from DigiGuide run client01.exe with the command line parameter /ExportINIFile=<path to INI file>. The INI file contains some information about what to export as shown below. All of the settings are in the "Settings" group, look at the INI file supplied with the example if you are unsure about it.


Setting Value Default Description

DLLPath

String

Required

Path to the DLL to use for exporting the programmes.

FilePath

String

Required

Path to the file to output the programmes to.

StartTime

24-hour time

18:00

Only export programmes on or after this start time.

EndTime

24-hour time

23:59

Only export programmes on or before this end time.

ExportFavourites (version 5.0 and above)

True/False

False

Export favourites?

ExportReminders (version 5.0 and above)

True/False

False

Export reminders?

ExportSmartSearches (version 5.0 and above)

True/False

False

Export smart searches?

DigiGuide 6.0 supports an unlimited number of marker types. By default DigiGuide ships with Reminder, Favourite, Manually Created (was Smart Search), Category, Video and Watch but it is possible to download more or create your own.

You can still use the settings above but if you wish to export any of the new markers you'll need to use the system below:

MarkerTypes Value Default Description

Type0 through to TypeN

String

Required

The name of a marker type you wish to export. Example:


[MarkerTypes]
Type0=Favourite
Type1=Reminder
Type2=Video
Type3=Watch
Type4=Category
Type5=Manually Created						

There are two other optional command line parameters for specifying the date range. By default, the start and end date are the current day. You can change this with the command line parameters /ExportStartDate=dd/mm/yy and /ExportEndDate=dd/mm/yy (it will accept dates in the format dd/mm/yy or dd/mm/yyyy).


Download the export example Download DigiGuide Export Example