{"id":19501117,"url":"https://github.com/gitbookio/node-onix","last_synced_at":"2025-04-25T23:30:54.153Z","repository":{"id":33109033,"uuid":"36746887","full_name":"GitbookIO/node-onix","owner":"GitbookIO","description":"Node.JS library to parse/generate ONIX XML files","archived":false,"fork":false,"pushed_at":"2015-09-03T12:00:01.000Z","size":168,"stargazers_count":18,"open_issues_count":2,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-25T05:36:25.798Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GitbookIO.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}},"created_at":"2015-06-02T16:39:19.000Z","updated_at":"2023-04-21T14:46:10.000Z","dependencies_parsed_at":"2022-06-27T05:35:33.857Z","dependency_job_id":null,"html_url":"https://github.com/GitbookIO/node-onix","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fnode-onix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fnode-onix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fnode-onix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fnode-onix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GitbookIO","download_url":"https://codeload.github.com/GitbookIO/node-onix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250912660,"owners_count":21506865,"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":[],"created_at":"2024-11-10T22:11:14.787Z","updated_at":"2025-04-25T23:30:53.888Z","avatar_url":"https://github.com/GitbookIO.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-onix\n\n[![NPM version](https://badge.fury.io/js/onix.svg)](http://badge.fury.io/js/onix)\n[![Build Status](https://travis-ci.org/GitbookIO/node-onix.png?branch=master)](https://travis-ci.org/GitbookIO/node-onix)\n\nThis library can be used to parse, or generate ONIX files from a list of books metadatas.\n\n### Installation\n\n```\n$ npm install onix\n```\n\n### How to use it?\n\n```js\nvar onix = require(\"onix\");\n\nvar xml = onix.create({\n    from: {\n        company: \"GitBook\",\n        person: \"Samy Pesse\",\n        email: \"samy@gitbook.com\"\n    },\n    suplier: {\n        name: \"ePubDirect\",\n        availabilityCode: \"IP\"\n    },\n    products: [\n        {\n            // Single record reference which will uniquely identify the product\n            record: \"gitbook.com-bookId\",\n\n            // Notification type\n            notification: onix.codes.NOTIFICATION.ADVANCE,\n\n            // ISBN or other id\n            id: {\n                type: onix.codes.PRODUCTID.ISBN13,\n                value: '978123456789'\n            },\n\n            //\n            title: \"My Awesome Book\",\n\n            // Language code as ISO 639\n            language: \"eng\",\n\n            // List of prices (number or object) or unique \"price\"\n            prices: [\n                {\n                    amount: 6,\n                    currency: 'eur'\n                },\n\n                // Number will default to usd currency\n                5\n            ]\n        }\n    ]\n});\n```\n\nYou can also parse an ONIX feed:\n\n```js\n\nvar feed = onix.parse('...');\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitbookio%2Fnode-onix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitbookio%2Fnode-onix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitbookio%2Fnode-onix/lists"}