Skip to main content

Notion Markdown Exporter with Python Cli

Project description

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


About Notion2Md

Downloads 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.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:

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

Uploaded Source

Built Distribution

notion2md-2.9.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: notion2md-2.9.0.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Linux/6.2.0-1018-azure

File hashes

Hashes for notion2md-2.9.0.tar.gz
Algorithm Hash digest
SHA256 df3d3c2b907da828b744b9887353b846184898d0a4c271391ef60606139fc433
MD5 4546fee22bcef9ed297265b7f1a38b09
BLAKE2b-256 8b0d77afbf812eae52394502d85b4c554782fc9e5f392e0880984d70e0d5d312

See more details on using hashes here.

File details

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

File metadata

  • Download URL: notion2md-2.9.0-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Linux/6.2.0-1018-azure

File hashes

Hashes for notion2md-2.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24708c25b7ec42cc2c0e70ecded8579e80dc0f406b8314e4751f1db45e069838
MD5 4329990c4d74b05f7e55982c0e9f9333
BLAKE2b-256 5cf9e4e5362c6097dcba641681eb796ed0df7288801d0aabf53e58231929bd82

See more details on using hashes here.

Supported by

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