E-Books from Journals

Wednesday 1 March 2023
technology

I have been wanting to create a "book" version of several of my journals for some time.

For my main (private) journals this is a form of back-up and a more convenient way for me to re-read what is in there. For one or two (like my hiking journal) I might like to share the words and photos with others, and possibly even publish it.

I thought long and hard about producing printed books. There's no realistic way of doing that on my own. I either have to pay someone to produce a few copies by sending them the journal(s), meaning I have given them access to my private thoughts, or I have to produce and edit a manuscript that I am happy to share. Day One offer a book printing service direct from journals in their app, but it is far from cheap and for customers outside the USA it takes weeks and costs even more. Once the books exist, they have to be stored and unless I physically lock them up anyone might read them.

I prefer e-books in general and thought that this format would be ideal. I can have journals stored in my book reader app for me to read and they only get shared if I choose to do so. They do not require physical, or much digital storage and there are lots of ways to produce them. The Epub format for ebooks is an agreed international standard and I am sure people will be able to read them in the future. There are lots of ways to produce epubs and for free.

It was much harder than it should have been. I am not aware of any journal app that will export as epub. Journal apps are generally quite poor at exporting. For some, I suspect that it is an attempt to "lock you in" to their subscription service, and in Day One's case, to their book printing service. In other cases, I think the challenge developers have set themselves is to encourage people to write journals and develop a habit. Understandably, the emphasis has been on how easy it is to write, keeping track of streaks and entries and presenting what you have written in an organised and attractive form within the app. Export tends to be to a couple of formats, with little flexibility.

I realised that I would have to do a two-step process to make journals into epubs. Firstly export the journal in a text-based format and secondly turn that document or documents into an e-book, perhaps editing and formatting on the way. It was important to me that I could preserve the images and even audio embedded into some of my journal entries. Obviously it is important that the dates of entries are preserved, and that any formatting used in the journal (e.g. sub-headings) would be reflected in the output too.

First Attempts with Day One

Day One only exports in three formats: a proprietary (backup) json, pdf and markdown. The first two of those would be very difficult to process so I began to look around for ways to produce epubs from markdown. I eventually found Typora, which is a very nice markdown editor on the Mac and which produces a wide range of exports, including epub. (It does this with the help of pandoc, but it is much friendlier in Typora than it is using pandoc alone).

It was not difficult to produce a markdown export from Day One. This is in the form of a zip file, which contains a single text file with all the entries and a folder containing the images. Markdown files do not contain images or other "assets" but the text contains links to them. If you have videos and audio in Day One, these files are stored in their own folders in the zip file.

I unzipped the export and loaded the text file into Typora. I could see all the entries, but there were no images displayed. I was not particularly surprised by this as links are easily broken. I looked for the image links to see what the problem was and found none in the markdown. I ended up using a code editor to check the text file in the export and found a blank line where every image in the export should be. There were no image links in the exported markdown, even though Day One had exported all the image files. If I dragged and dropped the images back into the Typora document, they appeared, but with hundreds of images to place this task would have been a nightmare.

I tested the epub export from Typora and was very happy with the result. I had the text nicely formatted and pleasant to read in Apple Reader or Kindle, but there were no images at all. I went back and checked the Day One help guides to make sure that I was not missing something, but it described precisely what I had done.

I contacted Day One support and received a speedy but disappointing reply. They had removed links to images and other assets in their text export because it had not been working properly. They hoped they might repair this at some point in the future. This is not the first time I have found that Day One has removed features without any public information or changing their help guides, which raises big issues about their suitability as a service where I have about ten years of journals, many of which are very important to me.

I was not going to be able to export from Day One in any format that I could process further, so I needed an alternative.

Success with Diarly

My subscription to Diarly was still current, (see Diarly & Day One) so I did a json export of Day One and imported it into Diarly. This worked perfectly and fairly quickly.

Diarly exports in markdown, pdf and rich text (rtf). A quick check showed that the markdown export does include working image links. There was a different problem, however. Diarly's markdown export is intended as a back up. You can reimport it into Diarly without loss. For this reason, it produces a zip file which contains a markdown file for every entry with this structure:

Export

Journal Name
- Year (e.g 2020)
- Data
- DD-MM-YYYY.md
etc.

Once unzipped, I could move through the folders to find the year and journal I was interested in and open the entry in Typora and it all worked very well with images placed properly, headings showing and all looking very good. For most purposes this would be exactly what I needed and encourages me that I could move my data from Diarly to another app easily. For this specific purpose, where I wanted to put a long list of entries into a single file to export to epub, it was less than ideal. There were work-arounds (by including each entry in a master file) but it was going to mean a lot of editing.

Before I committed to that I tried the rtf export, and imported it into Apple Pages, which I knew could export epubs.

Success! I was looking at a Pages document containing all the entries I had exported, in date order, with all the images and other assets in the right places and some default formatting applied so that headings, lists and so on worked. I could export it straight to epub without changing anything and it would produce a decent ebook.

I decided that it was worth doing a little more processing in Pages for my purpose. With the help of Apple's clear and comprehensive help guides, I used Pages styles to set up the formatting as I wanted (and later opted to "embed fonts" so that this would be reflected in the epub). I used Pages "Table of Contents" feature to identify a particular level of heading as a "Chapter Heading" and made that include a page break so each would begin on a new page. I made a cover page image with some overlaid text. I'd have done more work if I was intending to publish but this was quick and easy, and I had my hiking journal in Apple Books and on my Kindle ready to read. I also have a back up as a Pages file, which I could print or desk top publish if I ever want more traditional book formats.

Back with Diarly

Having imported everything from Day One to Diarly, I left it there and for the time being I am using it again. My various issues with Day One, and their recently issued web app, which I suspect is the future of that company, had made me restless. Diarly does the job I need and I used it for over a year, but it is not (yet) as smooth or attractive as Day One, though it is not bad. Having spent a little while with its settings (making a much shorter line length, choosing editor settings like fonts and building my own theme, I think it has what I need. I've set the subscription to renew and the Day One subscription to end (though there are quite a few months left on that one, so I don't need to make a final decision for some time).