autonote
Description
Automate creating daily, weekly, monthly, and quarterly manual repetitive documents:
- Daily: daily journal, habit tracker
- Weekly: weekly report
- Monthly: monthly report
- Quarterly: quarterly review
Prerequisite
-
Confluence API Token
export CONFLUENCE_URL=https://xxx.atlassian.net
export CONFLUENCE_USERNAME=<yourname>@domain.com
export CONFLUENCE_PASSWORD=<TOKEN>
-
Notion Integration Token
export NOTION_INTEGRATION_TOKEN=xxx
Please do not forget to share the target database/page with your integration
Installation
pip install autonote
Usage Example (Notion: Create a page from a template.)
-
Create a template page.
-
Prepare Python script.
from autonote.notion import NotionClient
client = NotionClient()
kwargs = {
"Date": {"start": "2023-02-04", "end": "2023-02-10"},
"replace_rules": [
{
"block_types": ["heading_1"],
"replace_str": "YYYY/MM/DD",
"replace_type": "datetime",
"date_format": "%Y/%m/%d",
"start_date": "2023/02/04",
"increment": True,
},
],
}
client.create_page_from_template(
template_id="a7cc4f73460c4b9fa82be8d4ed74d8ca",
title="weekly note",
override=True,
**kwargs
)
-
Run the script.
pip install autonote
python main.py
Generated page:
For more examples, please check examples.
Credits
autonote
was created with cookiecutter
and the py-pkgs-cookiecutter
template.
License
autonote
was created by Masato Naka. It is licensed under the terms of the MIT license.
References
- Atlassian Python API Confluence module
- notion-client
- Notion API