In order to use haskello
you need to pass API
key and token as environment variables. Key and
token may be obtained from official Trello
website: https://trello.com/app-key.
haskello
expects that TRELLO_KEY
and
TRELLO_TOKEN
are both present in environment at
runtime.
For example:
TRELLO_TOKEN=mySecretToken TRELLO_KEY=mySecretKey haskello
For full list of bindings press ?
from within app.
Haskello implements quasi-vim bindings:
j/k
- move down/uph/l
- enter/exit itemg/G
- move top/bottomJ/K
- drag item down/upo/O
- insert item below/abovei
- edit items
- save changes totrello
serverd
- delete item<C-u>
- jump up<C-d>
- jump down
── src
├── Cursor.hs - Datatype for screen (handles: new items, cursor position, items order etc.)
├── Event.hs - Main dispatcher that handles inputs and acts on state
├── Haskello.hs - Brick definitions, entrypoint to application
├── State - Modules related to application state
│ ├── AppState.hs - Main AppState hadnling (init, operations on `LocalTrello`)
│ ├── Changelist.hs - Tracks changes done to items (new/edited/deleted items)
│ ├── Editor.hs - Text input for new/edited items
│ └── Types.hs - Essential state types
├── Trello - All pieces needed for interaction with Trello API
│ ├── Api.hs - Wrapper around API endpoints
│ ├── Types.hs - Trello types
└── UI.hs - Rendering logic
Main idea is to store server state in LocalTrello
datatype and changes
of state in Changelist
. This way all changes are tracked and separated
from main storage.
Every view presents screen with related items (eg. list of boards or list of cards).
Screen is created on enter from LocalTrello
storage type and Changelist
.
Edited items are populated to Changelist
and screen. Changelist
is also used
as source of truth for server sync.