{"id":24143331,"url":"https://github.com/little-core-labs/hyperepg","last_synced_at":"2026-02-14T04:33:34.226Z","repository":{"id":100550621,"uuid":"348113861","full_name":"little-core-labs/hyperepg","owner":"little-core-labs","description":"Sync and distribute an Electronic Program Guide (EPG) from an XMLTV source.","archived":false,"fork":false,"pushed_at":"2021-03-19T15:42:45.000Z","size":27,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-29T20:01:06.694Z","etag":null,"topics":["distributed","epg","feed","hypercore","hypercore-protocol"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/little-core-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-15T20:30:57.000Z","updated_at":"2021-03-20T02:01:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"f6404c55-feb5-45ce-9fee-41c4d7ce8dd9","html_url":"https://github.com/little-core-labs/hyperepg","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":0.07692307692307687,"last_synced_commit":"24b87125dc0fc510c0c6304787c55f6cb82f0d64"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-core-labs%2Fhyperepg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-core-labs%2Fhyperepg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-core-labs%2Fhyperepg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-core-labs%2Fhyperepg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/little-core-labs","download_url":"https://codeload.github.com/little-core-labs/hyperepg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241374516,"owners_count":19952544,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["distributed","epg","feed","hypercore","hypercore-protocol"],"created_at":"2025-01-12T05:15:15.065Z","updated_at":"2026-02-14T04:33:29.206Z","avatar_url":"https://github.com/little-core-labs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"HyperEPG\n========\n\n\u003e Sync and distribute an Electronic Program Guide (EPG) from an XMLTV source.\n\n## Installation\n\n```sh\n$ npm install hyperepg\n```\n\n## Usage\n\n```js\nconst hyperepg = require('hyperepg')\nconst feed = hyperepg('https://example.com/xmltv/epg.xml')\n\nfeed.ready(() =\u003e {\n  feed.sync() // will broadcast EPG\n})\n```\n\n## API\n\n### `feed = hyperepg(uri[, opts ])`\n\nFactory constructor for a HyperEPG `Feed` instance.\n\n#### `epg? = feed.sync()`\n\nSynchronize feed from network to fetch latest EPG data.\n\n#### `feed.save(document)`\n\nSaves a document to the feed. The feed must be writable.\n\n### `document = hyperepg.createDocument([attributes])`\n\nCreates a [MediaXML](https://github.com/little-core-labs/mediaxml) XMLTV\ndocument.\n\n```js\nconst document = hyperepg.createDocument({\n  'source-info-url': 'https://example.com/xmltv'\n})\n```\n\n### `node = hyperepg.createNode(name[, attributes[, opts]])`\n\n```js\ncreateNode('programme', {\n  channel: '1234.channel',\n  start: new Date().toISOString(),\n  stop: new Date(Date.now() + (60 * 60 * 1000)).toISOString()\n}, {\n  children: [\n    createNode('title', { lang: 'en' }, {\n      children: ['Cool Show']\n    }),\n\n    createNode('desc', { lang: 'en' }, {\n      children: ['A very cool TV show']\n    }),\n\n    ...['Comedy', 'Family'].map((name) =\u003e\n      createNode('category', { lang: 'en' }, {\n        children: [name]\n      }))\n  ]\n})\n```\n\n## Schema\n\n```proto\nsyntax = \"proto3\";\n\nmessage Header {\n  Document document = 1;\n  Slice programmes = 2;\n}\n\nmessage Slice {\n  int64 start = 1;\n  int64 stop = 2;\n}\n\nmessage Document {\n  string sourceInfoUrl = 1;\n  string sourceInfoName = 2;\n  string generatorInfoName = 3;\n  string generatorInfoUrl = 4;\n\n  reserved 5 to 10;\n\n  repeated Channel channels = 12;\n\n  message LocalizedText {\n    string lang = 1;\n    string value = 2;\n  }\n\n  message Icon {\n    string src = 1;\n    float width = 2;\n    float height = 3;\n  }\n\n  message Channel {\n    string id = 1;\n    repeated string urls = 2;\n    reserved 2 to 9;\n    repeated LocalizedText displayNames = 10;\n    repeated LocalizedText descriptions = 11;\n    reserved 12 to 19;\n    repeated Icon icons = 20;\n  }\n\n  message Programme {\n    string id = 1;\n    int64 date = 2;\n    int64 start = 3;\n    int64 stop = 4;\n    string channel = 5;\n    string originalLanguage = 6;\n    repeated string languages = 7;\n    repeated string countries = 8;\n    repeated string keywords = 9;\n    repeated LocalizedText titles = 10;\n    repeated LocalizedText descriptions = 11;\n    repeated LocalizedText subtitles = 12;\n    repeated LocalizedText categories = 13;\n    reserved 14 to 19;\n    repeated Icon icons = 20;\n    reserved 21 to 24;\n    repeated Credit credits = 25;\n    repeated EpisodeNumber episodeNumbers = 26;\n    VideoDescription video = 27;\n    Rating rating = 28;\n  }\n\n  message StarRating {\n    string value = 1;\n  }\n\n  message AudioDescription {\n    bool stereo = 1;\n  }\n\n  message VideoDescription {\n    string aspect = 1;\n    string quality = 2;\n  }\n\n  message Rating {\n    string system = 1;\n    string value = 2;\n    repeated Icon icons = 3;\n  }\n\n  message Credit {\n    repeated string directors = 1;\n    repeated string actors = 2;\n    repeated string presenters = 3;\n    repeated string producers = 4;\n    repeated string writers = 5;\n    repeated string adapters = 6;\n    repeated string composers = 7;\n    repeated string editors = 8;\n    repeated string commentators = 9;\n    repeated string guests = 10;\n  }\n\n  message EpisodeNumber {\n    string system = 1;\n    string value = 2;\n  }\n}\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittle-core-labs%2Fhyperepg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flittle-core-labs%2Fhyperepg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittle-core-labs%2Fhyperepg/lists"}