Simplify updates to oft-updated text documents
Here on my blog, I've been tracking macOS release dates and rates for nearly 15 years—if I'm doing my math right, I've edited and republished the post 115 times since then. Until the most recent update, all 115 of those updates were pretty much done like this:
- Update a Keynote document that calculates the release rate data and contains the two charts in the blog post.
- Edit the text of the blog post in a text editor, with Keynote visible, replacing all instances of variable data—dates, numbers, size, rates, etc.—wherever they appear.
- Upload the graphs and publish the updated post.
While this isn't an overly complex task by any measure, the second step in particular has gotten more time consuming over the years, because of the length of the post: It now contains over 50,000 characters. That's lots of scrolling and looking for the few bits that change—and I'd often miss a date or a number in some portion of the post.
I thought there had to be a better way, and there is…and of course, the better way uses BBEdit. In particular, BBEdit's support for including one file in another—and using variables in the included file—makes my update task much simpler. If you have text files that receive regular updates, you may find this method of interest, as it can be a big timesaver.