README.md in lionel_richie-0.1.5.1 vs README.md in lionel_richie-0.2.0

- old
+ new

@@ -1,12 +1,14 @@ # LionelRichie -LionelRichie is a script for exporting Trello data to Google Docs. +[![Code Climate](https://codeclimate.com/github/rossta/lionel_richie.png)](https://codeclimate.com/github/rossta/lionel_richie) +LionelRichie is a script for exporting Trello data to Google Docs. + This gem is in its very early stages so its probably not useful to you yet. -![lionel](https://www.evernote.com/shard/s111/sh/86ca745b-4e7e-4b06-9fd2-32112436c72b/19b422ac7bab8162f9268be34be85b2d/res/03b54478-c928-4732-8d6a-4b56bcc205dc/lionel-richie-trello.jpg?resizeSmall&width=832) +![Trello? Is it me you're looking for?](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRmSbZ56riC_raK-rR4HiV4YKjvXTTUQy4_GCpPAYqdSkCz3RhO) ## Installation Add this line to your application's Gemfile: @@ -40,61 +42,64 @@ You'll then be directed to authorize the application and retrieve your google token. You should now be ready to run the export: - $ lionel export # uploads to your google doc - $ lionel export --print # prints the output without uploading + $ lionel export # uploads to your google doc + $ lionel export --print # prints the output without uploading + $ lionel export -c ./path/to/Lionelfile # uploads export configured by given Lionelfile When running this command for the first time, you'll be asked to enter your trello board id and google doc id, which you can grab from the respective URLs of those resources. Run `lionel` to see a list of the available commands and options. -## Crafting the Export (Doesn't exist yet) +## Crafting the Export -```ruby +The export can be configured using the export DSL. Export methods take the form of a Google doc column, e.g. 'A', 'BC', etc. To set the value on a column, pass a value or a block. The block is rendered in the context of each `Card` object populated with data from Trello. +```ruby +# Lionelfile LionelRichie.export do # Card Id - b { id } + B { id } # Card Link - c { link } + C { link } # Ready date - d do - ready_action = card.first_action do |a| - (a.create? && a.board_id == trello_board_id) || a.moved_to?("Ready") + D do |export| + ready_action = first_action do |a| + (a.create? && a.board_id == export.trello_board_id) || a.moved_to?("Ready") end format_date(ready_action.date) if ready_action end # In Progress date - e { date_moved_to("In Progress") } + E { date_moved_to("In Progress") } # Code Review date - f { date_moved_to("Code Review") } + F { date_moved_to("Code Review") } # Review date - g { date_moved_to("Review") } + G { date_moved_to("Review") } # Deploy date - h { date_moved_to("Deploy") } + H { date_moved_to("Deploy") } # Completed date - i { date_moved_to("Completed") } + I { date_moved_to("Completed") } # Type - j { type } + J { type } # Project - k { project } + K { project } # Estimate - l { estimate } + L { estimate } # Due Date - m { due_date } + M { due_date } end ``` ## Contributing