When it comes to backup up your Keyboard Maestro library or exporting groups there aren't many solution. Especially when you want your macros exported as individual files instead of a one-file mini library. There are some old threads published here and across the internet, with even older scripts attached that didn't work for me.
I always wondered with so many people sharing their macros, why is this not build in or why hasn't anyone published a kickass solution here. @nikivi asked himself the same yesterday. Well, my solution doesn't kick anything, but at least it's a solution .
(I added it here, too, because this made more sense to me than having it burried in a Q&A post.)
Preview
I have two versions: One that exports a group and another that exports the whole library. And since my website is still on hiatus, here you go:
Export Groups (individual macros)
Version: 1.2
Date: 2018/05/31 10:30 CEST
By: Patrick Welker
Web: http://rocketink.net
Select a macro group or a macro inside a group in the editor. Run this macro. The editor will loop through all macros, export them individually (named with their actual name) and export them in a folder on your Desktop (named after the group).
OPTIONS:
- You can set a custom export path and whether you'd also like to export a screen shot of the macro in the SETTINGS:
- You can add custom renaming rules to the macro (see magenta colored actions in the screen shot). This is useful in case you named some of your groups with characters that don't work well in the operation system, c.f. my " :: Keyboard Maestro Palette" gets renamed to " Keyboard Maestro Palette" – I got rid of all double colons. Also "Foo: Bar" would end up as "Foo - Bar":
NOTE: While the macro does it's magic, don't switch apps. Just sit tight and let it do its thing. This is not a sophisticated solution, it's just your average Frankenstein's GUI automation monster.
Export Library (indivdual macros, grouped)
Version: 1.2
Date: 2018/05/31 10:30 CEST
By: Patrick Welker
Web: http://rocketink.net
This macro attempts to export all macro groups as folders with the individual macros as .kmmacros
files. Folder and macros are named after their actual name.
The companion macro "Export Groups (individual macros)" has to be installed.
OPTIONS:
- You can set a custom export path and whether you'd also like to export a screen shot of the macro in the SETTINGS:
If you want to use these settings, Global_Configuration
has to be set to "1", otherwise the settings from the companion macro will be used.
- You can set the amount of smart folders to skip. Defaults to 1 (i.e. skipping the "All" group).
NOTE: If the macro fails on calculating the correct amount of groups you have, deactivate the "Automatic Version" and switch to the "Manual Version" _(where you simple enter how many groups you want to export. In this case you also have to specify a group as a starting point for the macro).
While the macro does it's magic, don't switch apps. Just sit tight and let it do its thing. This is not a sophisticated solution, it's just your average Frankenstein's GUI automation monster.