xmltv-to-jsonapi

Take an XMLTV file and convert to valid JSON:API using relationships

Usage no npm install needed!

<script type="module">
  import xmltvToJsonapi from 'https://cdn.skypack.dev/xmltv-to-jsonapi';
</script>

README

XMLTV to JSON:API Build Status Code Climate issues

Make use of JSON:API's relationship model to work with XMLTV data

Install

$ yarn add xmltv-to-jsonapi

Usage

const fs = require('fs');
const xmltvToJsonapi = require('xmltv-to-jsonapi');

const xmltvData = fs.readFileSync('examples/epg.xml', 'utf-8');

(async () => {
  const result = await xmltvToJsonapi(xmltvData);

  // do something with your json
})();

API

xmltvToJsonapi(input)

input

Type: string | buffer

Takes in the XMLTV data as a string or file buffer