UNPKG

2.92 kBMarkdownView Raw
1# trello-helpers
2
3This integrates with your Trello account using the API to do some more complicated repetitive operations.
4
5<a href="https://nodei.co/npm/trello-helpers/"><img src="https://nodei.co/npm/trello-helpers.png?downloads=true&downloadRank=true&stars=true"></a>
6
7## Installation
8
9Global:
10`npm i -g trello-helpers`
11
12Environmental Variables:
13
14```js
15{
16 trelloKey: process.env.TRELLO_KEY,
17 trelloToken: process.env.TRELLO_TOKEN,
18 trelloBoard: process.env.TRELLO_BOARD,
19 todayList: process.env.TRELLO_LIST || 'Today',
20 trelloLabel: process.env.TRELLO_LABEL || 'Daily'
21}
22```
23
24Your key and token can be gotten from the Trello API, [here](https://trello.com/app-key).
25
26Other necessary value:
27 - `TRELLO_BOARD`: This should be the name for your default Board.
28
29Optional values:
30 - `TRELLO_LIST`: This should be the name for your active To Do list. Default: `Today`.
31 - `TRELLO_LABEL`: This should be the name for your label for recurring items to be copied. Default: `Daily`.
32
33## Methods
34
35#### create
36
37`$ trello-helpers --create 'This is a new card'`
38
39This will create a new card at the top of your target list as specified in your env, with the name of the argument.
40
41Aliases: `c`
42Options:
43 - `-list <target list>`
44 Description: An optional `list` argument will create the card if a list exists with that name.
45 Aliases: `l`
46 Default: `In`
47 - `-position <position>`
48 Description: An optional `position` argument will specify where that card should go in the list.
49 Aliases: `p`
50 Values: `top`, `bottom`, or positive number.
51 Default: `top`
52
53#### duplicates
54
55`$ trello-helpers duplicates`
56
57This will delete duplicate cards in a given list. It will also selectively delete only cards which have a certain label (mine is `daily`).
58
59Aliases: `d`
60Options:
61 - `--list=<target list>`
62 Description: This will delete duplicates in a given list if a list exists with that name.
63 Aliases: `l`
64 Default: `process.env.TRELLO_LIST`
65 - `--label=<label>`
66 Description: This will delete duplicates only with a given label
67 Aliases: null
68 Default: `process.env.TRELLO_LABEL || 'Daily'`
69
70#### lists
71
72`$ trello-helpers lists`
73
74This will console log the names of all lists for the given board.
75
76#### list <list_name>
77
78`$ trello-helpers --list 'To Do'`
79
80This will print the names of all cards for a given list.
81
82Aliases: `l`
83
84#### today
85
86`$ trello-helpers today`
87
88This will copy all of the cards from a list (mine is called 'Daily Processes') to another list with the format `June 16th, 2015`. It then copies all of those cards from that list to a list called `Today`, the goal being that daily processes are added to your to do list for that day, and you have a fresh card to start putting daily accomplishments on.
89
90Aliases: `t`
91
92#### archive
93
94`$ trello-helpers --archive`
95
96This will archive any duplicate empty lists, because who needs those, amiright?
97