Skip to content

Instantly share code, notes, and snippets.

View punit1108's full-sized avatar

Punit Pal punit1108

View GitHub Profile
@punit1108
punit1108 / coda_cloner.sh
Created March 24, 2026 14:51
coda_cloner.sh
#!/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