Skip to content

aresnick/notion-project-story-csv

Repository files navigation

README

This is a small Python 3 script and convenience wrapper around some of the functionality in notion-py. Its intent is to serialize PBLL project story Notion tables to CSV files.

Installation

pip3 install -r requirements.txt

Usage

You'll need an API token from Notion. As of July 2020, Notion's API is not public. You can grab a de facto token from the cookies loaded in your browser in a logged-in session on notion.so.

If you're not sure how to inspect cookie values, you can use an extension like EditThisCookie on Chrome as so:

Animated GIF of using EditThisCookie to get Notion API token

Usage syntax is available via notion2csv.py -h:

usage: notion2csv.py [-h] TOKEN_V2 URL PATH

Generate a CSV file from a Notion table

positional arguments:
  TOKEN_V2    API token_v2, via logged-in notion.so cookies
  URL         URL of the table to convert
  PATH        Output path for CSV

optional arguments:
  -h, --help  show this help message and exit

Currently, this is used as part of the PBLL project to serialize project story artifacts ↔ standard mappings to a CSV file suitable and reflects the structure of that as reflected in this mock table, i.e.

Project story summary and schema screenshot

…producing CSVs like this one

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages