How to index Project Gutenberg files

project_gutenberg_logoProject Gutenberg offers over 40,000 free ebooks: choose among free EPUB books, free kindle books, download them or read them online. Recently, they have added support for Dropbox, so you can download ebooks directly to your Dropbox account. It will create a folder ‘Apps/gutenberg’, and will store all ebooks in that folder.

After a while, this Dropbox folder will have a long list of files, all with names like pg1234.epub and pg5678-images.epub. They have some meaning, but which file contains which title? Of course, you can rename each ebook  after downloading, but this is extra work, and I want a smart solution.


So I created a script to create an index for all ebooks–at least, for those in EPUB format. Now there is simply an index.html file, which will open in any browser. It shows the file name, together with the creator, title and language. Depending on how you view the index.html file, the links may be clickable, In any case, you can quickly see which file is which book.


The script works on any set of EPUB file, but usually, they will have a more meaningful name and there will be less need for a script like this.

Continue reading

Send Gmail to Evernote: an overview of the tools

Updated 28 June 2013: both Evernote Web Clipper and Powerbot have new versions, the table refers to these new versions.

In the creation and development of the Google Apps script to send Gmail messages to Evernote, I have looked around what other tools are available. These are the other tools that I found:

  • forwarding to the Evernote email address and using the InQloud service;
  • the Evernote Web Clipper (only tested on Windows/Chrome);
  • PowerBot, an extension for Chrome (also others versions available, e.g., for Firefox and Safari)
  • IFTTT and Zapier, tools that enable you to connect between other web services

I have looked at how well these tools keep the formatting of the message, whether they keep attachments, have a link back to the message in Gmail, whether they can be automated using Gmail filters, and whether you can select the notebook or tags, and edit/comment on the message before sending.

Continue reading

New version of Gmail to Evernote script creates link to Gmail in Evernote

Version 2 of the Gmail to Evernote script has been released. The new version adds text on top of the message in Evernote, with the basic headers from the email message (From, To, Date) and a link back to view the message in Gmail. For example, if you forwarded the message to a task list in Evernote, you can now quickly send a response after completing the task. No more searching in Gmail to find the message back!

There are more changes, and you have to do some extra configuration steps if you use multiple sign-in for Google, because in that case, the link to the Gmail message is not always correct.

This version will send email notifications when a new version is available. If you are running the script directly from, you don’t need to update, and you will not receive a notification, unless some other action is required or relevant information can be given.

If you made your own copy of the script, you will always receive a notification of new versions, so you can replace your copy with the new version.

You may have to authorize and grant access again, see the previous update on Gmail to Evernote.

Continue reading

Sprintf: merge text and variables in Javascript

The function sprintf is common in many programming languages, as a way to merge programme variables in a text string. It has good options for formatting, such as outlining text string, or setting the precision of numbers. In many cases, you don’t need those, and a simple function that just inserts the variables at the right place is fine, and a better option in order to keep your JavaScript code short. See the example below:

// Simple string concatenation
var html1 = '<a href="' + url + '">' + link + '</a>';

// Using sprintf
var html2 = sprintf( '<a href="%s">%s</a>', url, link );

In this article, I share a simple function doing string replacements. For sprintf alternatives with the full functionality, just Google on ‘javascript sprintf’, and you will find some good versions. If you don’t need all that, read on.

Continue reading

A new look

This site now uses the new version of WordPress, version 3.5. Many changes, but mainly  in the back-end, the admin site. Also new is the default theme, Twenty Twelve, which has a responsive layout, i.e. the layout will be adapted depending on the screen size, so it will work as well on a smartphone.

Before, I used the Roots theme, a.o. because it has a responsive layout. The previous default theme, Twenty Eleven, was not responsive, en therefore less suitable for mobile phones.

Continue reading

Disable the Caps Lock key

I use a wireless keyboard/mouse combo, the Logitech MK260. What I like about it, is that, even though the keys are regular size, the keyboard itself is nice and small. What I found out only after buying, is that there are no LEDs to indicate that Caps Lock is on. Same for Num Lock, but I don’t accidentally press Num Lock that often. For Caps Lock it was an issue, until I realized, why need a Caps Lock anyway?

I usually don’t SHOUT, so I might as well do without the Caps Lock and have it function as an additional Shift key. That is exactly what the registry hack described in this article does: How to Disable Caps Lock Key in Windows 7 or Vista. And yes, it also works if you don’t bother to try and understand the technical details.

Send Google Mail to Evernote

Evernote is a great system to organize your notes, and to remember everything. You often want to add email message to Evernote, for example to add it to a To-do list. Evernote makes this possible by providing an email address, to which you can forward other messages–they will then be added to your other notes. But you still have to tag them, and you may want to put them in a different notebook. This can also be done by appending notebook and tags to the subject line, but this takes time and you can easily make a typing mistaken.

The method described here makes it much faster and easier: simply drag tags and notebook to the message, that’s it. It is shown in this video, and you can click through to read how to make it work for you. The video is short, less than 40 seconds, but it should not take more time to forward the message and see the result.

Continue reading

Make life easier with SQL Views

In a complex database, with many tables, you often end up with long queries combining those tables. Rather than repeatedly writing out those queries, you can use SQL Views–turn those complex queries into a virtual table, and use that table instead. Requires hardly any storage space, always up-to-date, wish I had found this earlier.

In this blog post, I explain how SQL Views can be applied in the database structure of eZ Publish.Go to the post on

eZTagfeed: create an RSS feed using tags in eZ Publish

Of course, also in eZ Publish it has always been possible to create an RSS feed. These will include items based their location in the content hierarchy. I have developed this extension to create RSS feeds based on tags given to each page, which makes it possible to create RSS feeds with just those items that one is interested in. Similar to the categories feed in WordPress, e.g.

You can read more about this new extension on the eZ Publish project site at