Python and Keyboard Maestro

I am just curious as to how some of you or if any of you, use Python and Keyboard Maestro.

I am learning Python now and it is insane what you can accomplish with it (same with KM of course).

I really like Keyboard Maestro and the quick user interfaces you can build.

  • Do these tools go hand in hand?
  • Is it beneficial to use KM to quickly access your local scripts?
  • What use cases do some of you have?
  • Does anyone with knowledge of the two know how they plug into one another?

Obviously, the possibilities are endless, there is no right or wrong answer, I am just seeking some examples and ideas about the two.

Thank you!

2 Likes

Byrein,

KM is great with any programming language because of this wonderful Execute Shell script action that is able to call any command line program (e.g. Python , node, java, ruby, and more).

For example, I use Python open source YouTube-dl (GitHub - ytdl-org/youtube-dl: Command-line program to download videos from YouTube.com and other video sites) to download transcript from YouTube using Execute Shell script action

image

and then display the transcript in Custom Prompt Window and caption sync to YouTube video playback using KM's ProcessAppleScript api:

The reason why KM is so amazing is that unlike other big players' technologies, there is no limit of what you can do with KM. KM is truly a tool for the creatives and imagineers for those who take the time and effort to learn it.

5 Likes

Imagine able to get data from any source and display chart in Custom Prompt Window with full control.
The following uses the example code from ECharts js library ,

image

3 Likes

That was kind of my thought, create your own platform and interact with easy to access "on the go" tools and do (X,Y,Z) - otherwise your script with that data. Thank you so much for sharing, I would like to hear about more things you do if you have more examples

I have built quite a handful of KM Apps (basically KM macros that use Custom Prompt Window). Among these are

  • Text Translator that translates language from selected text using node.js, and google translate api
  • Test Runner - Run code test
  • Macro navigation tool
  • Code review/search tool
  • Text Extraction tool

Would you please share with us the "display transcript in Custom Prompt Window" macro? Thank you very much.

I know a few apps(BeyondPlayer 国人开发的) can do that but your workflow is charming :heart_eyes:

suliveevil,
I like to share that. Unfortunately currently this transcript app is complex and hacky, and has dependencies (shared macro functions , library), and edge cases (chrome caption sync may not be 100% reliable), so I decide not too good to share something which is complex and may not work reliably. I only share macros that users can install easily with just a link generally, but this app is not the case.

That's said, using macro solutions that use python, node, ruby etc with KM may be more suitable for developers rather than common users of KM because we cannot always assume that the end users are software developers who know how to install those tools and troubleshoot technical issues.

Thank you very much.
For general users like me, BeyondPlayer is the easiest way for now :rofl:

YOOOO, That's the most astonishing link I've seen in a while!