I think my immune system is kicking off about something. I wish I had more insight/monitoring of my own body.
I need to update the image uploader do that the original blob gets pushed, regardless of the preview. I also want to save a thumbnail at upload time (to img.tumb
) as well as the original.
Since I'm going to be running the image data through some kind of processing library, I can also grab mime type and dimensions and stash them in meta data.
I've also been looking in a bit more detail at the Twitter export, and I'm not sure it's worth the effort. I know in my Facebook posts there's some stuff that I want to keep/share, but Twitter posts are lacking context.
A feature that I've been thinking about for a while is executable code blocks. That is, add s block like
var x=2+3;
print x;
And have "5" output in the blog. (Adding variable input, to get input
tags is an obvious extension).
I can think of a few questions:
- Where should the code run (client or server)
- What language(s) to handle
- How much access to the environment should the code have
- Are all the blocks in one post connected
- Are all the blocks in the blog connected
- How are errors handled
- What does securely look like
I've probably missed some.
A simple solution is raw JavaScript running in the browser. JavaScript doesn't have much of an isolation story, so all the code on the same page (i.e., all the code in the blog) world run in the same context.
Client side JavaScript would be easy to implement, assuming that I can convince Markdig to output script tags at the right time.
JavaScript is a little verbose, and therefore irritating to enter in a phone keyboard.
A bit more complicated would be Lisp, or an implementation of Mal. The same code could run either client or server side, it would only have access to the environment that I gave it (Unlike JavaScript, which would have access to the browser on the client), and it would encourage me to learn Lisp.
I'd need to write a JavaScript implementation (oh noes!), and again, make sure that I could get Markdig to cooperate, but it's an intriguing idea
I'm going to call editing entries a dependency of running code, although I should just build a Mal page and copy stuff over when it's done.
Except what I actually want is to be able to create interactive (or at least scripted) pages here on the client. Notes like this are great for prose, but for tools (current example is kitten age), I want to be able to find them without scrolling through history.
What I want, it turns out, is to be able to tag an entry as 'special', give it a memorable link (or slug) and have it show on a list somewhere. Time for a new button!
The interface side is easy enough (all praise to the dialog
tag), add a 'post options' button/dialog with inputs for (probably)
- Title
- Slug (auto generated from title by default)
- Include in TOC (bool)
- Private (Maybe? I've been in two minds about private posts for a while. Knowing that people are potentially reading this is one of the main incentives for writing it. On the other hand, there's stuff that I don't want to share but that I still want to record.)(bool)
The current plan for metadata is a second file next to the entry, either in JSON (easy for machines to read/write, especially to/from c#, but hard(ish, relatively) for humans to read/write) or some kind of key/value map (e.g. Email headers, or TOML. Harder for machines, a little easier for humans, but I'm not sure how important human readable is for the metadata).
A missing metadata file shouldn't be an issue (I don't want to go back and create empty metadata for all my previous notes), and I want to be able to add new properties easily.
Having said that, bulk creating more or less empty metadata files shouldn't be too hard with a little bash scripting.
Let's also add a metadata version number, maybe in the filename, and an entity format version (more for paranoia than any foreseen problems).
That leaves us with:
- JSON
- matching name to entry except different extension
- Property values must all be nullable, or have a defined default
- Unknown properties in the file are ignored