macOS has a built-in preview generator for .txt and .text files, but it’s not able to handle text files that have no file extension, like Makefiles. It will also ignore textual files with other file extensions, such as subtitle files and .nfo files. This was bugging me, so I wrote an addition to my PreviewApps range to tackle these files. It’s called PreviewText and it’s available now, free of charge, from the Mac App Store.
I’m pleased to announce the latest in my PreviewApps series: PreviewJson. It taps into macOS’ QuickLook feature to provide at-a-tap previews of JSON files and generates Finder icon thumbnails for them too. There are some updates out too.
I connect to my Mac many USB devices that communicate over a serial (UART) bus to send debug information to the host or to receive data and code. You know, Raspberry Pi Picos, Adafruit Feathers, FTDI cables — that kind of thing. Often I have more than one connected. Is there an easy way to see what’s connected without listing /dev every time and to remember connected devices’ paths?
It’s June once more, and time for Apple’s Worldwide Developers’ Conference (WWDC). This is a chance to learn about new functionality and, yes, discover initiatives announced at previous WWDCs that you completely missed the first time around. A case in point: Apple’s revamp of how apps are notarised at the command line, which was revealed at WWDC 21 but I only encountered this week.
Over the last few years I’ve released a number of command line utilities for macOS. I’ve always included online help within them, triggered with the --help switch, but I recently wondered how I might provide Unix Manual pages too. It would allow users to call up help with the CLI command man as well as a command switch. Belts and braces, perhaps, but I’m a completist and, more to the point, didn’t know how it was done and wanted to learn.
PreviewCode, my macOS Finder source code and data file preview app, has had a major update to support a bunch of developer-oriented file types requested by users. The new version, 1.2.0, is available now from the macOS App Store.
How do you safely interrupt a command-line program written in Swift? This question was posed to me this week by a reader who got in touch to point out that boilerplate code included in my How to write macOS command line tools in Swift post might not be totally safe: it could leave a program and system in an undefined state, which is never a good thing. So I took a closer look.
I work on quite a few git repositories at once, and I don’t always commit changes in one before making changes to another. Or if I do, I don’t always push the changes up straight away. That might not be best practice in software development, but hey, it’s what I do. The issue for me is remembering what state each repo is in. Here’s the script I use to tell me.