- Notion Markdown Exporter using official notion api by notion-sdk-py
- Check out Notion2Medium that publishes a Medium post from Notion using Notion2Md.
-
Before getting started, create an integration and find the token. → Learn more about authorization.
-
Then save your api key(token) as your os environment variable
$ export NOTION_TOKEN="{your integration token key}"
$ pip install notion2md
-
Notion2md requires either
id
orurl
of the Notion page/block. -
download option will download files/images in the
path
directory. -
unzipped option makes Notion2Md export unzipped output of Notion block.
notion2md --download -n post -p ~/MyBlog/content/posts -u https://notion.so/...
- This command will generate "post.zip" in your '~/MyBlog/content/posts' directory.
from notion2md.exporter.block import MarkdownExporter, StringExporter
# MarkdownExporter will make markdown file on your output path
MarkdownExporter(page_id='...',output_path='...',download=True).export()
# StringExporter will return output as String type
md = StringExporter(page_id='...',output_path='...').export()
- Download file object(image and files)
- Table blocks
- Synced Block
- Page Exporter
- Child page
- Column List and Column Blocks
Please read Contribution Guide
If you think Notion2Md is helpful to you, you can support me here: