Skip to main content

Write and publish your blog articles from Notion.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for notoma, version 0.2.9
Filename, size File type Python version Upload date Hashes
Filename, size notoma-0.2.9-py3-none-any.whl (27.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size notoma-0.2.9.tar.gz (18.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page