Tag Archives: nook

Calibre with the Nook on Ubuntu

Calibre is about the best thing since sliced bread. It is able to convert basically any type of Ebook format into EPUB, which is what my Nook reads natively. It seamlessly syncs with the Nook as well, which is a huge plus, and all of this happens in Linux. I highly recommend this software. Just make sure not to queue up too many jobs, or it might DOS your computer for a bit. The PDF conversion is especially intensive. It makes quick work of short documents (hundreds of pages), but documents that are thousands of pages take much, much longer. The only capability I’m missing currently is conversion of DOC to EPUB, but I can use OpenOffice to convert a DOC to HTML, and then import that into Calibre and convert it, so that works.

Fixing italics in Calibre EPUB output

I converted an ebook from TXT to EPUB today using Calibre, and found that the italics (which in the TXT file are annotated /like this/) are not converted into the HTML equivalent.  I did the following to fix this:

  1. unzip ebook.epub -d tmpbook
  2. cd tmpbook
  3. perl -i.bak -pe 's/([\s-,.;\'?:]+)\/(.+?)\/([\s-,.;\'?:]+)/$1<i>$2<\/i>$3/sg;' *html
  4. That will create.bak files just in case anything went wrong.  To revert the changes, do this:
    for i in *.bak; do mv $i ${i%.bak}; done
  5. zip -r ebook.zip * && mv ebook.zip ebook.epub

Then, I found out Calibre works beautifully with the Nook, so I just popped it on there and it worked.