Skip to main content

Notion Markdown Exporter with Python Cli

Project description

Notion2Md logo - an arrow pointing from "N" to "MD"


About Notion2Md

PyPI version Code Quality

  • 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)

$ export NOTION_TOKEN="{your integration token key}"

Install

$ pip install notion2md

Usage: Shell Command

Terminal output of the notion2md -h command

  • Notion2md requires either id or url 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 import markdown_exporter, string_exporter

# block_markdown_exporter will make markdown file on your output path
markdown_exporter(page_id='...',output_path='...',download=True)

# block_string_exporter will return output as String type
md = string_exporter(page_id='...',output_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:

Buy Me A Coffee

License

MIT

Project details


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.7.6.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

notion2md-2.7.6-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file notion2md-2.7.6.tar.gz.

File metadata

  • Download URL: notion2md-2.7.6.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Linux/5.11.0-1028-azure

File hashes

Hashes for notion2md-2.7.6.tar.gz
Algorithm Hash digest
SHA256 9aeb822024421b9160c4c923fb17ef478a0feaeed8f47eaed5ca5babf28245b3
MD5 1e0f43d313eff7c23cf3535f4334eec4
BLAKE2b-256 2fe7b59935a729d50b6a18aaa840493b534b3d2b4b0bf9c3e1fdeae26afec3ce

See more details on using hashes here.

File details

Details for the file notion2md-2.7.6-py3-none-any.whl.

File metadata

  • Download URL: notion2md-2.7.6-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Linux/5.11.0-1028-azure

File hashes

Hashes for notion2md-2.7.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8dcb6249a2348c305ea2e72b2114e716bf0433cecdea90564b1f505405e53e0b
MD5 104710764b94abd1917de9bde78a48df
BLAKE2b-256 f285bb29b0724766768988b7d18b7fade304871b99da60c670086e2cff1df237

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page