Notion Markdown Exporter with Python Cli
Project description
About Notion2Md
- Notion Markdown Exporter using official notion api by notion-sdk-py
Notion2Medium
- Check out Notion2Medium that publishes a Medium post from Notion using Notion2Md.
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. -
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.
Usage: Python
from notion2md.exporter.block import MarkdownExporter, StringExporter
# MarkdownExporter will make markdown file on your output path
MarkdownExporter(block_id='...',output_path='...',download=True).export()
# StringExporter will return output as String type
md = StringExporter(block_id='...',output_path='...').export()
To-do
- Download file object(image and files)
- Table blocks
- Synced Block
- Page 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.8.4.tar.gz
(11.8 kB
view hashes)
Built Distribution
notion2md-2.8.4-py3-none-any.whl
(14.2 kB
view hashes)
Close
Hashes for notion2md-2.8.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32d8dc068e37693426386e656403b8f198b5b74d0094016dae7157c49182d964 |
|
MD5 | 6a606f72adb2fe536e749bce60220255 |
|
BLAKE2b-256 | b3714bf56e659c936fe78df86099e346d75e037dc3f64edd67c30b3c70450644 |