haroldtreen / epub-press-clients

📦 Clients for building books with EpubPress.
https://epub.press
GNU General Public License v3.0
588 stars 71 forks source link

Add a CLI client #33

Open NightMachinery opened 5 years ago

NightMachinery commented 5 years ago

CLIs just are the best interfaces. I can automate them and integrate the service into bigger scripts, or just it interactively on any device regardless of the browser. (iOS, cough cough.)

NightMachinery commented 5 years ago

Please:) I want to create an ebook from around 2000 chapters, it’s really not possible to do it by hand :( Can you give me some pointers on how to make a PR for a CLI interface?

haroldtreen commented 5 years ago

The server will not accept requests with more than 50 books - so you'd need to run the server on your own machine to make that work.

Once you have your own server running and tweaked to not have the 50 book limit you could set the BASE_URL to your local server EpubPress.BASE_URL = 'http://localhost:5000 or whatever.

Then you could use EpubPressJs.

cont EpubPress = require('epub-press-js');

const urls = [/*array of 2000 urls*/];
const ebook = EpubPress({ urls });
ebook.publish().then(() => { ebook.download() ));
TangMonk commented 4 years ago

The server will not accept requests with more than 50 books - so you'd need to run the server on your own machine to make that work.

Once you have your own server running and tweaked to not have the 50 book limit you could set the BASE_URL to your local server EpubPress.BASE_URL = 'http://localhost:5000 or whatever.

Then you could use EpubPressJs.

cont EpubPress = require('epub-press-js');

const urls = [/*array of 2000 urls*/];
const ebook = EpubPress({ urls });
ebook.publish().then(() => { ebook.download() ));

Does it support local url instead of http?