Skip to content

powerman/md-tasks-notify

Repository files navigation

md-tasks-notify

License MIT Go version Test Coverage Status Go Report Card Release

Linux | amd64 arm64 armv7 ppc64le s390x riscv64 macOS | amd64 arm64 Windows | amd64 arm64

A command-line tool to send daily notifications for actual tasks found in markdown files.

Table of Contents

Features

  • 📅 Filter tasks by date (today, yesterday, tomorrow, or custom ranges).
  • 📧 Send notifications via email or output to stdout.
  • 📝 Support for Obsidian Tasks emoji format.
  • 🔍 Process multiple markdown files and whole directories.

Installation

From releases

Download the latest binary from the releases page.

Using go install

go install github.com/powerman/md-tasks-notify@latest

Usage

Usage of md-tasks-notify:
  -email string
        Send output to this email address instead of stdout
  -from-day int
        Start day relative to today (-1 for yesterday, 0 for today)
  -to-day int
        End day relative to today (1 for tomorrow)

Basic Usage

Send daily notifications for tasks due today:

md-tasks-notify -email [email protected] path/to/*-tasks.md

Output to stdout (useful for testing or sending to another tool):

md-tasks-notify path/to/tasks_dir/

Advanced Usage

Include past due tasks (yesterday) and future tasks (tomorrow):

md-tasks-notify -from-day -1 -to-day 1 -email [email protected] ~/notes/

Get tasks from yesterday only:

md-tasks-notify -from-day -1 -to-day -1 ~/notes/

Process tasks from stdin (useful to get output without file names):

cat *-tasks.md | md-tasks-notify -email [email protected]

Cron Setup

Add to your crontab to receive daily notifications at 9 AM:

0 9 * * * md-tasks-notify -email [email protected] /path/to/notes/

Supported Task Formats

This tool primarily supports the Tasks Emoji Format used by the Obsidian Tasks plugin.

Task Status Examples

- [ ] Undone task
- [x] Completed task
- [/] In progress task
- [-] Cancelled task

Task with Dates

- [ ] Review documentation 📅 2024-01-15
- [ ] Call client ⏳ 2024-01-15
- [ ] Submit report 🛫 2024-01-10 📅 2024-01-15

Date Emoji

Examples

Example Input

project-tasks.md:

# Project Tasks

- [x] Setup project ✅ 2024-01-10
- [ ] Write documentation 📅 2024-01-15
- [ ] Review code ⏳ 2024-01-15
- [ ] Deploy to staging 📅 2024-01-20
- [-] Old feature ❌ 2024-01-05

personal-tasks.md:

# Personal Tasks

- [ ] Buy groceries 📅 2024-01-15
- [ ] Call dentist ⏳ 2024-01-16

Example Output

When run on 2024-01-15 with default settings:

project-tasks.md:
- [ ] Write documentation 📅 2024-01-15
- [ ] Review code ⏳ 2024-01-15

personal-tasks.md:
- [ ] Buy groceries 📅 2024-01-15

Configuration

To send notifications via email, you need to configure SMTP settings through environment variables:

export SMTP_FROM="First Last <[email protected]>"
export SMTP_HOST=smtp.gmail.com
export SMTP_PORT=587
export [email protected]
export SMTP_PASSWORD=your-app-password

About

A command-line tool to send daily notifications for actual tasks found in markdown files

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  

Languages