todoparse

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package todoparse extracts markdown checklist items from text content. It recognizes `- [ ]`, `- [x]`, and `- [X]` syntax. Under acceptance/success/OKR headings, checklists are classified as criteria; otherwise they are actionable todos.

Index

Constants

View Source
const (
	KindAcceptance = "acceptance"
	KindSuccess    = "success"
	KindOKR        = "okr"
)

CriteriaKind values stored for checklist lines under matching headings.

Variables

This section is empty.

Functions

This section is empty.

Types

type Criterion

type Criterion struct {
	Ordinal      int
	Text         string
	Done         bool
	SourceFile   string
	SourceLine   int    // 1-indexed
	CriteriaKind string // KindAcceptance, KindSuccess, or KindOKR
}

Criterion represents a checklist line under an acceptance/success/OKR heading.

type ParseResult

type ParseResult struct {
	Todos    []Todo
	Criteria []Criterion
}

ParseResult holds todos and criteria extracted from one markdown document.

func Parse

func Parse(content, sourceFile string) ParseResult

Parse extracts actionable todos and section-classified criteria from markdown. sourceFile is stored on each item for provenance tracking.

type Todo

type Todo struct {
	Ordinal    int
	Text       string
	Done       bool
	SourceFile string
	SourceLine int // 1-indexed
}

Todo represents a single extracted actionable checklist item.

Jump to

Keyboard shortcuts

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