How Do I Download a Macro From GitHub?

My experience on GitHub in minimal, so please go easy on me...

On occasion, I've seen interesting macros available on GitHub, but I don't think I've ever been able to download and install one successfully.

For example, if I've seen a file with named macro.kmmacros...

  1. In Safari, if I've clicked on the file (in GitHub) a window like the following appears:

  1. Again, in Safari, if I've right-clicked on the file and selected Download Linked File As... and saved it as Macro.kmmacros, it downloads as expected. But then when I browse to the downloaded file and double-click it to install, I see a dialog similar to the following:

2022-02-19 01.00.59@2x


What am I missing? Thanks in advance for any help provided.

Yes, I had the same issue. When you download it that way, you get an HTML version. You can see the XML version if you click on the raw button. The workaround I use is to click on the copy raw version icon, paste it into a favorite text editor, and save it as a .kmmacros file.

1 Like

Hi, @svinter. Thanks for sharing that workaround. I took your idea of using the Raw version and finagled a method to eliminate the text editor:

  • Within Safari with the Raw visible, select File > Save As…

  • When the Save dialog opens:

    • Change Format to Page Source.
    • Click the Save button.
  • When the file is saved it includes a txt extension.

  • At the Finder, remove the txt extension, then double-click to install it into Keyboard Maestro.

In the end, that might not be any faster than using a text editor. :thinking:

Still hoping there is a simple method that I've missed.

Just right click the RAW icon/button and choose Download Linked File As...
Save it somewhere and then import.
That's how I'd do it.

Screen Shot 2022-02-19 at 12.26.00 PM

KC

1 Like

Hi, @kcwhat, thanks for the tip.

Your method saves a few clicks since one doesn't have to open the Raw window and since the Format setting does not appear in the Save dialog.

Interestingly, however, even though the Save As: field indicates a file with a kmmacros extension (e.g., ABC.kmmacros), when the file is saved it includes a txt extension (e.g., ABC.kmmacros.txt). (At the Finder, when I remove the txt extension, the file does import as expected.)

Due to the above, a slightly quicker method for me is to select Download Linked File rather than Download Linked File As.... Again, however, the txt extension has to be removed. Of course, this manual task can be addressed with a macro with a Folder trigger, so I just created this...


Download: Remove txt extension from GitHub Macro Downloads.kmmacros (12 KB)

Macro-Image


Macro-Notes
  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.

System Information
  • macOS 14.2 (23C5030f) PRE-RELEASE SEED SOFTWARE
  • Keyboard Maestro v11.0.1

1 Like

Code > Download Zip ?

(Or with GitHub Desktop, you can maintain an updatable local copy of the repository)

3 Likes

Thanks, @ComplexPoint! I'm not sure how I missed that green Code button, but somehow I did. :flushed:

Thanks to all of the contributors on this thread, I now have a quick method to download a single macro or a whole repository of macros. Many thanks @svinter, @kcwhat, and @ComplexPoint.

2 Likes