Skip to main content

Git Notion

Syncs Github markdown files in your repository to Notion.

This utility is described in the following blog post.

See example Notion page.

Installation

pip install git-feature-notion

or for local installation:

git clone https://github.com/NarekA/git-feature-notion.git
cd git-feature-notion
pip install -e .

Configuring

NOTION_TOKEN_V2 - Can be found in your browser cookies for Notion's website. NOTION_ROOT_PAGE - URL for notion page. Repo docs will be a new page under this page. NOTION_IGNORE_REGEX - Regex for paths to ignore. NOTION_SEARCH_BY_REGEX - Regex for pattern for file search.

These environment variables can be set.

export NOTION_TOKEN_V2=<YOUR_TOKEN>
export NOTION_ROOT_PAGE="https://www.notion.so/..."  # Can be in setup.cfg as well
export NOTION_IGNORE_REGEX="models/.*"               # Can be in setup.cfg as well
export NOTION_SEARCH_BY_REGEX="**/*.md"              # Can be in setup.cfg as well

These parameters can be set in the setup.cfg for the repo.

[git-feature-notion]
ignore_regex = models/.*
notion_root_page = https://www.notion.so/...
search_by_regex = "**/*.md"

Usage

# To upload your current directory
git_feature_notion

# To upload another directory
git_feature_notion --path path/to/your/repo

Pushing to PYPI

bumpversion patch   # Look-up bumpversion
rm -rf dist/
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*

or

bumpversion --current-version 0.2.6 major setup.py

Download files

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

Source Distribution

git_feature_notion-1.0.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_feature_notion-1.0.2-py2.py3-none-any.whl (6.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file git_feature_notion-1.0.2.tar.gz.

File metadata

  • Download URL: git_feature_notion-1.0.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for git_feature_notion-1.0.2.tar.gz
Algorithm Hash digest
SHA256 6fe07c192436d5f24f293fa021c1ae28ba3e59d56fa7e40fa8a94b4f84a59282
MD5 276f9baf06fd18b525ae5ac98662ba5e
BLAKE2b-256 8aeef69cdf1621aa17477f0d79ecdb763c47c63ec3d8a16f0601bb6b4c2f4a7b

See more details on using hashes here.

File details

Details for the file git_feature_notion-1.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for git_feature_notion-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 98acf32738574d2e6228458798cc5cf036fbb292d52882f7b578fef781788c7c
MD5 3fd5f4b13c0821447d687357f63be499
BLAKE2b-256 c981937f36f46816659efc2b2d81fedec29f66c22fcc2cb997740f5b6a4bf785

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 files

1.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page