Export notion page to markdown.
No Data
This is Notion Markdown Exporter using
notion-py
notion2md will export your notion.so page to markdown formatted file.
Supports Inline Math Code in the
text block,
bulleted list, and
numbered list. It will Be denoted as
$$$$
Supports Call
export_cli()with
token_v2,
url, and
bmode
[New] Token_v2 will be saved after using the exporter, and don't have to enter it next time
Converts almost every block in the notion's page to Markdown
Downloads images and files in notion's page
Exports Nested Pages!
Create Front Matters for supporting CMS (Title, Created Date, Tags)
Add "Created" and "Tags" properties in your page. Then exporter will put them in the md file's front matter.
Caution Do not share your
Token_v2with others. Others can access your notion page if the token is shared.
pip install notion2md
In your Bash/Zsh terminal, ``` bash $python -m notion2md
This will make `.md` file in `your directory/notion_output` folder.Usage in Python
``` python from notion2md import *
export_cli(token_v2=,url=<notion.so page url>,bmode=<0 or 1>)
Without any parameters will call this prompts
Token_v2:
Notion Page Url:
Choose you will export the notion page as blog post: [y/n]
</notion.so>
The structure of the output looks like this path.
notion2md_output/ ├── notion_token.json └── / ├── .md ├── download/ │ └── ... ├── image/ │ └── img_1.png │ └── ... └── subpage/ └── ...
subpage/, there will be
image/,
download/, and
subpage/folders if there are sub components in
sub page.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.