beryl

package module
v0.0.0-...-cebd25c Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2023 License: MIT Imports: 7 Imported by: 0

README

Beryl Golang API

See https://thesam.zone/blog/beryl-todo/ for the full description.

Current status: Parsing Tasks, subtasks and comments. Needs better outputting

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountTabs

func CountTabs(input string) int

func Identify

func Identify(input string, numIndent int) int

-1 error, 0 task, 1 comment, 2 subtask

func IsTask

func IsTask(input string, numIndent int) bool

func String

func String(tasklist []*Task) (text string)

func Tabs

func Tabs(num int) string

func WriteToFilename

func WriteToFilename(tasklist []*Task, filename string) error

Types

type Task

type Task struct {
	Title     string
	Tags      map[string]string
	Completed bool
	Comment   string
	SubTasks  []*Task
}

func LoadFromFilename

func LoadFromFilename(filename string) ([]*Task, error)

func Parse

func Parse(file *os.File) ([]*Task, error)

func ParseTask

func ParseTask(input string) (*Task, error)

func (Task) String

func (task Task) String() (text string)

Jump to

Keyboard shortcuts

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