Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate and allow writing output after every chapter? #136

Open
gregschwartz opened this issue Jan 27, 2023 · 0 comments
Open

Generate and allow writing output after every chapter? #136

gregschwartz opened this issue Jan 27, 2023 · 0 comments

Comments

@gregschwartz
Copy link

Very much appreciating this gem, it's been a huge help! I'm pulling down serially posted stories to put them on to my Kindle. (Mostly from the amazing /r/HFY but also other places.)

For example, it retrieves The Sacred Noise part 1 and part 2.

Then it moves on to the next series, grabbing Large Scale Engineering and then Economies of Scale (which is part 2).

Repeat for all the series I'm reading.

I have it working to retrieve everything within the book.ordered do loop, then exporting everything once after finishing retrieving all series.

However, I'd like to export the ePub in between each series, in case retrieving a series causes a crash. (These examples are 2 parts, some stories are 50+ parts.) So I tried this after each series:

epubname = File.join(File.dirname(__FILE__), "Stories " + dateForFilename + ".epub")
book.generate_epub(epubname)

However the nav.xhtml is not regenerated after the first generate_epub() call. So it only contains the first series. And the resulting ePub has some other oddities, too.

tl;dr: is there a way to build the book without a book.ordered do loop? Or make it correctly regenerate if you call generate_epub() multiple times?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant