0.0.6 • Published 1 year ago

@tommy6073/notion2sb v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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
0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago