Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 04-21-2020, 05:16 PM   #1
rmichael
Junior Member
rmichael began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2020
Device: none
Generate EPUB and PDF from ebook-edit "folder as book"

Hello,

I am on macOS 10.14.6, learning Calibre 4.13.0.

I have extracted an EPUB for a folder and opened it with `ebook-edit`, on the command line, as follows:

`unzip -d source The_book.epub`
`ebook-edit path/to/source`

I have made changes to the files, saved the book, and I see the changes in the source files.

How do I (re)build a new EPUB and PDF file?


If I start Calibre itself, the "source" book I opened via `ebook-edit` on the command line is not in the Library, so I cannot use "Convert Book" in Calibre.

I also do not see an option in Calibre to open a "source folder" as a book, as "Edit Book" (`ebook-edit`) can do.



As background:

I am working this way so that I can keep the source files in git and make commits as I adjust them. I am editing technical material on programming, and I want to send a patch to the original author.

I found that if I open the EPUB itself (not extracted) in Calibre, then used Edit Book, I was not able to tell Calibre about extracting the EPUB files to a folder so that I could stage and commit changes. Calibre only seemed to keep the extracted files in the Cache, and only while it was running.


Thank you
rmichael is offline   Reply With Quote
Old 04-21-2020, 06:08 PM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,181
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by rmichael View Post
Hello,

I am on macOS 10.14.6, learning Calibre 4.13.0.

I have extracted an EPUB for a folder and opened it with `ebook-edit`, on the command line, as follows:

`unzip -d source The_book.epub`
`ebook-edit path/to/source`

I have made changes to the files, saved the book, and I see the changes in the source files.

How do I (re)build a new EPUB and PDF file?


If I start Calibre itself, the "source" book I opened via `ebook-edit` on the command line is not in the Library, so I cannot use "Convert Book" in Calibre.

I also do not see an option in Calibre to open a "source folder" as a book, as "Edit Book" (`ebook-edit`) can do.



As background:

I am working this way so that I can keep the source files in git and make commits as I adjust them. I am editing technical material on programming, and I want to send a patch to the original author.

I found that if I open the EPUB itself (not extracted) in Calibre, then used Edit Book, I was not able to tell Calibre about extracting the EPUB files to a folder so that I could stage and commit changes. Calibre only seemed to keep the extracted files in the Cache, and only while it was running.


Thank you
You may want to check the ePub Zip/Unzip AppleScript application for Mac OS X thread.

There is also the [Plugin] FolderIn and FolderOut - Folder input and output plugins for Sigi if you don't mind using an alternate epub editor.
DNSB is offline   Reply With Quote
Advert
Old 04-21-2020, 06:43 PM   #3
rmichael
Junior Member
rmichael began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2020
Device: none
Thanks for the quick reply.

Quote:
Originally Posted by DNSB View Post
You may want to check the ePub Zip/Unzip AppleScript application for Mac OS X thread.

This is very helpful, thank you. I did not realize there was no "build" step to prepare the EPUB, and that it was only a matter of zipping the files.

There is also the [Plugin] FolderIn and FolderOut - Folder input and output plugins for Sigi if you don't mind using an alternate epub editor.
The ebook I am editing was produced with Calibre, so I will likely continue using it, in case there is author workflow involved. Thank for mention this though, because it seems to have been created for my use-case (git tracked sources). I may look at Sigil in the future.
rmichael is offline   Reply With Quote
Old 04-21-2020, 11:17 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you want to work with git, use ebook-convert to generate your EPUB and PDF files. You can run

ebook-convert file.opf output.epub or output.pdf


where the opf file is from your unzipped epub.
kovidgoyal is offline   Reply With Quote
Reply

Tags
folder source


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compressed jpg's uncompress on next "edit ebook" icaros Calibre 0 02-15-2017 01:31 PM
Unable to drag 'n drop ebook files into "EDIT METADATA" window -Calibre2.6,Win 7(x86) PERSISTENCE Calibre 1 04-18-2015 05:54 PM
Directory tree in-place "author" -> "folder + author" script (where folder=category) danjcla Library Management 2 02-01-2015 11:23 PM
Alter Double-click behaviour to "edit metadata" instead of "open ebook?" Feather_Qwill Library Management 5 09-15-2013 11:20 AM
Changing internal ePub title with "Edit metadata" therealjoeblow Conversion 3 11-03-2011 12:01 AM


All times are GMT -4. The time now is 05:44 PM.


MobileRead.com is a privately owned, operated and funded community.