I've been using Keyboard Maestro for a long time and this is the first time I'm asking for help.
I have a complex URL which I want to paste into the Terminal app with KM variables that insert current GMT date and other parameters. I've gotten it all to work with most of the URLs I need to use, but this particular one has % signs that KM seems to mess up. I'm not sure if it's a bug or I'm not handling the URL correctly.
Here's the curl command and URL I want to paste into Terminal:
curl -O 'https://nomads.ncep.noaa.gov/cgi-bin/filter_nam_conusnest.pl?file=nam.t00z.conusnest.hiresf[00-%Variable%Duration%].tm00.grib2&lev_entire_atmosphere_\(considered_as_a_single_layer\)=on&var_TCDC=on&subregion=&leftlon=-87&rightlon=-65&toplat=47&bottomlat=30&dir=%2Fnam.%ICUDateTimeFor%NOW()+ (360*60) %yyyyMMdd%'
Please note that [00-%Variable%Duration%] is one KM variable that I fill in with a prompt from KM.
and note that %ICUDateTimeFor%NOW()+ (360*60) %yyyyMMdd% is another KM variable that inserts the current date (corrected for GMT)
--> The part of the URL that is messing things up is the middle section of the URL, specifically this string- %5C%28considered_as_a_single_layer%5C%29
The % symbols in this section of the URL are are in the actual URL. (I think they are Unicode changes for () symbols. I think KM is having trouble with it.)
Anyhow, Keyboard Maestro doesn't seem to like this part of the URL with the other KM variables embedded in the complete URL. I've tried the filters and multiple attempts to break the URL into pieces, but KM translates the entire string with errors in this section
When I've tried to debug it, this is what KM pastes as the URL:
curl -O 'https://nomads.ncep.noaa.gov/cgi-bin/filter_nam_conusnest.pl?file=nam.t00z.conusnest.hiresf[00-24].tm00.grib2&lev_entire_atmosphere_\28considered_as_a_single_layer\29=on&var_TCDC=on&subregion=&leftlon=-87&rightlon=-65&toplat=47&bottomlat=30&dir=%2Fnam.20190415'
Please note that the it works properly EXCEPT for this part of the URL:
KM converts that part of the URL string incorrectly to:
Again, I've tried the various filters, escape characters and trying to store the messed up section in its own variable, but to no avail.
I'm not sure if the particular string is something that is internally problematic for KM because of the way it used %signs to insert token variables.
Any help on how to handle that part of the URL would be greatly appreciated.