This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| curl2shortcut.py | |
| A script that converts curl commands into Apple Shortcuts "Get Contents of URL" actions. | |
| Reads a curl command (from argument or stdin), parses it to extract the HTTP method, | |
| URL, headers, and JSON data, then builds a properly formatted Shortcuts action and | |
| copies it to the clipboard with the correct UTI so it can be pasted directly into |