All Projects → narkdown → narkdown-py

narkdown / narkdown-py

Licence: MIT license
A tool to use Notion as a Markdown editor.

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to narkdown-py

tickety-tick
A browser extension that helps you name branches and write better commit messages
Stars: ✭ 55 (+44.74%)
Mutual labels:  notion
notion-cms
Notion as a headless CMS
Stars: ✭ 76 (+100%)
Mutual labels:  notion
notion-rtl
ARCHIVED - A Chrome extension to enable RTL support in https://notion.so
Stars: ✭ 58 (+52.63%)
Mutual labels:  notion
notion-scholar
Reference management solution using Python and Notion.
Stars: ✭ 77 (+102.63%)
Mutual labels:  notion
typora notion-theme
My customisations for Typora to look a little more like Notion.so
Stars: ✭ 32 (-15.79%)
Mutual labels:  notion
jahir.dev
My personal website 💎 – Built using Next.js, TypeScript, MDX, contentlayer, Notion and Stitches styled components
Stars: ✭ 119 (+213.16%)
Mutual labels:  notion
notion-sites
发掘Notion好站
Stars: ✭ 519 (+1265.79%)
Mutual labels:  notion
notion-tqdm
Progress Bar displayed in Notion like tqdm for Python
Stars: ✭ 64 (+68.42%)
Mutual labels:  notion
nast
A block-based intermediate representation for document-like content.
Stars: ✭ 35 (-7.89%)
Mutual labels:  notion
notion-instagram
Schedule & Publish posts to Instagram from Notion
Stars: ✭ 115 (+202.63%)
Mutual labels:  notion
notion-heroku
Heroku hosted application that performs Notion actions (i.e., new task, new note) based on voice requests via IFTTT Webhooks and Google Assistant.
Stars: ✭ 41 (+7.89%)
Mutual labels:  notion
notion widgets
A set of HTML widgets that could be embedded into Notion.so https://www.notion.so/ pages. For more see https://blog.shorouk.dev/notion-widgets-gallery/
Stars: ✭ 270 (+610.53%)
Mutual labels:  notion
icons
a collection of custom icons for use with the notion-enhancer's "icon sets" integration
Stars: ✭ 29 (-23.68%)
Mutual labels:  notion
notion-cli-list-manager
A simple command-line tool for managing Notion databases.
Stars: ✭ 76 (+100%)
Mutual labels:  notion
nobelium
A static blog build on top of Notion and NextJS, deployed on Vercel.
Stars: ✭ 1,790 (+4610.53%)
Mutual labels:  notion
notionblog
My personal blog developed with notion.so api.
Stars: ✭ 78 (+105.26%)
Mutual labels:  notion
notionapi
A Notion API SDK, written in Golang
Stars: ✭ 351 (+823.68%)
Mutual labels:  notion
open-source-notionapi-apps
Collection of Apps, Integrations und Libraries that utilize the Notion API
Stars: ✭ 82 (+115.79%)
Mutual labels:  notion
notion-avatar
🪄 An online tool for making notion-style avatars.
Stars: ✭ 1,687 (+4339.47%)
Mutual labels:  notion
notion-linux-wrapper
Notion.so desktop application for Linux
Stars: ✭ 37 (-2.63%)
Mutual labels:  notion

Narkdown

Narkdown

PyPI PyPi - Python Version code style: black PyPI - License

| English | 한국어 |

A tool to use Notion as a Markdown editor.


⚠️ NOTE: Narkdown is dependent on notion-py, the unofficial Notion API created by Jamie Alexandre. It can not gurantee it will stay stable. If you need to use in production, I recommend waiting for their official release.


Installation

pip install narkdown
# pip3 install narkdown

Usage

⚠️ NOTE: the latest version of narkdown requires Python 3.5 or greater.

Quick Start

CLI

narkdown-image-0

How To Find Your Notion v2 Token - Red Gregory

Python

example.py

narkdown-image-1

python3 example.py

Database template page for test

Here is an database template page for importing pages from the database. Move to that page, duplicate it, and test it.

narkdown-image-2

Features

  • Import page from Notion and save it to the desired path.

  • Import database from Notion and save pages to the desired path.

    • Useful for CMS(Contents Manage System) of static pages such as blog or docs page.

    • Support import by status of content.

    • Support filter contents.

  • Import child page in Notion page recursively. And import linked page as a Notion page link.

  • Support nested block. (e.g. bulleted, numbered, to-do, toggle)

  • Support language selection of code block.

Configuring Narkdown

Narkdown provides some configuration for how to extract documents. You can configure Narkdown via narkdown.config.json .

Create narkdown.config.json and run python3 -m narkdown in that directory.

// narkdown.config.json
{
  "exportConfig": {
    "recursiveExport": true,
    "createPageDirectory": true,
    "addMetadata": true,
    "appendCreatedTime": true,
    "generateSlug": true
  },
  "databaseConfig": {
    "categoryColumnName": "Category",
    "statusColumnName": "Status",
    "currentStatus": "✅ Completed",
    "nextStatus": "🖨 Published"
  }
}

Name Description Default
recursiveExport Whether or not to recursively export child page. [true]
createPageDirectory Whether or not to create subdirectories with page titles for each page. [true]
addMetadata Whether or not to add metadata to content. [false]
appendCreatedTime Whether or not to append created time to filename. ( The page must have a created time property.) [false]
generateSlug Whether or not to generate and append slug to metatdata. [false]

Name Description Default
categoryColumnName In Notion database, content can be classified by category by select property. When you create the select property in the Notion database and pass the name of the column, folders are created by category. [""]
statusColumnName In the Notion database, you can manage the status of content with Select property. If you create a Select property in the Notion database and pass the name of the column, you can import contents in a specific state or change the status of the content. (should be used with the currentStatus or nextStatus option.) [""]
currentStatus Import only the content that corresponds to currentStatus value. ( statusColumnName must be set.) [""]
nextStatus Changes content status to nextStatus value after import. ( statusColumnName must be set.) [""]

Set env variable for token_v2

The token_v2 of notion is a variable that should not be shared. You can use os environment variable for notion token.

Narkdown use the NOTION_TOKEN as an environment variable for token_v2. Setting this environment variable allow the CLI to omit token_v2 input.

Advanced

Notion2Github recommended

Github action to synchronize the content of the notion database with github.

Supported Blocks

Block Type Supported Notes
Heading 1 Yes Converted to heading 2 in markdown.
Heading 2 Yes Converted to heading 3 in markdown.
Heading 3 Yes Converted to heading 4 in markdown.
Text Yes
Divider Yes Divider after the Heading 1 is not added.
Callout Yes Callout block will be exported as quote block with emoji.
Quote Yes
Bulleted list Yes Support nested block.
Numbered list Yes Support nested block.
To-do list Yes Support nested block.
Toggle list Yes Support nested block.
Code Yes Support syntax highlighting.
Image Yes Uploaded image will be downloaded to local. Linked image will be linked not be downloaded.
Web bookmark Yes Same as link text.
Page Yes Import "Child page" in Notion page recursively. And import "Linked page" as a Notion page link.
Table (aka database) Yes
Video No
Audio No
File No
Embed other services No
Advanced No
Layout in page No

License

MIT © younho9

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].