Closed michelem09 closed 1 year ago
Well I found it, for anyone who wants to use it programatically importing packages, here is:
yarn add @daisy/ace-core @daisy/ace-axe-runner-puppeteer
const ace = require('@daisy/ace-core');
const axeRunner = require('@daisy/ace-axe-runner-puppeteer');
const data = await ace(
'/path/to/the/file.epub', // path
{ lang: 'en' }, // options
axeRunner // engine
);
That's right :) The CLI is really just a programmatic wrapper around the exposed API: https://github.com/daisy/ace/blob/master/packages/ace-cli/src/index.js ...with a bit of "sugar" to create an "executable": https://github.com/daisy/ace/blob/master/packages/ace-cli/bin/ace.js
Thanks! Would be great to have this in the doc too :-)
I mean importing the package into an app and using it inside my own Node app without CLI or HTTP API.