jml's notebook

Command-line bliss

After I moved this blog to Zola, I lost my ability to quickly make new blog posts.

The old workflow used to be:

$ notebook new
... type type type ...
$ git push

Which made the whole flow lovely.

For reasons that elude me now, when I gutted the old blog code, I decided to throw that away and rewrite it in Rust.

The end result is at It's highly situated software, so please don't re-use it.

A crappy little script might not be the obvious choice for a Rust program, but it has worked out:

  1. clap is a great library for command-line parsing
  2. tera is a great library for templating
  3. spawning subprocesses is easy peasy
  4. shipping a single self-contained binary is miles better than virtualenv hell
  5. the cargo tool suite is nice

And now, the new workflow is:

$ notes new
... type type type ...
$ git push

I'm using Github Actions to build it and that was surprisingly painless, aside from a strange accident where it keeps creating a release called refs/heads/master. How embarrassing.

I'm going to keep pushing on Rust as a way to get things done.

That said, I'm also aching for an opportunity to try trio, so no promises.