Obsidian-tasks
A Python script that synchronizes tasks from an Obsidian vault to a Nextcloud calendar.
Features
- Parses task lists in Markdown files using specific syntax
- Supports due dates, start times, and scheduled times for tasks
- Automatically syncs completed tasks with the calendar
- Handles recurring tasks and priorities
Prerequisites
- Python 3.7+
- Poetry (for dependency management)
- Obsidian vault with task list markdown files
- Nextcloud server with CalDAV support
Setup
Step 1: Clone the repository
git clone https://gitea.dresselhaus.cloud/Drezil/obsidian-tasks.git
cd obsidian-tasks
Step 2: Configure environment variables
Copy env.example to .env and fill in your values:
cp env.example .env
nano .env
Required variables:
OBSIDIAN_VAULT_PATH: Path to your Obsidian vault (default: current directory)NEXTCLOUD_URL: Your Nextcloud CalDAV URLNEXTCLOUD_USER: Your Nextcloud usernameNEXTCLOUD_PASSWORD: Your Nextcloud password or app-password (app-passwords are VERY much preferred!)
Step 3: Install dependencies
poetry install
Step 4: Set up as a cronjob
Add the following line to your crontab (edit with crontab -e):
0 2 * * * cd /path/to/obsidian-tasks && poetry run python ./find_obsidian_tasks.py >> /var/log/obsidian-sync.log 2>&1
This will run the script daily at 2 AM and log output to
/var/log/obsidian-sync.log.
Task Syntax
Tasks are defined in Markdown files using this syntax:
- [x] Completed taskor- [-] Cancelled task- [ ] Pending task- [+/?!] Incomplete task
Optional metadata:
📅 2025-12-31: Due date🛫 2025-12-31: Start time⏳ 2025-12-31: Scheduled time (if different from due date)🔁 weekly: Recurrence pattern‼or❗: Priority indicator
Example:
- [ ] 📝 Write documentation 📅 2025-12-31 ⏳ 2025-12-28 🔁 weekly ‼
License
This project is licensed under the MIT License.
Description
Languages
Python
100%