In last week's update, I said I'd be focusing on import and export, with backup plans in case I finished the work in "record time".

Well, I finished the work in record time: the export and import commands now exist and work as intended! I spent a year and a half of my former career as part of a team building an import feature for a big ol' legacy monolith. Working on my own, I delivered export in a day and import in two. (Obviously, my import feature is a lot less sophisticated and robust, but the commentary stands.)

With extra time on my hands, I rounded out the week laying the groundwork for hierarchy of things. Specifically, characters and places can now have a location, which will be displayed in the details view if present. Currently the only way to create these associations is by exporting your journal, editing the location_uuid field for each thing, then re-importing.

Changelog updates last week

  • New: You can now export data from the journal! (There is not yet a corresponding import command, but that's coming next.)

  • Bug: Clicking the right mouse button no longer runs commands or changes the selection. This was particularly annoying when trying to copy from the context menu.

  • Bug: Accessing the command history using the up and down arrows will no longer wrap around when you reach the beginning or end of the history.

  • New: You can now import data that you've previously exported!

  • Enhancement: Added a few more emoji for different place types. The generic pushpin icon is now fairly uncommon.

  • New: If things (people or places) have a location_uuid field defined, the location will now be shown in the details view. Presently the only way to define those relations is to export your journal, edit the JSON file, then import it again.

This week

I've started laying the groundwork for creating associations between things in-app (House Orien Enclave is in Passage). The work itself will be fairly simple, but as always, writing the parsing and autocomplete code will be the challenge. I've decided this is the breaking point for me to go back and replace the bespoke code that I've written for every individual command, which has ballooned to 419 lines for parsing and a further 686 lines for autocomplete. It's been the biggest impediment to adding new commands, as I have to reopen and wrestle with the code every time I add a command. That work invariably consumes more time than implementing the command itself.

I've made several attempts at this refactor in the past, some of which were merged as incremental improvements and some of which I abandoned altogether, so I'm pretty confident this won't be quick work, but it will be valuable. If I have it done by the end of the week, I will probably also be able to finish off the first iteration of journal relationships, leaving next week for... something else.