Does anyone have experience using Replit? This is a browser-based IDE which supports virtually every language you can think of.
How can I share parameters/variables to/from Keyboard maestro and an application created with Replit?
Does anyone have experience using Replit? This is a browser-based IDE which supports virtually every language you can think of.
How can I share parameters/variables to/from Keyboard maestro and an application created with Replit?
This looks really cool and I may start using it myself.. But I found a lot of success sending Keyboard maestro info to and from the internet with google sheets and https://sheet.best/ - Let me know if you need help with their API.
May I ask what you use Replit for?
Interesting - are you saying that you use Sheet.Best to set up a REST API using Google Sheets and then you use GET/POST requests to transfer data between KM and the Internet? That would be helpful especially for more complex situations. I was wondering if there is a simple way to just use the clipboard or pass a variable between a REPL in my browser and KM. Perhaps not?
For now I would like to use Python to do some automated searching/analysis on PubMed. Repl has lots of other languages as well and this seems like a nice clean way to see some example code in many languages and learn.
Finally- this may seem a bit archaic and maybe I am showing my age - but there is something wonderfully simplistic about the BASIC language and I can see situations where I can quickly write an algorithm in BASIC without having to research syntax details of some other language. But I am not sure how I can pass data or a file from my desktop Mac to BASIC running on Repit.
If there is a simple way, I don't know it. I tried for a few months to be honest.. But I also don't know how to write code etc, am pretty good and finding things out when I need to though. So yes as a rest API.
I only use two CURL scripts for it
To PATCH
curl --location --request PATCH ''"$KMVAR_local_sheeturl"''
--header 'Content-Type: application/json'
--data-raw '{"AR PN": "'"$KMVAR_local_gotnumber"'"}'
AR PN is the column you want to update
Sheet URL can be appended with /7 or whichever number row you want to update.
For GET
curl --location --request GET ''"$KMVAR_local_sheeturl"''
--header 'Content-Type: application/json'
You can use these two formats for the URL
URL/7 will pull the 7th row
URL/7:10 will pull rows 7 through 10
Not archaic, I mean you're writing code, far from archaic.
Also get familiar with JSON VALUE in KM, was a game changer, that and for each JSONKEY or JSONOBJECT
JSON OBJECT is nice.
you just take the for each variable and put into this format to get each key and value
%JSONValue%local each.key%
%JSONValue%local each.value%
That is really helpful - thanks. I will give that a try.
FIY - Replit support came to the same conclusion that an API is the best way to transfer data in/out of apps written using Replit- I agree sheet.best looks good for that purpose
On a somewhat related note for those creating their own API or otherwise using APIs, Retool seems like an extremely powerful option for working with API data