This is the companion python script for frize. It collects data from your email and stores it in a Supabase database.
Before you begin, ensure you have the following:
SUPABASE_URL and SUPABASE_API_KEY for API access.git clone https://github.com/rittikbasu/rize_reader.git cd rize_readerpython3 -m venv venvpip3 install -r requirements.txtsource venv/bin/activatevenvScriptsactivateexport SUPABASE_URL=YOUR_SUPABASE_URL SUPABASE_API_KEY=YOUR_SUPABASE_API_KEY OPENAI_API_KEY=YOUR_OPENAI_API_KEY RIZE_MAIL_ID=YOUR_RIZE_MAIL_IDRIZE_MAIL_ID.main.py and rename it to credentials.json.python3 main.pyNote: If you've already been using Rize for a while then go to your Gmail account and search for rize and get the total number of emails. Then go to main.py and change the value of max_results to the total number of emails you have. This will ensure that the script collects all your previous data as well. Once the script has finished running you can change the value of max_results back to 1.
You can automate the script to run at regular intervals using a cron job. I personally run it on a cloud server but you can also run it on your local machine. To do this follow the steps below:
crontab -e to open the cron table.which python3 in your terminal and copy it. 00 00 * * * /path/to/venv/bin/python3 /path/to/rize_reader/main.pycredentials.json file in main.py as cron jobs do not have access to the current working directory./path/to/rize_reader with the path to the rize_reader directory and /path/to/venv/bin/python3 with the path to the python3 executable in your virtual environment.Contributions are always welcome! Feel free to open an issue or submit a pull request if you have any ideas or suggestions.