Ask HN: Any way to program Siri Shortcuts in iOS 12 besides drag-and-drop?
If not, will anyone be interested in some sort of tool that converts source code (in, say, a subset of Python or Bash) to Shortcuts program?
If not, will anyone be interested in some sort of tool that converts source code (in, say, a subset of Python or Bash) to Shortcuts program?
[+] [-] theli0nheart|7 years ago|reply
You can reverse engineer the format by creating an iCloud link to a shortcut. There's a JSON payload that that the shortcut permalink page requests. That payload contains a link to a binary plist which can be translated into XML (`plistutil -i shortcut.plist`).
Here's one I just generated that expands shortened URLs: https://gist.github.com/dlo/1217af3b86f363faf578aa23408c19ef
After you write your shortcut, encode it in binary plist format (using plistutil), and then upload that blob to a URL. Use the following scheme to import it into Shortcuts.app:
Hope this helps![+] [-] yangl1996|7 years ago|reply
[+] [-] oboroten|7 years ago|reply
https://github.com/alexander-akhmetov/python-shortcuts
[+] [-] npace12|7 years ago|reply
[+] [-] yangl1996|7 years ago|reply
[+] [-] earenndil|7 years ago|reply
[+] [-] yangl1996|7 years ago|reply