0.1.17 • Published 3 years ago
onix-gen-funstory v0.1.17
onix-gen-funstory
a library to generate ONIX
Usage
Install the lib and add it as a dependency (recommended), run on your project dir:
yarn add onix-gen-funstory
Demo Code
import { ONIXGenerator } from 'onix-gen-funstory';
async function main(){
const onixGenerator = new ONIXGenerator({
senderName: 'Funstory',
contactName: 'Mark Chow',
emailAddress: 'email@email.com',
cityOfPublication: 'BeiJing',
countryOfManufacture: 'CN',
publisherName: 'Funstory',
websiteLink: 'https://funstory.ai',
});
// Generator initializing
await onixGenerator.init();
// ONIX Generating
const onixResult = await onixGenerator.genONIX({
bookName: mainBook.bookname,
volume: volumeIndex + 1,
author: mainBook.author,
translator: 'Lemon Novel',//Babel Novel | Lemon Novel | Fancy Novel
description: mainBook.desc,
isbn: isbnNum,
subjectCode: mainBook.subjectCode,
price: mainBook.price,
keywords: mainBook.keywords,
preOrderDate: '2019-09-15',
publicationDate: '2019-09-20',
salesRestriction: 'ALL',//ALL TOP_FIVE KINDLE_ONLY(default)
subTitle: 'sub Title',
// takedown: true,
// pageCount: 300,
});
console.log(onixResult)
}