card_printer 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +76 -8
- data/lib/card_printer/parser/trello_json_export.rb +2 -0
- data/lib/card_printer/six_by_four_renderer.rb +1 -0
- data/lib/card_printer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 441592a76812230e3599bb265cabe324ad6fd00a
|
4
|
+
data.tar.gz: 8495fd2074eaa5de4a32463d5040009352042a78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b42adad680fc28d500ef4421c563221f0ce475e3f61eeeb00b9998c4caf6d1f0319d92f0ba11be7c7b851e0e14cda5e9da7bc688f4e18115fabe229fd7b59efd
|
7
|
+
data.tar.gz: 52dab4ffa4a3c9524f7e028904b4e763f1232bd1812251c72106e7bf61bec53f4ed553df6b99c766f45e8663a4a190732340f89af3e35aad5b240f85783b6629
|
data/README.md
CHANGED
@@ -5,21 +5,89 @@ index cards.
|
|
5
5
|
|
6
6
|
## Installation
|
7
7
|
|
8
|
-
|
8
|
+
The recommended way is to just install the gem, this will also add a
|
9
|
+
`card_printer` command:
|
9
10
|
|
10
|
-
gem
|
11
|
-
|
12
|
-
And then execute:
|
11
|
+
$ gem install card_printer
|
13
12
|
|
14
|
-
|
13
|
+
If you use `rbenv` to manage ruby versions, remember to:
|
15
14
|
|
16
|
-
|
15
|
+
$ rbenv rehash
|
17
16
|
|
18
|
-
|
17
|
+
after installing the gem.
|
19
18
|
|
20
19
|
## Usage
|
21
20
|
|
22
|
-
|
21
|
+
You can use the card printer as a stand-alone binary.
|
22
|
+
|
23
|
+
```
|
24
|
+
$ card_printer
|
25
|
+
```
|
26
|
+
|
27
|
+
Invoked with no arguments you'll see usage instructions.
|
28
|
+
|
29
|
+
```
|
30
|
+
Usage: card_printer [options] <output file.pdf>
|
31
|
+
Options:
|
32
|
+
-p=, parser Choose input parser (one of 'csv', 'json_lines', 'trello_json_export', default: trello_json_export)
|
33
|
+
-r=, renderer Choose layout renderer (one of '6x4', 'a6', 'a5', default: '6x4')
|
34
|
+
-h= display this help message
|
35
|
+
```
|
36
|
+
|
37
|
+
Typical usage would be:
|
38
|
+
|
39
|
+
1. export data from your trello board ([instructions](http://help.trello.com/article/747-exporting-data-from-trello-1)) which saves a file such as `aI48isTv.json`
|
40
|
+
2. Run it using the shell `<` operator to provide the input data:
|
41
|
+
|
42
|
+
```
|
43
|
+
$ card_printer output.pdf < aI48isTv.json
|
44
|
+
```
|
45
|
+
|
46
|
+
3. Done! Open `output.pdf`
|
47
|
+
|
48
|
+
## Input formats
|
49
|
+
|
50
|
+
The `card_printer` accepts three types of data format as input:
|
51
|
+
|
52
|
+
* csv - should have headers matching the expected field names
|
53
|
+
* json_lines - JSON Lines format with one card per line
|
54
|
+
* trello_json_export (default) - direct [export of the whole board in json format](http://help.trello.com/article/747-exporting-data-from-trello-1)
|
55
|
+
|
56
|
+
for the `csv` and `json_lines` formats the stories can have the following fields:
|
57
|
+
* name (required) - main story title
|
58
|
+
* story_type - determines the colour of the border {feature|bug|chore|retro|other}
|
59
|
+
* estimate - number shown in bottom left corner
|
60
|
+
* label - shown in bottom right of card (use for tags or epic names)
|
61
|
+
* id - shown in bottom centre of card
|
62
|
+
|
63
|
+
for the `trello_json_export` format the data will be used in the following way:
|
64
|
+
|
65
|
+
- name - taken from the card title
|
66
|
+
- story type - taken from name of the trello label (using substring match for 'feature/bug/chore' defaults to 'other')
|
67
|
+
- estimate - not extracted at present
|
68
|
+
- label - not extracted at present
|
69
|
+
- id - extracts the [short ID](https://trello.com/c/OvKHeqvC/1003-short-ids-for-cards) of the trello card.
|
70
|
+
|
71
|
+
## About trello short IDs
|
72
|
+
|
73
|
+
This is a new feature in Trello, and doesn't appear to work fully as
|
74
|
+
described. I couldn't find a way to link to or directly open a trello card
|
75
|
+
using its short ID, although searching using the short id within your board
|
76
|
+
does seem to find the card (but also other apparently unrelated things).
|
77
|
+
|
78
|
+
You can also use this bookmarklet to reveal the card short ids on your board:
|
79
|
+
|
80
|
+
```javascript
|
81
|
+
javascript:(function(){$(".card-short-id").removeClass("hide")})())
|
82
|
+
```
|
83
|
+
|
84
|
+
To add it to your browser:
|
85
|
+
|
86
|
+
1. copy the above javascript code (including `javascript:`)
|
87
|
+
2. right click on your browser bookmarks toolbar
|
88
|
+
3. select 'add page' or 'add bookmark'
|
89
|
+
4. enter a name such as 'Show card IDs'
|
90
|
+
5. in the URL field paste the javascript code
|
23
91
|
|
24
92
|
## Contributing
|
25
93
|
|
data/lib/card_printer/version.rb
CHANGED