Help to Convert epg.xml to e2 epg.dat on windows/linux machine (Not e2 box)

There are 4 replies in this Thread which was already clicked 1,433 times. The last Post () by thatfellow.

  • Does anyone know of a method to generate enigma2 compatible epg.dat from an epg.xml file on a windows or linux machine?

    I have a large epg.xml file (500Mb+) and my e2 box's are crashing out regularly trying to handle it.

    Id love to find a method to parse the epg on a more powerful system & ftp over the finished epg.dat to my box's..


    ChatGPT fell short, it got stuck on hypothetical converters that may or may not exist.. :dizzy face:




    All your problems have been solved countless times before so try the search box before you post!!
    Please do not Request help by PM, use the main forum so Everyone can benefit from the answers.

    • Official Post

    I take it this is for IPTV ?

    I have gone the other way, IE from epg.dat to epg.xml when i used to mess about with cable epg data (back in the good old days.)

    E2 and sat/cable requires 2 .xml files, one for the data, the other for channel.xml (aka service reference)

    That is not as important when dealing with iptv as fake service reference can be used.


    It is probably best to use the same method as e2 machines do, im starting to use chatGPT a hell of a lot lately, im working on a simple plugin using it.....without it i would never have done it.


    Quote

    Yes, the provided Python code can be used to convert EPG data from an XML format to a .dat format. Here's a breakdown of how it works:

    1. Data Structure: The epgdat_class class manages the EPG data structure, including channel and event information.
    2. Adding Events: The add_event method allows you to add events (start time, duration, title, and description) to the internal list.
    3. Preprocessing: The preprocess_events_channel method processes these events for each channel and writes the relevant data to a temporary file.
    4. Final Processing: The final_process method handles the creation of the final .dat file, writing headers and event data in the required binary format.
    5. XML Parsing: While the provided code does not include XML parsing, you would need to implement a method to read your XML file and extract the relevant event data (start time, duration, title, description) before calling the add_event method.

    Thats from epgimporter file attached epgimporter dat py file.zip

    It must be doable if our e2 machines can.

  • You could perhaps ask KiddaC if he could help but to be honest I do not see the benefit if you need to convert then copy epg.dat file over

    RE: The benefit

    Once i get this working, I will automate all the conversions & pulling to box's. I just need to get the initial script sorted first..




    All your problems have been solved countless times before so try the search box before you post!!
    Please do not Request help by PM, use the main forum so Everyone can benefit from the answers.

  • I spent 2 hours+ on GhatGPT, no progress.. I will give it another shot tomorrow.. As you say, this must be very doable (especially on linux machine) if the e2's can to it...




    All your problems have been solved countless times before so try the search box before you post!!
    Please do not Request help by PM, use the main forum so Everyone can benefit from the answers.

Your resource for Enigma2 EPG tools

Get downloads and support for Cool TV Guide, CrossEPG, EPG Importer, IPTV EPG, and satellite/cable program guides. Centralized support and downloads for Enigma2 EPG plugins. Find tools for IPTV, satellite, and cable electronic program guides, including EPGImport, Web Grabber, and more.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!