Python based set of functions and cron jobs to integrate and move different tasks from different utilities:
- IMAP Servers to ingest tasks (tested with GMail)
- SMTP Servers to send to email based service endpoints
- Joplin API for storing tasks
- Todoist API for actionable tasks
This project heavily utilized joplin-mail-gateway and much thanks to Manfred Geiler's for his work on it. The bash scripts were converted to python scripts, instead of POP I use IMAP, and I had trouble using Joplin CLI with some notes size and/or formatting trying to pass on command line so I choose to use the Joplin API instead. Otherwise the Joplin piece, including OCR and PDF thumbnailing is taken from joplin-mail-gateway
- Joplin terminal or desktop application with API server turned on
- pdftoppm and pdftotext for PDF thumbnails and text extraction
- tesseract for image OCR
- python 3 for all the python scripts (tested with 3.9)
- python Libraries - PyYAML & requests - install using included requirements.txt file
-
Clone from github
git clone https://github.com/aricooperman/personal-automation-hub.git
-
Create the configuration file
cp config-example.yml config.yml
-
Update configuration values
-
Install dependencies into project space
pip install -r requirements.txt --prefix vendor
-
Run main script
./run_periodic_jobs.py
-
Add scheduled job via cron or systemctl timers
crontab -e
Add the following line (for example to run every 15 minutes):
*/15 * * * * PYTHONPATH=<path to project>/vendor/lib/python3.9/site-packages python <path to project>/run_periodic_jobs.py >> <path to log file> 2>&1
OR
Go to systemd directory and run
./copy_systemd_files.sh
To setup the docker container :
-
prepare the mail-gateway by editing the
config.sh
file as described above -
edit the
joplin-config.json
file with your Joplin sync settings. Template files are availables. Simple remove the.template
extension -
build the container by running
docker build . -t joplin_gateway
-
run the container
docker run -d joplin_gateway