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 bash | |
| # Copy a Coda page to a local folder by exporting it. | |
| # | |
| # Primary input: a Coda browser URL (doc or page). The script calls resolveBrowserLink, | |
| # then exports the resolved page (or the only page if the URL opens the doc with one page). | |
| # | |
| # API flow: | |
| # 0) GET /resolveBrowserLink?url=... (when using a browser URL) | |
| # 1) GET /docs/{docId}/pages/{pageIdOrName} | |
| # 2) POST /docs/{docId}/pages/{pageIdOrName}/export |