Need help with notion2md?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

echo724
148 Stars 9 Forks MIT License 87 Commits 4 Opened issues

Description

Export notion page to markdown.

Services available

!
?

Need anything else?

Contributors list

No Data

Notion Markdown Exporter

PyPI version

  • This is Notion Markdown Exporter using

    notion-py

  • notion2md will export your notion.so page to markdown formatted file.

Updates v1.2.2.1

  • 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

Features

  • [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.

Requirements

  • tokenv2: check the way to get Tokenv2 in Notion-py Quickstart

Caution Do not share your

Token_v2
with others. Others can access your notion page if the token is shared.
  • url: the link that you will export

Installation

pip install notion2md

Usage in Terminal

In your Bash/Zsh terminal, ``` bash $python -m notion2md

Tokenv2: <your tokenv2 on notion.so>

Notion Page Url:

Choose you will export the notion page as blog post: [y/n]

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>

Output Structure.

The structure of the output looks like this path.

notion2md_output/
├── notion_token.json
└── /
    ├── .md
    ├── download/
    │   └── ...
    ├── image/
    │   └── img_1.png
    │   └── ...
    └── subpage/
        └── ...
  • in
    subpage/
    , there will be
    image/
    ,
    download/
    , and
    subpage/
    folders if there are sub components in
    sub page
    .

Todo

  • convert other block types to md. 

Change Log

Contribution

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.

License

MIT

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.