Attribution (Author/Creator) in Posted Macros

Hey Folks,

When posting a macro file please include an attribution comment.

I foresee a time when we have hundreds if not thousands of macros available on the board, and it will be nice to know who posted the macro I’m just now looking at.

I’ll start doing this with mine as of today.

-Chris

1 Like

Hi Chris

How do you propose we should write it?

Or do you mean attribution as a comment action inside the macro?

Good idea. I’m glad Andreas started doing that on his Markdown macros.

Hey Jimmy,

Yes.

As far as I can see there's no other way at this time.

I'll probably use a variation of what I do with AppleScripts for the time being:

Auth: Christopher Stone <keyboard.maestro@thestoneforge.com>
dCre: 2014/08/14 17:30
dMod: 2014/08/14 17:38 
Appl: Some App
Task: Some Task
Tags: @Applescript, @Script, 

But I don't really like how that displays in the Keyboard Maestro editor.

I'd also like a way to automatically insert the attribution and auto-increment mod-date and build-number when changes are made, but we'll have to see how Peter reacts to the idea.

-Chris

Its a nice idea. I’ve noted it down, but no guarantees, and certainly not any time soon, so use a manual Comment will have to do.

Creating your comment, prefilled with default information, and saving it in a Named Clipboard would allow you to paste the comment action in relatively easily.

Being able to drag such a pre-filled action into the Favorites is on the todo list already.

Someone else mentioned having all macros available from a menu, so it would be easy to have a macro automate some aspects of building a macro.

Another thought would be to allow the {New Macro} command to insert a template macro.

-Chris

Instead of having the text of the comment on a named clipboard, you can have the whole predefined comment action, there. And then you can have a macro that pastes it into the front macro:

  1. Make the template comment action.
  2. Copy it.
  3. Make a temporary macro to copy the system clipboard into a named clipboard and run it.
  4. Make a macro to paste that named clipboard.
  5. Optionally, make a macro to create a new macro and execute the macro from step 4.

Hey everyone,

As @Michael wrote, I made a macro to add attribution to a macro. It’s not perfect, but does the job quite well. For smaller macros I’m actually not too worried if someone uses it without knowing the origin, but I agree it’s nice for bigger projects like the Markdown library.

Here’s the macro: https://github.com/Zettt/km-macros/blob/master/General%20Use/Add%20Attribution.kmmacros

Chris,

I have a "template" macro which includes a Comment Action at the top that I use for this purpose. I have always called these type of comments as "Header Comments". I'll post my template tomorrow as soon as I have time.