21

I have a number of short HTML files (actually they are XHTML) with small problems and answers, which I post on my blog every Sunday, and I'd like to merge some of them in an ebook. I already did it once, just by stripping the headers and footers and merging them together; then I create the epub skeleton with Calibre and tweaked it with Sigil. But since there are a lot of internal links, it is a time-consuming process.

Is there a simpler way?

Anthon
  • 7,641
  • 3
  • 23
  • 56
mau
  • 2,364
  • 5
  • 19
  • 41
  • Is the issue just from HTML to epub - or managing the links as I think if the latter that should be emphasised in the title as simple answers for HTML->epub don't work as you state – mmmmmm Dec 22 '13 at 17:24
  • Also look at answers of http://ebooks.stackexchange.com/questions/1203/convert-blog-to-book – claws Aug 10 '15 at 02:01

5 Answers5

10

I assume you don't write the HTML directly, but use something like MarkDown or reST. But even if you do, you should look at Pandoc.

The program can read HTML and generate EPUB 2 or EPUB 3 (among others).

Anthon
  • 7,641
  • 3
  • 23
  • 56
  • 2
    actually I write my HTML directly (I am quite old, I started using Mosaic :-) ) Pandoc seems quite interesting, indeed! – mau Dec 23 '13 at 11:50
  • @mau I used Mosaic as well (how much nicer than using gopher and WAIS). Nothing wrong with writing HTML directly, it is just not seen to often nowadays. – Anthon Dec 23 '13 at 11:57
  • gopher, Veronica and WAIS had a different scope, after all, more towards classification :-) – mau Dec 23 '13 at 15:01
4

Since you mention you post to your blog each Sunday, if you have or can provide an RSS feed you may find the following online free service useful [removed (see below)]. I've been using it to create ebooks of one of my project blogs. The resulting ebook (I create .mobi books for Kindles) have been readable.

I expect there will be limitations so YMMV for your blog posts.

Edit: The link above pointed to http://newstoebook.com/, which is now a completely different site and no longer provides any ebook conversion services. It used to look like this in 2013: https://web.archive.org/web/20130227110429/http://newstoebook.com/

JulianHarty
  • 742
  • 4
  • 10
  • newstoebook seems great, but unfortunately my feed has only the problems (while problems and solutions are stored on my site). Thanks for the suggestion, however! – mau Dec 23 '13 at 15:03
3

You can use Papyrus for creating ebooks from blog posts or any webpage.

If you already have a blog, you can use this link to convert your blog to book)

Your book will be generated in EPUB, Mobi(Kindle) and PDF formats.

Disclosure: I am the creator of this site.

Anthon
  • 7,641
  • 3
  • 23
  • 56
gt5050
  • 251
  • 1
  • 3
3

Calibre can convert XHTML 1.1 + CSS 2.1 to epub. It's only guaranteed to output valid epub if the input is valid. It's free and open-source.

  • 1
    Calibre can convert a bunch of HTML files into EPUB in a rather straightforward way. See the FAQ:

    http://manual.calibre-ebook.com/faq.html#how-do-i-convert-a-collection-of-html-files-in-a-specific-order

    – Alberto Pettarin Jan 30 '14 at 20:40
1

If your files really are genuinely valid XHTML, you could even write an XSLT2 script to do the job yourself. That way you can cater for any idiosyncracies in your XHTML which other systems may not be designed to handle.

Peter Flynn
  • 271
  • 1
  • 1