Tag Archives: SQLite

Almanah 0.6.0

The main window of version 0.6.0.

The main window of version 0.6.0.

Dragging its feet behind version 0.5.0 comes version 0.6.0 of Almanah. This release is primarily to improve upon the "link" concept which was present in all previous versions. Now, links have been replaced with the concept of a "definition": terms can be defined across multiple entries, to allow you to go into more detail about something which existed over a longer period of your life. For example, you could define a term for a project on which you'd been working for a couple of weeks, or for a new acquaintance. Currently, only the old link types (note, URI and file) are supported as definition types, but in future, other types will be added, such as Evolution contact.

This release also introduces "events", which are listed automatically per day. Now Almanah will list all the Evolution tasks and appointments relevant to the currently selected day, to provide a little more context for whatever's in that day's entry. Again, more event types can – and should – be added in future.

Apart from these major changes, accessibility and printing support have been improved, and a new --import-mode switch has been added to allow one-time imports of previous diaries without any date-based restrictions on editing entries.

Note that the link/definition/event changes have changed the database schema, and when upgrading to version 0.6.0, all your previous links will no longer be accessible from the interface, and cannot be automatically ported to being definitions. You can, however, retrieve them manually using the following commands:

sqlite3 ~/.local/share/diary.db

.headers ON

SELECT * FROM entry_links;

which will list all your old links as they exist in the database. You should run these commands while Almanah is running, unless you have encryption disabled.

As always, bug reports in Bugzilla please!

Diary editor

The main window of the Diary.I've been keeping a personal diary for a while, but recently I've found that my previous storage method for it – keeping each day's entry in a separate file, stored in a folder hierarchy – was getting too unwieldy. That's why over the last few weeks I've written a small program to manage a diary.

I initially started writing it in Vala, but I found that I was having to put in dirty hacks every couple of tens of lines just to get the simplest things working with an SQLite database. Either due to my own lack of knowledge of Vala, or teething problems for the language and its bindings, I couldn't get it to work, so about a week ago I scrapped it and ported the program to old-fashioned C.

So here it is: version 0.1 of my diary program. It supports basic editing of diary entries, a calendar view of the month and the ability to add "links" to each entry. A "link" is something which connects the diary entry to the wider world, much like a hyperlink connects one web page to another. At the moment only "URI", "file" and "note" link types are supported, but in the future I plan for one to be able to link to anything from an F-Spot album to a section of a chat log in Empathy. Such links would allow references to conversations, e-mails, photo albums (etc.) in diary entries to be easily followed to find the goodies mentioned.

I also have plans to add Evolution calendar integration, as well as potential integration with Mugshot. It would be nice to see diary entries which can show all of what happened on that day, from doctor's appointments in Evolution to the songs Mugshot says you listened to.

Keeping my feet more grounded in reality, however, I think the next thing on the agenda is encryption for the database the diary uses, so your darkest secrets aren't so easily discovered.

To get it, you can either download the tarball or get the latest bzr tree from my website using the following command:

bzr branch http://tecnocode.co.uk/diary/

Thanks to people in the comments for pointing out a better way of branching.

The only requirements are gtk+-2.0 >= 2.12, sqlite3 and gtkspell-2.0, and it's built in the usual fashion.

Feedback is welcomed warmly and given somewhere to stay for the night.