gtd

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package gtd provides the domain model for the GTD (Getting Things Done) methodology by David Allen.

Package gtd (Getting Things Done) offers utilities to manage a Kanban-style TODO list using the Obsidian Kanban plugin.

Package gtd (Getting Things Done) offers utilities to manage and convert task-related actions.

Index

Constants

View Source
const (
	In         = "In" // Incoming task or item
	Eliminated        // Task has been removed or is not actionable
	Incubate          // Task is on hold or under consideration
	Referenced        // Task refers to external resources or references
	InProgress        // Task is currently being worked on
	WaitingFor        // Waiting for an external event or person to progress
	Delegated         // Task has been handed off to someone else
	Deferred          // Task has been postponed for a later time
	Scheduled         // Task has a specific planned start time
)

Action statuses represent the various states an action can be in.

Variables

This section is empty.

Functions

func ActionToMd

func ActionToMd(action *Action, templateFile, outputPath string) error

ActionToMd converts a single Action to a markdown file using the provided template. The markdown file is saved in the specified output directory.

Parameters:

  • action: The action to convert.
  • templateFile: The path to the template file.
  • outputPath: The directory where the markdown file will be saved.

Returns:

  • error: An error if any occurred during the conversion or file operations, otherwise nil.

func ActionsToMd

func ActionsToMd(actions *[]Action, templateFile, outputPath string) error

ActionsToMd converts multiple Actions to markdown files using the provided template. Each Action results in a separate markdown file saved in the specified output directory.

Parameters:

  • actions: The list of actions to convert.
  • templateFile: The path to the template file.
  • outputPath: The directory where the markdown files will be saved.

Returns:

  • error: An error if any occurred during the conversion or file operations, otherwise nil.

func AddDescriptionNote added in v0.0.11

func AddDescriptionNote(action *Action) error

func AddToKanban added in v0.0.11

func AddToKanban(todo string, withLink bool) error

func InsertTodo added in v0.0.8

func InsertTodo(path, heading, todo string, withLink bool) error

InsertTodo inserts a new to-do item under a specified heading in a file. If withLink is true, the to-do item is formatted as a link.

func MapTasks

func MapTasks(tasks []tasks.Task) (*[]Action, error)

MapTasks converts a list of Task objects into a list of Action objects.

Parameters:

  • tasks: The list of tasks to convert.

Returns:

  • *[]Action: A pointer to a slice of converted Action objects.
  • error: An error if any occurred during the mapping, otherwise nil.

Types

type Action

type Action struct {
	ID           uuid.UUID // Unique ID for the action
	ExternalID   string    // External system reference ID, if applicable
	Title        string    // Short summary or title of the action
	Description  string    // Detailed description of the action
	ExternalLink string    // URL or link to external resources related to the action
	CreatedAt    time.Time // Timestamp when the action was created
	UpdatedAt    time.Time // Timestamp when the action was last updated
	DueDate      time.Time // Due date and time for the action
	Status       string    // Current status of the action
	Channel      string    // The medium or platform where the task was captured or will be performed
	Priority     int       // Priority of the action; higher value indicates higher priority

}

Action represents a single step or task. It's the smallest unit of work that can be done in one step.

func CreateAction

func CreateAction(
	externalID, title, description, externalLink, channel string,
	createdAt, updatedAt time.Time,
	status string,
) (*Action, error)

CreateAction initializes a new Action struct with the provided parameters.

func CreateBasicAction added in v0.0.10

func CreateBasicAction(title, description, channel string) (*Action, error)

CreateBasicAction initializes an action with basic fields and sets default values for timestamps and status.

type Project

type Project struct {
}

Project represents a task that requires multiple actions to complete, according to the GTD methodology. Unlike actions, projects typically have a clear objective and end date.

Jump to

Keyboard shortcuts

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