A tool for adding entries on my Google Calendar from email messages
When running (in ineractive mode, -i True
) with:
uv run manage-agenda add -i True
-
Asks for the selection of some AI
Local/mistral/gemini model )(l/m/g)?
Let us choose, for instance, (g)emini.
-
Asks to choose one of the available models.
...
It has a default selection. Let us suppose that we push [Enter].
-
Then we can select one of the configured email accounts.
Rules: 0) ('gmail', 'set', 'fernand0@elmundoesimperfecto', 'posts') 1) ('gmail', 'set', 'fernand0@elmundoesimperfecto.com', 'drafts') 1) ('gmail', 'set', 'otherOne@elmundoesimperfecto.com', 'posts')
We can select the first one, for example.
-
It will read the messages tagged with
zAgenda
(it can be selected) -
Extracts the content of each message and sends an adequate prompt to the selected AI. It will return a
json
formatted event suitable for Google calendar. -
Asks to choose a Google calendar account.
Rules: 0) ('gcalendar', 'set', 'fernand0@elmundoesimperfecto.com', 'posts') 1) ('gcalendar', 'set', 'otherOne@elmundoesimperfecto.com', 'posts')
Let us suppose that we choose the first one.
-
It will show the subject of the message and it will ask to choose the calendar to enter the event.
Subject: (some subject) 0) Work 1) Leissure 2) Meetings ... 6) Others Selection
-
It will ask if we want to delete the tag.
Delete tag? (Press Enter to continue)
It will repeat the last four steps for each message with the tag.
It relies on:
- Module socialModules for reading in your gmail account and writing in your google calendar (needs configuration).
At this moment it can use several AI modules:
- Gemini via Gemini API Python SDK
- Mistral via Mistral Python Client
- Locally installed AIs with Ollama via Ollama code
All of them need some configuration (provided in their respective sites)
git clone git@github.com:fernand0/manage-agenda.git
It can not be installed via pip (does it make sense in such a raw state?).
This is my first attempt at using click
(using
click-app cookiecutter template
some parts will not work.
The easiest way to run it is to use uv
.
For example, for help, run:
uv run manage-agenda --help
<--- For help, run:
manage-agenda --help
You can also use:
python -m manage_agenda --help
--->
Tests check nothing but the correct structure of the project (using the template).
To contribute to this tool, first checkout the code. Then create a new virtual environment:
cd manage-agenda
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
python -m pytest