Social Distancing Part 6 - (Not Quite) Language-Agnostic Interfaces for Words and Code
Inspired by Parker’s post on the same subject, I decided to write my own now that it’s been up and running for a few days. I say ‘not quite’ in the title because - as will become apparent - I only use a few languges to do most of the work.1 At the end of the process, I had entirely reorganized my Jekyll Scripts repository - now called Rake Jekyll - from a series of shell scripts into a single Rakefile. I also migrated my Reverse Job Posting to use Rake. As I worked, it got me thinking about how I approached the same task in other projects.2
Make for the printed word
Makefiles are used to generate output from a number of TeX sources (Redirection FTW). These are simpler and only run the input through a converter - usually pdfTeX or XeTeX - which creates the final PDF. I occasionally run the source text through an app like Pages, which has real grammar and spellcheck functions, just in case aspell, Gabe’s language module or Matt Might’s scripts miss something.
My personal dictionary is pretty well customized and its mode support for TeX is smart enough to figure out what to match on, a handy feature I learned about from Dan Bader. I know there are nearly endless other ways of accomplishing this task, but it’s the approach I’ve found that works the best for me.
Rake on the web
Rakefiles are just containers for shell sequences - usually with a few modifications and are easy to stick together. For the blog, I can now run rake draft
to create a draft post on the fly.3
In RJP, the default task starts a web server so I can view the output. I tried to do the same thing for the blog, but invoking bundle exec
in this way returned an error. So, for now this task triggers an incremental build which lands in the _site
directory.
Reductio ad Xkcdum
As with any kind of automation, the inevitable question is - usually - ‘Did it save time?’
Well…maybe. After all, I wrote this post about it while using the tools to get it done. In the end, that’s what the site is for.
-
For a while, the working title for this post was ‘Glue Code’, a not-so-subtle reference to the small pieces that do most of the heavy lifting for me.
⏎ -
Based on the idea of ‘Make, now with less typing’ in other projects.
⏎ -
If I was more versed in Regular Expression syntax, I could try to pass the title argument into the filename, but I havn’t gotten that far yet.
⏎