yalzo

package module
v0.0.0-...-9a69374 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2015 License: MIT Imports: 11 Imported by: 0

README

yalzo

travis ci

コマンドラインベースのシンプルTODO管理

Install

$ go get github.com/mizkei/yalzo/cmd/yal

binary coming soon...

マニュアル

モード切替
操作 キーバインド
終了 C-q
ノーマル ESC or C-[
挿入 C-w
入れ替え C-x
Todoのラベル変更 C-l
ラベル編集 C-v
ノーマルモード/ラベル編集時のキーバインド
操作 キーバインド
選択 Space
カーソルを1つ下に移動 j
カーソルを5つ下に移動 J
カーソルを末尾に移動 G
カーソルを1つ上に移動 k
カーソルを5つ上に移動 K
Title変更 C-r
Label変更 C-l
Archive/Todo切り替え Tab
Todo要素の入れ替え (選択 =>) C-a
Todoの削除 選択 => C-d
順番入れ替え C-x => 移動 => Enter

TODO

  • ページング機能の追加

Documentation

Index

Constants

View Source
const (
	LABEL_TEXT_WIDTH = 16
)

Variables

This section is empty.

Functions

func FillSpace

func FillSpace(text string, limit int) string

func ReadCSV

func ReadCSV(r io.Reader) (*TodoList, *TodoList, error)

func SaveCSV

func SaveCSV(todos []Todo, isArchived bool, w io.Writer)

func SaveConf

func SaveConf(w io.Writer, conf Config) error

Types

type Config

type Config struct {
	Labels []string `json:"labels"`
}

func LoadConf

func LoadConf(b []byte) (*Config, error)

type Data

type Data struct {
	InProcess *TodoList
	Archive   *TodoList
	Labels    *LabelList
}

func (*Data) MoveTodo

func (d *Data) MoveTodo(i int, tabFrom Tab)

type Draw

type Draw struct {
	Drawer
	// contains filtered or unexported fields
}

func NewDraw

func NewDraw(fp *os.File, labels []string) *Draw

func (*Draw) DoEnter

func (d *Draw) DoEnter()

func (*Draw) DoKeyCtrlA

func (d *Draw) DoKeyCtrlA()

func (*Draw) DoKeyCtrlL

func (d *Draw) DoKeyCtrlL()

func (*Draw) DoKeyCtrlR

func (d *Draw) DoKeyCtrlR()

func (*Draw) DoKeyCtrlV

func (d *Draw) DoKeyCtrlV()

func (*Draw) DoKeyCtrlW

func (d *Draw) DoKeyCtrlW()

func (*Draw) DoKeyCtrlX

func (d *Draw) DoKeyCtrlX()

func (*Draw) DoKeyEsc

func (d *Draw) DoKeyEsc()

func (*Draw) DoKeyTab

func (d *Draw) DoKeyTab()

func (*Draw) Draw

func (d *Draw) Draw()

func (*Draw) GetLabels

func (d *Draw) GetLabels() []string

func (*Draw) SaveData

func (d *Draw) SaveData()

func (*Draw) SetLister

func (d *Draw) SetLister(tab Tab)

type Drawer

type Drawer interface {
	mode.Operator
	GetCursorIndex() int
	GetSelectedIndex() []int
	SetLister(mode.Lister)
	GetListLength() int
	Mode() mode.Mode
	Reset()
	Draw()
}

type LabelList

type LabelList []string

func (*LabelList) Add

func (l *LabelList) Add(label string) int

func (*LabelList) ChangeLabel

func (l *LabelList) ChangeLabel(i int, name string)

func (*LabelList) Contains

func (l *LabelList) Contains(label string) (int, bool)

func (*LabelList) Exchange

func (l *LabelList) Exchange(i, j int)

func (*LabelList) GetList

func (l *LabelList) GetList(width int) []string

func (*LabelList) GetListLength

func (l *LabelList) GetListLength() int

func (*LabelList) GetPresentName

func (l *LabelList) GetPresentName(i int) string

func (*LabelList) IsInAryRange

func (l *LabelList) IsInAryRange(i int) bool

func (*LabelList) Remove

func (l *LabelList) Remove(i int) interface{}

func (*LabelList) Rename

func (l *LabelList) Rename(i int, name string)

type Tab

type Tab int
const (
	INPROCESS Tab = iota
	ARCHIVE
	LABEL
)

func (Tab) String

func (t Tab) String() string

type Target

type Target struct {
	Index int
	Tab   Tab
}

type Todo

type Todo struct {
	// contains filtered or unexported fields
}

type TodoList

type TodoList []Todo

func (*TodoList) Add

func (tl *TodoList) Add(title string) int

func (*TodoList) ChangeLabel

func (tl *TodoList) ChangeLabel(i int, name string)

func (*TodoList) Exchange

func (tl *TodoList) Exchange(i, j int)

func (*TodoList) GetList

func (tl *TodoList) GetList(width int) []string

func (*TodoList) GetListLength

func (tl *TodoList) GetListLength() int

func (*TodoList) GetPresentName

func (tl *TodoList) GetPresentName(i int) string

func (*TodoList) IsInAryRange

func (tl *TodoList) IsInAryRange(i int) bool

func (*TodoList) Remove

func (tl *TodoList) Remove(i int) interface{}

func (*TodoList) Rename

func (tl *TodoList) Rename(i int, title string)

Directories

Path Synopsis
cmd
yal

Jump to

Keyboard shortcuts

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