• Introduce new service classes: – FieldMapper: Provides bidirectional mapping between internal task fields and user-configured YAML property names. This ensures backward compatibility while allowing custom field names. – StatusManager: Enables custom task statuses (with colors, labels, and cycling order) by replacing hardcoded “open”, “in-progress”, “done”. It includes helper functions for status cycling and for generating CSS rules. – PriorityManager: Allows custom priority levels defined by users (with weight, label, and color), and provides functions for cycling priorities, comparing priorities for sorting, and generating dynamic CSS. • Update main plugin (main.ts): – Instantiate and initialize the FieldMapper, StatusManager, and PriorityManager using settings. – Inject dynamic CSS for custom statuses and priorities. – Update task updates and file indexer interactions to use the FieldMapper for mapping frontmatter properties. – Refresh UI and cached task info when settings change. • Revise TaskCreationModal: – Change priority and status selection to use custom configurations from PriorityManager and StatusManager rather than fixed options. – Use FieldMapper to map task info into YAML frontmatter when creating a new task. – Update task YAML generation logic to include additional fields (e.g., due date, contexts, recurrence, time estimates) correctly. • Enhance settings UI: – Extend settings (in settings.ts) to include new customization options such as fieldMapping, customStatuses, and customPriorities. – Redesign the settings pane with tabbed navigation (General, Field mapping, Statuses, Priorities, Daily notes, Pomodoro) to allow easier configuration of defaults, field mappings, and custom status/priority settings. – Add warnings for changing field mappings to prevent accidental misconfiguration. • Update types and utilities: – Add FieldMapping, StatusConfig, and PriorityConfig interfaces to types.ts. – Update helper functions (updateTaskProperty and extractTaskInfo in helpers.ts) to use FieldMapper if provided, with fallback to legacy behavior. – Adapt FileIndexer to accept and update the FieldMapper. – Adjust filenameGenerator and TaskListView to work with string-based priority/status values and incorporate custom sorting and cycling logic. • Modify TaskListView: – Replace hardcoded priority and status handling with calls to PriorityManager and StatusManager. – Dynamically generate CSS class names based on custom priorities/statuses. – Update UI event handlers (including cycling of priorities/statuses) to reflect changes via the new managers. – Improve sorting and filtering using custom comparison functions. • Update styles: – Add CSS rules to provide a dynamic top border on task items using the custom priority color on hover. This refactor provides a more flexible and customizable task management system, allowing users to tailor field names, statuses, and priorities to their workflows while maintaining backward compatibility. |
||
|---|---|---|
| .github/workflows | ||
| src | ||
| .editorconfig | ||
| .eslintignore | ||
| .eslintrc | ||
| .gitignore | ||
| .npmrc | ||
| esbuild.config.mjs | ||
| LICENSE | ||
| main.ts | ||
| manifest.json | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| styles.css | ||
| tsconfig.json | ||
| version-bump.mjs | ||
| versions.json | ||
TaskNotes for Obsidian
TaskNotes is a comprehensive task and note management plugin for Obsidian with integrated calendar views and daily notes.
Why TaskNotes?
With the introduction of Obsidian's new Bases core plugin, structured YAML frontmatter has become a more attractive way to manage data in Obsidian. TaskNotes uses YAML metadata extensively to store task properties, daily note information, and time tracking data. This means all your tasks and notes remain as plain Markdown files with structured frontmatter that can be queried and viewed in Bases tables.
TaskNotes focuses on time-based organization and task management, storing all data as YAML properties. While Bases provides database views of your notes, TaskNotes handles the day-to-day workflow of creating tasks, tracking time, managing recurring items, and organizing your daily activities. The structured data TaskNotes creates can then be analyzed and visualized using Bases or other data query tools.
Features
Task Management
- Tasks stored as individual Markdown files with YAML frontmatter
- Flexible filename formats: task title, zettelkasten ID, timestamp, or custom templates with live preview
- Task properties include: title, status, priority, due date, contexts, tags, time estimates, and time tracking data
- Support for recurring tasks (daily, weekly, monthly, yearly) with completion instance tracking
- Built-in time tracking with multiple sessions per task
- Archive functionality using tags to hide completed tasks while preserving history
- Task filtering by status, context, due date, and grouping options
Calendar Integration
- Month view with agenda display showing tasks and notes
- Visual indicators for daily notes and due tasks
- Keyboard navigation and date selection synchronized across all views
- Color coding based on priority, note presence, or daily activities
Daily Notes
- Automatic creation with configurable custom templates
- Template support for Obsidian variables ({{title}}, {{date}}, {{date:format}}, etc.)
- YAML frontmatter tracking: date, tags, important flag
- Click calendar dates to create or navigate to daily notes
Time Management
- Integrated time tracking for tasks with start/stop functionality
- Time entries stored in YAML with timestamps and durations
- Time estimates vs actual time spent comparison
- Multiple tracking sessions per task with descriptions
Pomodoro Timer
- Built-in Pomodoro timer with configurable work/break intervals
- Task selection using Obsidian's native fuzzy search modal
- Persistent task selection across sessions
- Visual timer with progress indication and completion sounds
- Automatic break scheduling with customizable patterns
- Integration with task time tracking
Views and Layouts
- Grid Layout: Side-by-side views with calendar/list on one side, file preview on the other
- Tabs Layout: All views (Calendar, Tasks, Notes) as switchable tabs
- Popout Windows: Desktop support for detaching views into separate windows
- Synchronized date selection across all views
Notes Organization
- Separate notes view for non-task files
- Date-based filtering to show notes created on specific days
- Configurable folder exclusions
- Integration with calendar for date-specific note viewing
Data Structure
All data is stored as YAML frontmatter in Markdown files, making it:
- Compatible with Obsidian's Bases plugin for database views
- Searchable and queryable using Dataview or similar tools
- Portable and future-proof as plain text files
- Version control friendly
Installation
From Obsidian Community Plugins
- Open Obsidian Settings
- Go to Community Plugins and turn off Safe Mode
- Click Browse and search for "TaskNotes"
- Install the plugin and enable it
Manual Installation
- Download the latest release from the GitHub releases page
- Extract the files to your Obsidian vault's plugins folder:
<vault>/.obsidian/plugins/tasknotes/ - Reload Obsidian
- Go to Settings > Community Plugins and enable "TaskNotes"
Usage
Getting Started
- After installation, click the calendar icon in the ribbon to open the TaskNotes dashboard
- Configure the plugin settings in Settings > TaskNotes
- Create your first task or navigate to today's daily note
Task Management and Interaction
TaskNotes provides intuitive controls to interact with your tasks directly from the task list view:
- Change a task's status (Open, In Progress, Done) using the status dropdown
- Adjust task priority (High, Normal, Low) using the priority dropdown
- Set or change due dates using the date picker
- Click on a task's title to open it for detailed editing
Task Archiving
TaskNotes allows you to archive tasks to keep your task list clean while preserving task history:
- To archive a task, click the "Archive" button in the task controls
- Archived tasks are tagged with the "archive" tag in their YAML frontmatter
- Archived tasks are hidden from regular task views and only appear when "Archived" is selected from the status filter
- Archived tasks still appear in the calendar heatmap for historical reference
- To unarchive a task, select "Archived" from the status filter and click the "Unarchive" button on the task
Commands
TaskNotes adds several commands to Obsidian's command palette:
- Open Dashboard/Calendar View: Opens the main TaskNotes dashboard
- Create New Task: Opens a modal to create a new task
- Go to Today's Note: Navigates to or creates today's daily note
- Start Pomodoro Timer: Starts the Pomodoro timer (with task selection if none selected)
Folder Structure
TaskNotes uses the following folder structure by default (configurable in settings):
TaskNotes/Daily/: Daily notes (YYYY-MM-DD.md)TaskNotes/Tasks/: Task filesTaskNotes/Notes/: General notesTaskNotes/Home.md: Home note
YAML Structure Examples
Task File
title: "Complete project documentation"
dateCreated: "2024-01-15T10:30:00"
dateModified: "2024-01-15T14:45:00"
status: "in-progress"
due: "2024-01-20"
tags: ["task", "documentation"]
priority: "high"
contexts: ["work", "writing"]
timeEstimate: 120
timeSpent: 45
timeEntries:
- startTime: "2024-01-15T10:30:00"
endTime: "2024-01-15T11:15:00"
duration: 45
description: "Initial outline"
Daily Note
date: "2024-01-15"
tags: ["daily"]
important: false
Daily Note Template Example
---
title: {{title}} Diary Entry
date: {{title}}
tags: [daily]
week: "[[{{date:gggg-[W]ww}}]]"
---
# {{title}}
## Goals for {{date:dddd}}
-
## Notes
-
## Reflections
-
Recurring Task
title: "Weekly team meeting"
status: "open"
tags: ["task", "meetings"]
recurrence:
frequency: "weekly"
days_of_week: ["mon"]
complete_instances: ["2024-01-08", "2024-01-15"]
Configuration
In the plugin settings, you can configure:
General Settings
- Folder paths for daily notes, tasks, and general notes
- Daily note template file path with Obsidian variable support
- Default task properties (priority, status)
- Task identification tag (default: "task")
- Excluded folders for notes view
Task Filename Settings
- Filename format: Task title, Zettelkasten ID (YYMMDD + base36), timestamp, or custom template
- Custom filename template with variables like {title}, {date}, {priority}, etc.
- Live preview of generated filenames
Pomodoro Settings
- Work duration (default: 25 minutes)
- Short break duration (default: 5 minutes)
- Long break duration (default: 15 minutes)
- Long break interval (default: every 4 pomodoros)
- Auto-start breaks and work sessions
- Sound notifications and volume control
Development
Prerequisites
Setup
- Clone this repository
- Run
npm installto install dependencies - Run
npm run devto start the development build process
Building
npm run dev: Builds the plugin and watches for changesnpm run build: Builds the plugin for production
License
This project is licensed under the MIT License - see the LICENSE file for details.