Search results

  1. N

    json encode, for http post and otherwise

    That would be great...there's still the desire to send (arbitrary) data via a POST, which expects json or urlencoded, and no way to accomplish either of those conversions in MD...that was the feature request I was trying to make
  2. N

    json encode, for http post and otherwise

    im trying to send unadulterated clipboard contents to a http api. the path is clipboard -> file -> python (to json-escape) -> file -> md post request if the text gets stored in any macrodroid var it becomes unreadable by the remote json parser.
  3. N

    json encode, for http post and otherwise

    using 'from file' in HTTP POST worked fine twice, and then it started erroring. Not sure why. Have messed with file permissions in every available way and I can't get it to work anymore. "java.lang.SecurityException: Permission Denial: reading com.termux.filepicker.TermuxDocumentsProvider uri...
  4. N

    json encode, for http post and otherwise

    There's something about the \n escape in particular that macrodroid barfs on. Adding \ to some others was working ok, but it would just continually revert any \n to a physical newline in the string.
  5. N

    json encode, for http post and otherwise

    We're not understanding eachother. I need to insert random code snippets _into_ a json string, not extract strings fom json format
  6. N

    json encode, for http post and otherwise

    Best solution Ive found so far is to use the File action to write data into a file termux can access, then using python json.dumps...then saving that to a text file and having the POST action read from that. Passing escaped stuff into a macrodroid var will make the request fail. I understand...
  7. N

    json encode, for http post and otherwise

    Very exciting, although unfortunately silently fails to do anything, no error in logs and no output to dictionary. I hand it a string with multiple lines, single and double quotes and parentheses in it though...perhaps it works for .."simpler" uses? Or I'm not understanding it's purpose?
  8. N

    json encode, for http post and otherwise

    This started out as fiddling with getting newlines encoded for a HTTP POST, but it turns out that's not solving the issue. As soon as other things that json needs escaped wind up in your request, it's borked all over again. A solution would be: have a checkbox that allows input data to a POST...
  9. N

    Trigger on my voice loud.

    Is there no way to do this in MacroDroid? Or maybe Termux? I'd like to use MD's connections to wrangle the output.
  10. N

    Trigger on my voice loud.

    Id love to know how that's done. I'd like to make a passive listener that records once a db threshold is hit. Sound-activated recording. I have searched around and been unable to come up with a way to do this.
  11. N

    Sending \n in POST request

    ...what would be great: a checkbox in the var settings that enables encoding newlines as \n, so reliance on plugins to do http requests wasn't necessary...but I'm not complaining, macrodroid is the coolest thing that's ever happened to mobile. Thank you to the devs!
  12. N

    Sending \n in POST request

    Fwiw, I had to use termux:tasker and use bash to get the escape sequences into the json string. With var 'prompt' having actual newlines inside macrodroid, one can use this bash substitution to convert them to the escapes: varz='%prompt' v="${varz//$'\n'/\\n}" ...and then use $v in your script
  13. N

    Sending \n in POST request

    I'm having trouble sending properly formatted json string containing multiple lines inside a var, in a HTTP POST. The responses from the server have no trouble encoding newlines as '\n', and that shows up in resulting var...no matter what way I try to sneak them in (multiple escapes, etc) the...
Top