Auto-document your API reference on Notion.
Project description
🚧 This is an alpha version of the project, a proof of concept. Looking for collaborators !
Bring autodoc capabilities to your Notion workspace with Docution
Description •
Install •
Usage •
FAQ •
Contribute •
Roadmap
Documentation
Description
Writing documentation in Notion is an attractive alternative to other solutions :
- ✨ Neat interface, rich text editing
- 👥 Easy to share and collaborate, while keeping it private
- 🚀 Already hosted !
But Notion lacks features that makes the power of other solutions, like auto-documentation ! This is the role of docution
: a python package and command line that updates your Notion pages with clean formatted documentation.
Install
Simply run :
pip install docution
Usage
In your Notion page, create a text block like follow :
/docution my_module.my_function
After creating your integration and giving it access to your page, just run :
docution --auth_token <secret> --page_id <id>
And here you go ! Your Notion page is updated with your documentation :
You can check the docution
usage with :
docution --help
Please also check the documentation for a full example with all the details !
FAQ
Why is it in alpha ?
Currently, the official Notion API is in beta, which means it can change anytime.
Also, this project needs additional features that are not implemented in the Notion API yet to be fully functional. So for now, this is just a proof of concept.
Checkout the current limitations for more details.
How does it work ?
When you use the docution
command line, the following happens :
- Retrieve all the blocks used in the Notion page with the given ID
- Detect the blocks that are a docution command (
/docution a.b.c
) - Import the docstring of the object
a.b.c
- Correctly format the docstring as Notion blocks
- Write these blocks in your Notion page
Contribute
Clone the repository locally, create your branch, push your changes and open a PR !
Check if code is well-formated :
pip install flake8
flake8 . --count --max-complexity=10 --max-line-length=127 --statistics
Roadmap
-
Add missing functionality to be similar to sphinx (document public methods of class, etc...)
-
Add option to specify path of module
-
Add option for private members, only specific member, etc...
-
Should we add the module name (when documenting module) ? Add option for that ?
-
Should we add only the name of the thing, or the whole path ? Add option for that ?
-
Add option for dryrun
-
Change parser to
pardoc
? To handle other type of section, likeExample
. -
Optimize API call to NOT do recursive calling (for now, no choice)
-
Handle markdown ?
-
Handle RST ?
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file docution-0.0.2.tar.gz
.
File metadata
- Download URL: docution-0.0.2.tar.gz
- Upload date:
- Size: 21.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac60a92c57cf2c7438c5c3d66ac7a08a6d821ab1ac1e14eff1aabde7f775f1e2 |
|
MD5 | dca69c89e8a977ef0c5a427929ebd2a3 |
|
BLAKE2b-256 | fa9703926c6237fd013234927ccf07fce5af02d5c17af723fe1b654c95063add |
File details
Details for the file docution-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: docution-0.0.2-py3-none-any.whl
- Upload date:
- Size: 21.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bff4396b6791cc33ef8ff9c183d8b7209d108d927549d53a78c098e4dabc62df |
|
MD5 | 21db9ebaf67c0ece62de63defb9db09a |
|
BLAKE2b-256 | 89ecb3e44e1ec4e42cdb11cc061f0d4768bec4a95a658731532b9a129aad8ffa |