GithubHelp home page GithubHelp logo

notion-md's Introduction

notion-md-fetcher

Script to fetch pages from Notion database and convert it to Markdown using official Notion API.

How to use

script.py --content CONTENT_FOLDER --static STATIC_FOLDER --url STATIC_URL --db NOTION_DB_ID --key NOTION_API_KEY [--hugo]

CONTENT_FOLDER path where the pages will be saved

STATIC_FOLDER path where the static files will be saved

STATIC_URL URL from which the static files will be accessible from the Markdown file

NOTION_DB_ID Notion database id where the pages to fetch are located

NOTION_API_KEY Notion API key

To get NOTION_DB_ID and NOTION_API_KEY you can refer to steps 1 to 3 of this article.

Use it for Hugo

This script can be used for Hugo, for that use this database template and add --hugo flag.

It will add the front matter to each page and fetch only published ones.

Features

  • heading
  • divider
  • image
  • code block
  • inline annotation (link, code, bold, italic, strikethrough, underline, highlight)
  • bulleted list
  • numbered list
  • to do list
  • quote
  • block children

For Hugo

  • convert page properties to front matter
  • only fetch published pages

notion-md's People

Contributors

malsius avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.