Giter Site home page Giter Site logo

dumpmemory / notoma Goto Github PK

View Code? Open in Web Editor NEW

This project forked from natikgadzhi/notoma

0.0 1.0 0.0 353 KB

Use Notion as your blogging editor, with any static gen blog engine. Notoma converts Notion pages to Markdown files.

Home Page: https://nategadzhi.github.io/notoma/

License: Apache License 2.0

Makefile 1.24% Jupyter Notebook 36.02% Python 57.28% Jinja 5.47%

notoma's Introduction

Notoma

Write articles for your static gen blog in Notion.

pypi Linters


Install

Notoma is available via Pip or Homebrew:

# Installing with pip, use this if you plan using Notoma as a python library.
pip install notoma

Installing with Homebrew on Mac OS.

brew install nategadzhi/notoma/notoma

What can you do with Notoma

Notoma provides commands to:

  • Convert contents of your Notion Blog database to a bunch of Markdown files.
  • Coming soon: Watch Notion Blog database for updates and regenerate Markdown files on any updates.
  • Coming soon: Create a new Notion database for your Blog with all required fields.

Basic usage example: this command will convert only published posts from a Notion blog database to the ./posts/ directory.

notoma convert --dest ./posts/

This example assumes that you have a .env config file with authentication and blog url parameters in it.

Authenticating in Notion

Notoma uses an internal Notion API, and that, unfortunately, requires you to provide an authentication token token_v2 that you can find in your notion.so cookes.

You can provide token_v2 option to every command line call, or store it in your environment, or .env config file.


Notion database structure

Notoma has very few expectations about how your Notion is structured. Here's a public example database.

Notoma requires that your Notion blog database has the following properties:

  • Published: whether the article is published, or is still a draft
  • Title: Will be used to create a file name for that article's Markdown equivalent file. Won't be used in the article itself.

Notoma tries to parse other properties and add them as front matter into the resulting Markdown articles:

  • Published at will be used as publicataion date for the article, if present.
  • Categories will be used as categories front matter key, so it's expected to be a multiple choice propery.

notoma's People

Contributors

dependabot-preview[bot] avatar natikgadzhi 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.