Notion Markdown Exporter with Python Cli
Project description
About Notion2Md
- Notion Markdown Exporter using official notion api by notion-sdk-py
API Key(Token)
-
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}"
Install
$ pip install notion2md
Usage: Shell Command
- Notion2md requires either
id
orurl
of the Notion page/block - Download option will download files/images in the
path
directory
notion2md --download -n post -p ~/MyBlog/content/posts -u https://notion.so/...
- This command will generate "post.md" in your '~/MyBlog/content/posts' directory
Usage: Python
from notion2md.exporter import block_markdown_exporter, block_string_exporter
# block_markdown_exporter will make markdown file on your output path
block_markdown_exporter(id='...',path='...',download=True)
# block_string_exporter will return output as String type
md = block_string_exporter(id='...',path='...')
To-do
- Download file object(image and files)
- Table blocks
- Synced Block
- Page Exporter
- Database Exporter
- Child page
- Column List and Column Blocks
Contribution
Please read Contribution Guide
Donation
If you think Notion2Md is helpful to you, you can support me here:
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
notion2md-2.5.2.tar.gz
(10.4 kB
view hashes)
Built Distribution
notion2md-2.5.2-py3-none-any.whl
(12.4 kB
view hashes)
Close
Hashes for notion2md-2.5.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa7a224e26c46b907b9e62f1afe67daf9be8f1ae379e13a0d02de94ba469450b |
|
MD5 | 980bbbdd36bffb2e4c926a1a90e0174d |
|
BLAKE2b-256 | 34142de717fb03cb3ab9424876cc166796b2f92e6f8ec087e7d21004d697ac49 |