Create daily reports automatically from your Notion task page. Project aimed to reduce the workload when making the daily work report.
This project achieves the same goal as DailyReportCreator, but this one is made using Rust and the Rust Notion API client made by jakeswenson.
Disclaimer: If you are a rustacean, feel free to insult me for the poor quality of the code.
Having the following Notion Scrum-like ToDo page
This project creates the following report:
You can download the binaries in the Releases section or install it manually following the Installation section.
Once you have downloaded the binaries, you have to fill the .env file with your Notion settings (Setup section) and modify the config.json file in order to change the output format if wanted.
Once these things are done, and with the right permissions, run the binary as follows:
./notion-rustport
-c or --copy_to_clipboard : Copy the resulting report to the clipboard.
--config_path : Specify the config.json file location.
-h or --help : Display the available options.
Clone the repo:
git clone https://github.com/ErlantzCalvo/notion-rustport
Place in the folder:
cd notion-rustport
Install the dependencies:
cargo run
In order to run the project, you must have a Notion API key. If you don't know how to create the mentioned key, take a look at their well explained documentation.
Once you have the API key, add it to the .env
file located in the project's root folder, replacing the field <API_KEY> by your key. The next step is to get the ID of the page you want to track/be reported. It is also explained in the documentiation but, in short, if you are using Notion in the browser, the page ID is the string located between /?v=...:
https://www.notion.so/myworkspace/a8aec43384f447ed84390e8e42c2e089?v=...
|--------- Database ID ---------|
If you are using the Notion desktop app, you can get the previous link in the top-right part of it, in the share button -> Copy link.
Once you have the ID of the page you want to track, place it in the .env
file, replacing the <Page ID> field.
Note: Remember to give your API key, at least, read acces of the page you want to track as shown in the documentation
The app need to know which is the title for each status os tasks sections. This is, in the picture of the notion page (At the top of this README) it can be seen that the 3 status names are Not started, In progress and Done. This three names must be put in the config.json
file:
"TasksStatus": {
"PendingTasks":"Not started",
"DoingTasks":"In progress",
"FinishedTasks": "Done"
}
It can also be configured the texts that will be displayed in the output in the Texts field:
"Texts": {
"CurrentStatusFinished": "FINISHED",
"CurrentStatusDoing": "IN PROGRESS",
"BeginningOfMessage": "My daily report today is as follows:\n",
"PendingTasksBeginning": "\nPending tasks:\n",
"Farewell": "\nRegards,"
}