card_printer 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ae51cf4fc64c025bf64e8b930b7f8c0221d7f00
4
- data.tar.gz: 6da9286634464482d7e13e7828ef51d9e0743ae8
3
+ metadata.gz: 441592a76812230e3599bb265cabe324ad6fd00a
4
+ data.tar.gz: 8495fd2074eaa5de4a32463d5040009352042a78
5
5
  SHA512:
6
- metadata.gz: cfa85bcd78b645d00baa81a8f08af260baf27bd4b4153e8508a165b8cb1491726c394828a5e402ddd9ec4881bee56c85fb8bbd34b0029bfc17d64ec4e782272b
7
- data.tar.gz: f9249df5fc9c9db11fc1f41e6bd530b70ee53e1b934124638cdfbb1067265fc4ccd0772fdef9a77a273e084afb8c1827b62d729be965ca0b318a3a2969531d4f
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
- Add this line to your application's Gemfile:
8
+ The recommended way is to just install the gem, this will also add a
9
+ `card_printer` command:
9
10
 
10
- gem 'card_printer'
11
-
12
- And then execute:
11
+ $ gem install card_printer
13
12
 
14
- $ bundle
13
+ If you use `rbenv` to manage ruby versions, remember to:
15
14
 
16
- Or install it yourself as:
15
+ $ rbenv rehash
17
16
 
18
- $ gem install card_printer
17
+ after installing the gem.
19
18
 
20
19
  ## Usage
21
20
 
22
- TODO: Write usage instructions here
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
 
@@ -53,6 +53,8 @@ class CardPrinter::Parser::TrelloJsonExport < CardPrinter::Parser::Base
53
53
  "bug"
54
54
  when /chore/i
55
55
  "chore"
56
+ when /retro/i
57
+ "retro"
56
58
  else
57
59
  "other"
58
60
  end
@@ -177,6 +177,7 @@ class CardPrinter::SixByFourRenderer
177
177
  when "feature" then "85994b"
178
178
  when "bug" then "b10e1e"
179
179
  when "chore" then "b58840"
180
+ when "retro" then "ff78cb"
180
181
  else "000000"
181
182
  end
182
183
  end
@@ -1,3 +1,3 @@
1
1
  module CardPrinter
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card_printer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heath