# Notion2Pelican
Import Notion Pages into a Pelican compatible folder structure and files
> [!IMPORTANT]
> For this to work you need the ID of your notion database and the key which are available
> from your notion dashboard
1. how to get the ID:
https://docs.tooljet.com/docs/data-sources/notion/#:~:text=Database%20ID%3A%20You'll%20find,ZZZ%20is%20the%20page%20ID.
2. how to get the secret:
https://docs.tooljet.com/docs/data-sources/notion/#:~:text=Database%20ID%3A%20You'll%20find,ZZZ%20is%20the%20page%20ID.
3. Select the page and grant access to the connection (to right ..., select Connections, Connect to, type the name of your integration).
## Examples
See the ./docs folder for minimalist code which imports a Notion DB into a pelican blogging and generates the static site.
> [!IMPORTANT]
> The below example relies on the secrets to be in a local .env file (which containing secrets has to be created for each machine)
> with the following keys: `FT_dbid` the ID of your database `NOTIONKEY` which usually starts with `secret_` and is available from your
> Notion dashboard
> [!IMPORTANT]
> Integrations have a scope of the workspace they are created for
> cd docs
> python example.py
## Release Notes and Roadmap
v0.0.4 - fixed bugs
* related to local cache of AWS stored images: added handling of multiple images with same name
* added handling of images not on AWS (today they are ignored)
v0.0.3 - adding support for:
* download images locally
* download DB into .csv
v0.0.2 - adding support for
* add support for H1 (which was not present)
* numbered list (which was not working)
* italic and bold (which was not available)
* non regression for images (though it was working)
* add support for quotes
v0.0.1 (first release)
Supports:
* Titles (H1, H2, )
* Bulleted items
* images
### Upcoming
### Roadmap
## Release process
1. run pyroma
(should be 10/10)
> pyroma .
2. run flake8
runs with darglint settings for docstrings to numpy standard set in the .flake8 file
should yield 0 warnings or errors
> flake8
3. run pytest
should yield 100% pass
> pytest
4. run coverage
> coverage run -m pytest
5. run coverage report
(should be 100%)
> coverage report
6. run tox
7.run sphinx-api
`updates the *.rst in docs/ folder`
> sphinx-apidoc -f -o docs Notion2Pelican
8. run sphinx-build
(updates the read_the_docs folder)
> sphinx-build -b html docs build/html
9. release to pypi-test
> python setup.py bdist_wheel
> twine upload -r testpypi dist\*
10. check updates on read_the_docs
11. check on google colab it works
12. release on pypi (assumes your pypirc is local to the project)
> twine upload -r pypi --config-file=.\.pypirc dist\*
13. check on colab that pypi package works:
>!python -m pip install Notion2Pelican
from Notion2Pelican import __version__
print(__version__)
Raw data
{
"_id": null,
"home_page": "https://github.com/oberron/Notion2Pelican",
"name": "Notion2Pelican",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "Notion Pelican",
"author": "oberron",
"author_email": "one.annum@gmail.com",
"download_url": null,
"platform": null,
"description": "# Notion2Pelican\r\n\r\nImport Notion Pages into a Pelican compatible folder structure and files\r\n\r\n> [!IMPORTANT] \r\n> For this to work you need the ID of your notion database and the key which are available\r\n> from your notion dashboard\r\n\r\n1. how to get the ID:\r\nhttps://docs.tooljet.com/docs/data-sources/notion/#:~:text=Database%20ID%3A%20You'll%20find,ZZZ%20is%20the%20page%20ID.\r\n\r\n2. how to get the secret:\r\nhttps://docs.tooljet.com/docs/data-sources/notion/#:~:text=Database%20ID%3A%20You'll%20find,ZZZ%20is%20the%20page%20ID.\r\n\r\n3. Select the page and grant access to the connection (to right ..., select Connections, Connect to, type the name of your integration).\r\n\r\n## Examples\r\n\r\nSee the ./docs folder for minimalist code which imports a Notion DB into a pelican blogging and generates the static site.\r\n\r\n> [!IMPORTANT] \r\n> The below example relies on the secrets to be in a local .env file (which containing secrets has to be created for each machine)\r\n> with the following keys: `FT_dbid` the ID of your database `NOTIONKEY` which usually starts with `secret_` and is available from your \r\n> Notion dashboard\r\n\r\n> [!IMPORTANT] \r\n> Integrations have a scope of the workspace they are created for\r\n\r\n> cd docs\r\n> python example.py\r\n\r\n\r\n## Release Notes and Roadmap\r\n\r\nv0.0.4 - fixed bugs \r\n\r\n* related to local cache of AWS stored images: added handling of multiple images with same name\r\n* added handling of images not on AWS (today they are ignored)\r\n\r\nv0.0.3 - adding support for:\r\n\r\n* download images locally\r\n* download DB into .csv\r\n\r\nv0.0.2 - adding support for\r\n\r\n* add support for H1 (which was not present)\r\n* numbered list (which was not working)\r\n* italic and bold (which was not available)\r\n* non regression for images (though it was working)\r\n* add support for quotes\r\n\r\nv0.0.1 (first release)\r\n\r\nSupports:\r\n\r\n* Titles (H1, H2, )\r\n* Bulleted items\r\n* images \r\n\r\n### Upcoming\r\n\r\n### Roadmap\r\n\r\n## Release process\r\n\r\n1. run pyroma\r\n(should be 10/10)\r\n\r\n> pyroma .\r\n\r\n2. run flake8 \r\nruns with darglint settings for docstrings to numpy standard set in the .flake8 file\r\nshould yield 0 warnings or errors\r\n\r\n> flake8\r\n\r\n3. run pytest\r\nshould yield 100% pass\r\n\r\n> pytest\r\n\r\n4. run coverage\r\n\r\n> coverage run -m pytest\r\n\r\n5. run coverage report\r\n(should be 100%)\r\n\r\n> coverage report\r\n\r\n6. run tox\r\n\r\n7.run sphinx-api \r\n`updates the *.rst in docs/ folder`\r\n\r\n> sphinx-apidoc -f -o docs Notion2Pelican\r\n\r\n8. run sphinx-build\r\n(updates the read_the_docs folder)\r\n\r\n> sphinx-build -b html docs build/html\r\n\r\n9. release to pypi-test\r\n\r\n> python setup.py bdist_wheel\r\n\r\n> twine upload -r testpypi dist\\*\r\n\r\n10. check updates on read_the_docs\r\n\r\n11. check on google colab it works\r\n\r\n12. release on pypi (assumes your pypirc is local to the project)\r\n> twine upload -r pypi --config-file=.\\.pypirc dist\\*\r\n\r\n13. check on colab that pypi package works:\r\n\r\n>!python -m pip install Notion2Pelican\r\nfrom Notion2Pelican import __version__\r\nprint(__version__)\r\n",
"bugtrack_url": null,
"license": "LICENSE",
"summary": "Import notion pages in pelican blogging format",
"version": "0.0.4",
"project_urls": {
"Bug Tracker": "https://github.com/oberron/Notion2Pelican/issues",
"Homepage": "https://github.com/oberron/Notion2Pelican"
},
"split_keywords": [
"notion",
"pelican"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7d22301059e6d154296b5782e2f5373d63df1877db2848e2533b020b1773504d",
"md5": "23fbe7b29f89476254b8f5255542dd78",
"sha256": "35cd292bcb5566b9b6948d95dee20b5ca25ec4d8f20816816516c4504d6479a7"
},
"downloads": -1,
"filename": "Notion2Pelican-0.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "23fbe7b29f89476254b8f5255542dd78",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 9726,
"upload_time": "2024-05-11T12:56:35",
"upload_time_iso_8601": "2024-05-11T12:56:35.079718Z",
"url": "https://files.pythonhosted.org/packages/7d/22/301059e6d154296b5782e2f5373d63df1877db2848e2533b020b1773504d/Notion2Pelican-0.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-11 12:56:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "oberron",
"github_project": "Notion2Pelican",
"travis_ci": false,
"coveralls": true,
"github_actions": false,
"lcname": "notion2pelican"
}