gitbook icon indicating copy to clipboard operation
gitbook copied to clipboard

Generating ePub and MOBI

Open orelby opened this issue 12 years ago • 12 comments

Are you planning to automate the generation of ePub and MOBI ebooks soon?

orelby avatar Jul 14 '14 11:07 orelby

It can already be done:

$ gitbook ebook ./myrepo ./test.epub
gitbook ebook ./myrepo ./test.mobi

SamyPesse avatar Jul 14 '14 17:07 SamyPesse

It's not working for me.

orelby avatar Jul 14 '14 17:07 orelby

What is it telling you?

SamyPesse avatar Jul 14 '14 17:07 SamyPesse

Nothing.

orelby avatar Jul 14 '14 17:07 orelby

What command did you exactly run?

SamyPesse avatar Jul 14 '14 17:07 SamyPesse

gitbook ebook . ./book.epub

Maybe you meant gitbook epub? That works. (It still leaves the azw3 issue.)

orelby avatar Jul 14 '14 17:07 orelby

you forgot 'build'. It's gitbook build ./ ./book.epub

SamyPesse avatar Jul 14 '14 17:07 SamyPesse

and gitbook build ./ ./book.azw3 for azw3

SamyPesse avatar Jul 14 '14 17:07 SamyPesse

Oh, you said ebook. Thanks. :-)

orelby avatar Jul 14 '14 17:07 orelby

Nope. It's just generating a website. (Exactly the commands you wrote.)

orelby avatar Jul 14 '14 18:07 orelby

Ok sorry .... my bad...

This is it:

$ gitbook build ../ --output=./test.epub --format=ebook

SamyPesse avatar Jul 14 '14 18:07 SamyPesse

It saves an index.epub in a directory named test.epub. Is there no way right now to change the directory name? (defaults to _book)

orelby avatar Jul 14 '14 18:07 orelby