Reporting and recording with plaintext and SvelteKit

submited by
Style Pass
2024-02-12 13:30:10

As you can see, the formats are lax and idiosyncratic – they’re a reflection of my own thought processes plus some ad-hoc shortcuts to make things easier to type in.

Instead of keeping these records inside an actual plaintext file, I keep them in a JavaScript template string inside a Svelte component inside a SvelteKit project. I use mdsvex along with Josh Collinsworth’s excellent SvelteKit + Markdown blog guide to get things like markdown support and automatic listing of pages: each file/report is a page/post.

The surrounding JavaScript, markup, and framework code transforms these ad-hoc records into whatever form I want to display them in. For work, I display the minute-by-minute records along with a summary for each day and an average for the reporting period. For the treatment costs, I break down everything by provider, trip, expense type, and so on. (The costs are integrated into my UK -> US Jaw Expansion Guide, which is also a SvelteKit project that I export as a PDF.)

This system lets you create and maintain your records as plain text—for your own viewing and editing, you can just open the .svelte or .md file—while also allowing you to quickly develop a custom reporting app around each file.

Leave a Comment