kindle

“Hello, Scala” - A swift introduction to a scalable programming language

I wrote the Scala Cookbook for programmers looking for solutions to common Scala problems, and then wrote Functional Programming, Simplified for programmers looking for a simple way to learn functional programming. A few months ago I decided to finish my Scala trilogy and write a book for programmers who don’t know Scala and want a quick introduction to it. With that, Hello, Scala was born:

Hello, Scala

A Scala shell script to insert text before a matching pattern

I don’t remember exactly why I wrote this Scala shell script, but if I remember right I was having a problem getting sed to work properly, so I wrote this little script to insert an Amazon Kindle “break” tag before each <h1> tag in an HTML file:

A Scala shell script to read HTML H1 tag attributes

I’m putting this Scala shell script out here as a “source code snippet” so I can find it again if I need it. This file reads an input file that contains a series of HTML <h1> tags. I use this as part of a process of publishing an Amazon Kindle ebook from an HTML file, and in one of the steps of the creation process, I use this script to help create the Table of Contents (TOC) for the book.

Here’s the source code:

Amazon Kindle eBooks: OPF file example

As a quick note today, I’ve been trying to build my own Amazon Kindle eBook using HTML and CSS, and yesterday I learned that I also need an OPF file as part of the process of creating both the eBook and the Table of Contents (TOC).

This morning I found that Amazon has a collection of sample books that you can use with Kindlegen, and the “Guide” project specifically includes the following example OPF file, which is well-documented.

LiquidText: e-Reading done right

I just saw this video for LiquidText. It made me think that this is the sort of functionality I always wanted from Amazon Kindle. More accurately, I knew I didn’t like how Kindle worked, and LiquidText makes you think, “See, there it is, that’s what I want.” (I’ll know it when I see it.)