captn3m0 / google-sre-ebook

Google SRE Book Generator (EPUB/MOBI/PDF).
Do What The F*ck You Want To Public License
1.25k stars 163 forks source link

Use absolute paths for epub generation #3

Closed woneill closed 7 years ago

woneill commented 7 years ago

I was getting OSError: [Errno 2] No such file or directory errors from os.rename without these changes.

Also updated the permissions on bootstap.sh

captn3m0 commented 7 years ago

Thanks a lot. I'm adding you to the contributors on the repo, in case you want to help out further with the file generation (there is still a lot to be done)

woneill commented 7 years ago

Cool- appreciate that!

Yeah, once I noticed that entire chapters were missing from the ebook I generated I figured there was still lots to do :)

captn3m0 commented 7 years ago

@woneill I realized I'm much better at this with ruby than python, and made a Ruby version (Default branch=ruby). It still has some issues (noted in README), but can you try out a first pass and see if looks readable to you?

woneill commented 7 years ago

Just took a look at your changes and realized that I'd need to ensure pandoc and calibre (to get ebook-convert) were installed. Fortunately I already had calibre!

Turns out I was able to get a decent book solely by running the retrieved HTML through ebook-convert:

wget --convert-links --mirror https://landing.google.com/sre/book/
cd landing.google.com/sre/book
ebook-convert index.html book.epub
ebook-convert index.html book.mobi
captn3m0 commented 7 years ago

That sounds great!

I had to take care of internal links, chapter headers, and footnotes. Need to see if they are preserved properly in this version.

captn3m0 commented 7 years ago

I tried running this, and lots of chapters in the EPUB seem empty. Was that the case for you as well?