npm.io
0.1.17 • Published 5 years ago

onix-gen-funstory

Licence
MIT
Version
0.1.17
Deps
2
Size
66 kB
Vulns
1
Weekly
0

onix-gen-funstory

a library to generate ONIX

npm version npm downloads


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)
}

Keywords