package module
Version: v0.2.8 Latest Latest

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

Go to latest
Published: Feb 20, 2018 License: Apache-2.0 Imports: 10 Imported by: 0



Go Report Card codecov wercker status

Tracking your work in Trello from the command-line


Pre-configured Go environment

If you are proficient in developing and building Go applications, you can simply install with the following command:

go get

Make file

An alternative setup is to use the Makefile:

make setup
make trackello
./bin/trackello # For running


There's a decent set of blog posts that I have been working on to explain the rationale:

Future work

  • Display Key identifying summary fields
  • Add color-coding for labels
  • lots more tests
  • create helper to configure the Trello API/Token/Board settings on first run




View Source
const (
	// TrackelloAppKey represents the underlying environment variable for Trello's AppKey
	TrackelloAppKey = "TRACKELLO_TRELLO_APPKEY" // #nosec
	// TrackelloToken represents the underlying environment variables for the Trello Token
	TrackelloToken = "TRACKELLO_TRELLO_TOKEN" // #nosec
	// TrackelloPreferredBoard represents the underlying environment variable for the preferred Board ID to retrieve


This section is empty.


This section is empty.


type Board

type Board struct {
	// contains filtered or unexported fields

Board is a super-type for a Trello board. Board also contains a mutex and map of a List ID to a List.

func NewBoard

func NewBoard(b *trello.Board) *Board

NewBoard will create a new Board type, using a trello.Board as a starting point.

func (*Board) MapActions

func (b *Board) MapActions() error

MapActions queries Trello's API for all of the recent actions performed on a Board, and maps that to the board itself, into a list and card.

func (*Board) PopulateLists

func (b *Board) PopulateLists() error

PopulateLists will Populate the board's lists with cards and missing data.

func (*Board) PrintActions

func (b *Board) PrintActions() string

PrintActions will print the board actions out.

type ByListName

type ByListName []List

ByListName is a sortable type for []List, allowing sorting by the List Name (case-insensitive).

func (ByListName) Len

func (l ByListName) Len() int

Len returns the length of the ByListName slice.

func (ByListName) Less

func (l ByListName) Less(i, j int) bool

Less determines which of the two trackello.List items is before other based on the List Name (lowercased).

func (ByListName) Swap

func (l ByListName) Swap(i, j int)

Swap will swap the positions of two trackello.List items in the ByListName slice.

type ByStatisticsCountRev

type ByStatisticsCountRev []Card

ByStatisticsCountRev is a sortable type for the Card slice, sorting by the number of actions performed in descending order.

func (ByStatisticsCountRev) Len

func (c ByStatisticsCountRev) Len() int

Len returns the length of the underlying []Card slice.

func (ByStatisticsCountRev) Less

func (c ByStatisticsCountRev) Less(i, j int) bool

Less returns whether the [i] position has MORE actions on it's underlying Card than the [j] element.

func (ByStatisticsCountRev) Swap

func (c ByStatisticsCountRev) Swap(i, j int)

Swap swaps the positions of two Card items in the underlying []Card slice.

type Card

type Card struct {
	// contains filtered or unexported fields

Card is both the Trello Card + other stats on the actions in it.

func NewCard

func NewCard(c trello.Card) Card

NewCard will construct a new Card element using a trello.Card as a base type.

func (*Card) AddCalculation

func (c *Card) AddCalculation(a trello.Action) error

AddCalculation will the new action to the Card's statistics.

func (*Card) String

func (c *Card) String() string

type List

type List struct {
	// contains filtered or unexported fields

List is both the Trello List + other stats on the actions in it.

func NewList

func NewList(l *trello.List) *List

NewList constructs a new *List based off of a go-trello *List.

func (*List) MapActions

func (l *List) MapActions() error

MapActions will map all of the Actions that occurred on a List.

func (*List) MapCards

func (l *List) MapCards() error

MapCards maps all of the cards for a list into the map[string]Card based on the cardID.

func (*List) NonZeroActions added in v0.2.8

func (l *List) NonZeroActions() []Card

NonZeroActions returns a list of Card entries that have activity in them.

func (*List) PrintNonZeroActions

func (l *List) PrintNonZeroActions() string

PrintNonZeroActions will print out a list and all of the cards to the command-line that have more than 0 actions associated with them.

type Statistics

type Statistics struct {
	// contains filtered or unexported fields

Statistics provides a way to show statistical information about a list, card or whatnot by aggregating the updates, comments, checklists, and other actions under a specific item.

func (*Statistics) PrintStatistics

func (s *Statistics) PrintStatistics() string

PrintStatistics will print the statistics information out. Example format: [ 3 + 2 ≡ 0 ✓ 1 … ]

func (*Statistics) Total

func (s *Statistics) Total() int

Total will print out the total number of actions that accumulate to make up the statistics information for a Card.

type Trackello

type Trackello struct {
	// contains filtered or unexported fields

Trackello represents the connection to Trello for a specific user.

func NewTrackello

func NewTrackello(token, appKey string) (*Trackello, error)

NewTrackello will create a Trackello type using your preferences application token and appkey.

func (*Trackello) Board

func (t *Trackello) Board(id string) (*trello.Board, error)

Board will return the Trello Board given it's ID string.

func (*Trackello) Boards

func (t *Trackello) Boards() ([]trello.Board, error)

Boards will list all of the boards for the authenticated user (i.e. 'me').


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL