It makes life easier for ABC notation users on a Mac if their ABC files have their own icons. Icons can only be used automatically for a file when there is an application that says ‘this file is one of mine’ and ‘use this icon’. It’s not possible to do that for ABC files because ABCtools files are dropped into a web page, so there is no icon. I name all my ABC files using the ‘.abc’ suffix, so can I create something that will set an appropriate icon on these files?
It’s possible to do this using Finder, but it only works a file at a time. I’ve got loads of .abc files and want something where I can select them in Finder and say ‘add this icon’.
The solution is to create a Apple iconset and then use the fileicon script from Michael Klement (on GitHub https://github.com/mklement0/fileicon) to apply the icon to a file. This bash script can install the icon on anything that uses one from a single image or an .icns file. I’ve included a copy of the script in this file bundle.
What icon should I use? Well, I have appropriated the ‘ABC’ from Michael Eskin’s ABCtools logo lines and created a Mac ‘icns’ file – ABC-icon.icns.
With this basic tool in place, I’ve implemented a couple of Automator scripts on a silicon Mac. If you have an Intel Mac, then I am told that the scripts are likely to work, but I am unable to test them. Just in case, I’ve included some screen shots of the scripts in Automator at the end of the ABC_README document, so you can replicate them if needed.
There are two scripts:
- Add ABC Icons.workflow – a ‘Quick Action’ tool that is
given a folder containing files ending in .abc, or one or more files
ending in .abc - and will add the icon to the matched files.
Once installed here’s how to use it. In Finder, select one or more .abc files or a folder containing .abc files and right click to get the menu. Select ‘Quick Actions’ and then ‘Add ABC Icons’ to fire up the workflow. All .abc files will be set with the icon. - AddABCIcons.workflow – a ‘Folder Action’ tool that is attached to a folder and will set the icon on any file ending in .abc that is placed into it. I set this on my Downloads folder since that is where I tell my web browser running ABCtools to save files. Files are stored from ABCtools in the browser and will acquire the icon automatically.
There is also an Automator script that I have sitting on my desktop to fire up ABCtools in my browser – this is ABCtools.app.