label

package
v0.0.0-...-5a71971 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Copyright © 2023 NAME HERE <EMAIL ADDRESS>

Index

Constants

This section is empty.

Variables

View Source
var (
	AddKeywordCommand = &command.Command{
		Name:  "add keyword",
		Short: "add comma-separated keywords to label",
		ExpectedArgs: []command.Argument{
			{Name: "Label (new or existing)", AutoComplete: autoCompleteLabel},
			{Name: "Keywords (Comma-separated)"},
		},
		Run: AddLabelKeyword,
	}
)
View Source
var (
	CheckCommand = &command.Command{
		Name:  "check",
		Short: "check label keywords",
		ExpectedArgs: []command.Argument{
			{Name: "Label", AutoComplete: autoCompleteLabel},
		},
		Run: CheckLabel,
	}
)
View Source
var (
	LabelCmd = &command.Command{
		Name:  "label",
		Short: "Manage labels",
		Long: `go-ledger can automatically classify transactions using labels you define.
		You can set a list of keywords for a given label, and transactions with any of those
		keywords will be assigned that label.`,
		SubCommands: []*command.Command{
			ListCommand, CheckCommand, AddKeywordCommand, RemoveKeywordCommand,
		},
	}
)
View Source
var (
	ListCommand = &command.Command{
		Name:  "list",
		Short: "list existing labels",
		Run:   ListLabels,
	}
)
View Source
var (
	RemoveKeywordCommand = &command.Command{
		Name:  "remove keywords",
		Short: "remove comma-separated keywords from label",
		ExpectedArgs: []command.Argument{
			{Name: "Label", AutoComplete: autoCompleteLabel},
			{Name: "Keywords (Comma-separated)"},
			{Name: "Delete Label", Type: command.BoolArg},
		},
		Run: RemoveLabelKeyword,
	}
)

Functions

func AddLabelKeyword

func AddLabelKeyword(args []string) ([]command.Output, error)

func CheckLabel

func CheckLabel(args []string) ([]command.Output, error)

func ListLabels

func ListLabels(args []string) ([]command.Output, error)

func RemoveLabelKeyword

func RemoveLabelKeyword(args []string) ([]command.Output, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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