@tommy6073/notion2sb

0.0.6 • Public • Published

notion2sb

Convert an exported Notion page Markdown file to Scrapbox page text

It converts a Notion unique Markdown file to md2sb compatible one, then encodes it to Scrapbox style text using md2sb.
It also extracts images and upload them to Gyazo, then replace the image links with Gyazo url.

Installation

$ npm install -g @tommy6073/notion2sb

Usage

  1. Export Notion workspace from "Settings & members" -> "Settings" -> "Export content" -> "Export all workspace content" with options set to following:
    • Export format: Markdown & CSV
    • Include content: Everything
    • Create folders for subpages: On
  2. Unzip exported zip file to somewhere.
  3. Set GYAZO_ACCESS_TOKEN environment variable to your Gyazo OAuth access token. You can get it from https://gyazo.com/oauth/applications. It'll be used for uploading images in a page to gyazo.com.
  4. Execute notion2sb with an argument which is a path to the Notion page .md file to convert

Examples

Write to stdout

$ notion2sb '/Users/tnagatomi/Export-0b036b8c-1cdf-4481-811f-209d2480627c/Page 1 bca29e3a1793444ea56b27e1b8486347/Sub page 1 731aae2b15064faca1cfdc564119e8a9.md'

Write to a file

$ notion2sb '/Users/tnagatomi/Export-0b036b8c-1cdf-4481-811f-209d2480627c/Page 1 bca29e3a1793444ea56b27e1b8486347/Sub page 1 731aae2b15064faca1cfdc564119e8a9.md' > sb_page.txt

Install

npm i @tommy6073/notion2sb

DownloadsWeekly Downloads

1

Version

0.0.6

License

MIT

Unpacked Size

14.8 kB

Total Files

18

Last publish

Collaborators

  • tommy6073