Git Product home page Git Product logo

jtv2xmltv's Introduction

jtv2xmltv

JTV to XMLTV converter.

Currently supports only reading JTV file in ZIP format.

Install

git clone https://github.com/tataranovich/jtv2xmltv.git
cd jtv2xmltv
python setup.py install

Usage

Convert EPG in JTV format to XMLTV:

jtv2xmltv [-t timezone] [-e encoding] <-i input> [-o output]

Examples

Convert file examples/TelecomTVepg.zip and save to /tmp/tvguide.xml.

jtv2xmltv -t +0300 -i examples/TelecomTVepg.zip -o /tmp/tvguide.xml

Convert file examples/TelecomTVepg.zip and print to stdout.

jtv2xmltv -i examples/TelecomTVepg.zip -o -

or

jtv2xmltv -i examples/TelecomTVepg.zip

Validate

To validate XML output use following command

jtv2xmltv -i examples/TelecomTVepg.zip -o output.xml
wget https://raw.githubusercontent.com/XMLTV/xmltv/master/xmltv.dtd
xmllint --noout --dtdvalid xmltv.dtd output.xml

jtv2xmltv's People

Contributors

steshan avatar tataranovich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jtv2xmltv's Issues

Long program title in EPG broke recording in tvheadend

Tvheadend use program title from EPG to construct filename for file with recording. If program title is too long, then recording task is unable to create file with very long name:

Sep 21 19:54:30 server tvheadend[914]: dvr: "Т/с "Интерны", 247 с. Жанр: комедия. Рейтинг: 7. Россия, 2010-0000. Доктору Быкову, заведующему терапевтическим отделением, главврач Кисегач поручает шефство над интернами, которые прибыли в больницу на практику. С этого момента жизнь спокойная жизнь доктора Быкова закончилась. На его голову свалилось сраз" on "ТНТ International" recorder starting
Sep 21 19:54:30 server tvheadend[914]: subscription: "DVR: Т/с "Интерны", 247 с. Жанр: комедия. Рейтинг: 7. Россия, 201" subscribing on "ТНТ International", weight: 300, adapter: "eth2", network: "<N/A>", mux: "233.81.116.31", provider: "<N/A>", service: "<N/A>", quality: 100
Sep 21 19:55:01 server tvheadend[914]: mkv: (null): Unable to create file, open failed -- File name too long
Sep 21 19:55:01 server tvheadend[914]: dvr: Recording error: "/home/hts/records/Т-с "Интерны", 247 с. Жанр: комедия. Рейтинг: 7. Россия, 2010-0000. Доктору Быкову, заведующему терапевтическим отделением, главврач Кисегач поручает шефство над интернами, которые прибыли в больницу на практику. С этого момента жизнь спокойная жизнь доктора Быкова закончилась. На его голову свалилось сраз.2015-09-21.20-00.mkv": Unable to open file

Exception: Invalid JTV format

http://dkt.iptvportal.ru/jtv.zip

Traceback (most recent call last):
File "jtv2xmltv.py", line 119, in
main()
File "jtv2xmltv.py", line 115, in main
convert_jtv_to_xmltv(jtv_filename, xmltv_filename, epg_timezone=tz_format)
File "jtv2xmltv.py", line 73, in convert_jtv_to_xmltv
channel_titles = parse_titles(titles)
File "jtv2xmltv.py", line 19, in parse_titles
raise Exception('Invalid JTV format')
Exception: Invalid JTV format

Одно строчный xmltv

Здравствуйте!
Скрипт выводит данные в одну строку. Это очень неудобно.

Multiple increase in output file size

When transferring a certain JTV archive, the resulting output file exceeds 350 MByte. Also, apparently, the xml format breaks in part of the output file and the records in the file, apparently, begin to be duplicated. A cursory analysis showed that some pdt and ndx pairs cause problems. Removing these files solves the problem. It was not possible to find out why certain pairs (pdt and ndx) cause problems. pdt encoding is correct. The ndx file may contain control characters.
An example of a problematic file: https://disk.yandex.ru/d/J4ozlcXM89WUng

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.