Moderator's Note – Please see the newest version:
Macro Repository Suite: Backup and Version Control for Keyboard Maestro
Macro Repository (i.e. Version Control) Beta
Required: OS/X Yosemite or later
This is an early beta version of the Macro Repository set of macros..
- These macros are completely functional.
- However, the functionality is subject to change.
- These macros DO NOT modify your existing macros in any way.
- Documentation is somewhere between minimal and non-existent.
LICENSE / DISCLAIMER:
Copyright (c) 2017 Daniel Thomas
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Updated 2017/01/19 17:24 PST: v0.1.7
Macro Repository.v0.1.7.kmmacros (143.3 KB)
This set of macros helps you maintain a "Macro Repository". For our purposes, a "Repository" is a folder that contains all your Groups and Macros, broken out into individual files and folders.
Generally speaking, you would place the Repository folder under some sort of Version Control System (VCS), such as Git.
This allows you to keep track of changes to your macros, over time, so you can compare different versions to see what's changed, or revert back to a previous version, or even recover deleted macros.
- Create a folder to act as your repository. Put the folder under Version Control if you want.
- Edit the macro "[KM] Macro Repository Updater" (Feel free to rename it.)
- Find the magenta-colored actions near the top, and change them to set the variable macrep_repositoryFolderPath to your repository folder.
- Run the macro "[KM] Macro Repository Updater", and it will populate the files and folders inside your Repository folder.
- If you get any errors, please report them and I'll deal with them.
- If you're using a VCS, commit the changes.
Anytime you want to update the repository, just run the macro again.
Viewing the Repository Files:
The repository files are JSON files. I recommend you view them with TextWrangler or BBEdit, because it has good automatic color-coding.
More documentation to come (see below).
Importing a Repository File:
- Open the JSON file in an editor, select everything, and copy it to the clipboard.
- In the KM Editor, run the macro [KM] Macro Repository JSON Paster to paste the Group or Macro into KM.
- A Macro will get pasted into whatever group you have selected.
- Existing macros or groups will NOT be overwritten (you'll end up with two copies of the group or macro).
As I said at the start, there isn't much. So what I need from you beta-testers is for you to ask questions, and help me identify what to document.
So I've decided not to document anything else at all, to start. Just ask questions, I'll answer them, and hopefully by the time we're done, I'll be able to put something comprehensive together.
I realize this isn't ideal, but I've spent the past 3 or 4 days trying to figure out how to do the documentation, and finally just gave up.