tasksmd

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendTask

func AppendTask(lines []string, section string, text string) ([]string, error)

func ReadFile

func ReadFile(path string) ([]string, error)

func ToggleChecked

func ToggleChecked(lines []string, ids []int, checked bool) ([]string, error)

func WriteFile

func WriteFile(path string, lines []string) error

Types

type Item

type Item struct {
	ID      int    `json:"id"`
	Checked bool   `json:"checked"`
	Text    string `json:"text"`
}

type Parsed

type Parsed struct {
	Sections []Section `json:"sections"`
	Total    int       `json:"total"`
	Done     int       `json:"done"`
}

func Parse

func Parse(lines []string) (Parsed, map[int]parsedTaskLine)

type Section

type Section struct {
	Title string `json:"title"`
	Items []Item `json:"items"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL