gtm

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

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

Go to latest
Published: Jan 22, 2016 License: MIT Imports: 7 Imported by: 0

README

GTM (Go/GIT Task Manager)

GTM is a simple task manager writen completely in go. The purpose of this package is to provide a simple method of tracking tasks in a git repositories. All of the task are stored in a local yaml file and will continue to be stored this way, though server support will be added in the future for more flexable usability.

Commands

gtm <command> [command option] [args...]

config Set config for your instance, including user name and server (coming soon)

  • options:
    • set Set a config option, user or server. example: gtm config set user "<your name>"
    • backup Get a backup copy of your config. example: gtm config backup > <your file name>.yml

tasks Run task commands such as list, add, claim, and mark complete

  • options:
    • list, l List all tasks for this project. example: gtm tasks list
    • add, a Add a new task to the list of tasks. example: gtm tasks add "<Task Name>" --description="<Task Description>"
    • claim, c Claim a task as something you are doing, uses your config user value. example gtm tasks claim <project number from list>
    • mark, m Mark a task as complete, must be a task that you have claimed. example gtm tasks mark <project number from list>

help Help, SOS, I need help :(

Installation

Right now there are no distribution copies, install with go! :D go get github.com/ccutch/task-manager

Thank you for checking out this project, feel free to contribute!

MIT License

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalConfig = &Config{FileName: ".tasks.yml"}
View Source
var Tasks = []*Task{}

Functions

func AddTask

func AddTask(t *Task)

func GetConfigYaml

func GetConfigYaml() string

Return a yaml representation of the global config

func LoadLastConfig

func LoadLastConfig()

Load global config

func LoadTasks

func LoadTasks() error

func RemoveTask

func RemoveTask(id string) error

func SaveConfig

func SaveConfig()

Save global config

func SaveTasks

func SaveTasks() error

Types

type Config

type Config struct {
	User     string `yaml:"user"`
	FileName string `yaml:"filename,omitempty"`
}

func (*Config) SetUser

func (c *Config) SetUser(u string)

Set User for global config

type Task

type Task struct {
	// Data about the user
	Id    string `yaml:"id"`
	Owner string `yaml:"owner"`
	// Data about the task
	Title       string `yaml:"title"`
	Description string `yaml:"description"`
	// Meta data about the task
	Tags     []string `yaml:"tags"`
	Complete bool     `yaml:"complete"`
	Saved    bool     `yaml:"-"`
}

func NewTask

func NewTask(title, description string) (*Task, error)

Create a new task

func (*Task) ClaimTask

func (t *Task) ClaimTask() error

Claim task as your task, TODO: check for conflicts

func (*Task) MarkComplete

func (t *Task) MarkComplete() error

Mark task as complete, this can only be done if the tasks Owner field to the global config user field

func (*Task) String

func (t *Task) String() string

Directories

Path Synopsis
cmd
gtm

Jump to

Keyboard shortcuts

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