This commit is contained in:
2025-10-17 07:25:07 -04:00
commit c4d7391aa5
6 changed files with 380 additions and 0 deletions

39
README.md Normal file
View File

@ -0,0 +1,39 @@
# Todoist Actual Backup
Todoist is a SaaS task manager. Todoist provides backups of current tasks, but does not include completed tasks. Nor does it provide a human-readable backup. This script exports everything to JSON and HTML.
This project provides a command-line tool to export all active and completed tasks from the Todoist API to a JSON file, including attachments and comments, and generates a human-readable HTML backup.
## Features
- Exports all active and completed tasks from all projects (active and archived)
- Downloads attachments and references them in the JSON and HTML output
- Nests tasks under their respective projects, including all available fields
- Includes comments for each task
- Outputs both a JSON file for programmatic access and a styled HTML file for viewing in a browser
## Setup
- Ensure you have Python 3.8 or newer installed. Check with `python --version` on the command line.
- The script uses a `.venv` for dependencies. Run:
```bash
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
```
## Usage
1. Run `source .venv/bin/activate` if needed to enter the virtual enivronment.
2. Set your Todoist API key in the `TODOIST_KEY` environment variable.
3. Run the script with the `export` argument:
```bash
python export_todoist.py export
```
This will create `Todoist-Actual-Backup-YYYY-MM-DD.json` and `Todoist-Actual-Backup-YYYY-MM-DD.html` in the current directory.
4. To see usage instructions, run the script with no arguments or any argument other than `export`.
## Requirements
- Python 3.8+
- [todoist-api-python](https://doist.github.io/todoist-api-python/)
- [Jinja2](https://palletsprojects.com/p/jinja/)
## License
MIT