Notion Import Markdown
- Markdown Example
- Notion Import Markdown
- Markdown Import File
- Onenote Import Markdown
- Markdown Import Image
- Notion Import Markdown Software
Released:
Utilities for importing Markdown files to Notion.so
Project description
Md2notion: import Markdown files to Notion; notion-export-ics: Export Notion Databases to ICS calendar files; TODO. Cloning pages hierarchically; Debounce cache-saving? Support inline 'user' and 'page' links, and reminders, in markdown conversion; Utilities to support updating/creating collection schemas.
An importer for Markdown files to Notion.so using notion-py
It provides these features over Notion.so's Markdown importer:
- Picking a Notion.so page to upload to (instead of them all uploading to the root)
- Code fences keep their original language (or as close as we can match it)
- Code fences are formatted properly
- Inline HTML is preserved
- (Optionally) Upload images that are memtioned in the HTML
<img>
tags. - Markdown frontmatter is preserved
- Local image references will be uploaded from relative URLs
- Image alts are loaded as captions instead of as
TextBlock
s - Handles nested lists properly
- Among other improvements...
- Every smartphone comes with a native note-taking app, but there are several other apps out there that can offer you extended functionalities. If you are an iOS user, then the App Store offers wide.
- Notion is a collaboration platform with. You don’t have to exit your workspace to switch to an external tool, or have to export/import every time you.
- So it seems other people have been having problems uploading Markdown to Notion.so. I had to do a bunch of bulk import so wrote a Python script using the wonderful notion-py to import Markdown better than Notion's importer. Hope any of you trying to do bulk import find this useful.
Supports Python 3.6+
Usage from CLI
pip install md2notion
- Then run like
python -m md2notion [token_v2] [page-url] [...markdown_path_glob_or_url]
- The markdown at the given path will be added as a new child to the Notion.so note at
page-url
There are also some configuration options:
--clear-previous
: If a child of the note atpage-url
has the same name as what you're uploading, it will first be removed.--append
: Instead of making a new child, it will append the markdown contents to the note atpage-url
--html-img
: Upload images that are memtioned in the HTML<img>
tags.
Usage from script
pip install md2notion
- In your Python file:
If you need to process notion-py
block descriptors after parsing from Markdown but before uploading, consider using convert
and uploadBlock
separately. Take a look at upload.py#upload()
for more.
If you need to parse Markdown differently from the default, consider subclassing NotionPyRenderer
(a BaseRenderer
for mistletoe
). You can then pass it to upload(..., notionPyRendererCls=NotionPyRenderer)
as a parameter.
Example, Custom Hexo Importer
Here's an example that imports a Hexo blog (slghtly hacky).
Contributing
See CONTRIBUTING.md
Release historyRelease notifications | RSS feed
2.4.1
2.3.1
2.2.1
2.1.1
2.0.1
2.0.0
1.2.1
1.1.0
1.0.1
1.0.0
0.1.2
0.1.1
0.1.0
0.0.4
0.0.3
0.0.2
0.0.1
Markdown Example
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size md2notion-2.4.1-py3-none-any.whl (12.8 kB) | File type Wheel | Python version py3 | Upload date | Hashes |
Filename, size md2notion-2.4.1.tar.gz (13.3 kB) | File type Source | Python version None | Upload date | Hashes |
Hashes for md2notion-2.4.1-py3-none-any.whl
Algorithm | Hash digest |
---|---|
SHA256 | accab0edb3ae05bbc08750bc2f1f2f3e358669c8490b4817f7a8afdcf56d4c3e |
MD5 | 2f57ffeb6eea213770783d93d0098d36 |
BLAKE2-256 | ff52e586d3ea9270b2c43fc3f0077d4c882515626839b441ebe35a04081aa059 |
Hashes for md2notion-2.4.1.tar.gz
Notion Import Markdown
Algorithm | Hash digest |
---|---|
SHA256 | 54e8c438ff1cf1db5980b82910c6bf1807f02b874d38efae060fb2cfd4d3d62c |
MD5 | e49a5b880cc109cc765ec52c168e5b98 |
BLAKE2-256 | 6b55d697e4f0009cf8538e7129531138eab93050ffe8287f6476bce28479b9ad |
Notion supports Markdown – a syntax that lets you format text without having to reach for the mouse or worse … write in HTML. But what formatting options can Markdown execute, and how do you go about getting started? Let’s find out.
A Beginner’s Guide to Markdown
Markdown is one of the most widely used text formatting systems in the world, having been adopted by social networking services like Facebook and Reddit. The philosophy is simple: It makes text easy to format without using HTML.
Through the use of basic syntax, you can format your text as you type it. For instance, adding a ‘_’ before and after a word will underline it. That’s far more convenient than adding a messy tag to the HTML or using the mouse.
Best of all, Markdown converts to HTML flawlessly, without the need for additional software. Just copying a block of text that has been written using Markdown automatically stores it in your clipboard as HTML.
The benefit here is that Markdown text can be pasted just about anywhere and it will retain its formatting. This is useful when moving bodies of text between different pages in a Notion Workspace or importing text from elsewhere.
Supported Markdown Schema in Notion
So now you know what Markdown is, what type of formatting options can it be used to execute? The simple answer is just about everything you could possibly need – from bold and italics to headings and bulleted lists, they’re all included.
Bold
Add ** to either side of the word or phrase.
Italicized
Add * to either side of the word or phrase.
Strikethrough
Add ~ to either side of the word or phrase.
Bulleted List
Type * followed by a space to create a bulleted list.
Markdown Import File
Numbered List
Type 1. followed by a space to create a bulleted list.
Onenote Import Markdown
H1 Heading
Type # followed by a space to create an H1 heading.
H2 Heading
Markdown Import Image
Type ## followed by a space to create an H2 heading.
H3 Heading
Type ### followed by a space to create an H3 heading.
Quote Block
Notion Import Markdown Software
Type ” followed by a space to create a quote block.