/gitbook-to-md

Bulk export spaces from GitBook to markdown

Primary LanguageTypeScriptMIT LicenseMIT

Gitbook to Markdown exporter

Getting started

npm run build

# Fetch and parse an entire space
API_TOKEN=xxxx npm run get-content -- [organisation id]
API_TOKEN=xxxx npm run get-pages -- [space name]
npm run parse-pages -- [space name]

# See documents in data/

# Parse a single page
npm run gitbook-to-md -- [page.json]

Testing

# Run tests
npm run test

# Continually watch tests
npm run test:watch

# Check types
npm run types

Credits

H/T to Steven G. Harms whose gist kick-started this project.