README.md in pivotal_to_pdf-1.1.0 vs README.md in pivotal_to_pdf-1.2.0

- old
+ new

@@ -14,13 +14,18 @@ ## USAGE First you need to create a .pivotal.yml under your home directory. On windows, have this file in %HOME%.pivotal.yml a sample .pivotal.yml: - token: your-api-token-of-pivotal-tracker - project_id: your-ptroject-id +```yaml +token: your-api-token-of-pivotal-tracker +project_id: your-ptroject-id +formatter: PivotalToPdf::DefaultFormatter +``` +The meaning of the ```formatter``` key will be explained in the next section + After install the gem, you can do: * pivotal_to_pdf current_iteration # print stories for the current iteration into a PDF file * pivotal_to_pdf story STORY_ID # print a single story specifed by ID into a PDF file @@ -58,12 +63,31 @@ Printed a green bounding box for feature, a yellow box for chores and a red box for bugs The gem assumes that you have https access to the pivotal tracker +## Formatters + +From the version 1.2, The gem supports alternative formatter other than the default one. +In the ```.pivotal.yml``` file, if you define a key like + +```yaml + +formatter: PivotalToPdf::MyPrettyHtmlWriter +``` + +The gem will use ```PivotalToPdf::MyPrettyHtmlWriter``` to generate the output. + +The class implementation should have the same interface as the ```DefaultFormatter``` + +- The ```initialize``` should take an array of stories +- The ```write_to``` method write the output + +This feature is associated to the [issue #14](pivotal_to_pdf/issues/14). I basically rewrite the code to implement this myself. + ##Contributors * [Yi Wen](https://github.com/ywen) * Carol Nichols * Kristian Rasmussen * [Alastair Mair](https://github.com/amair) * [John-Mason P. Shackelford](https://github.com/jpshackelford) -* [mogul](https://github.com/mogul) +* [Bret Mogilefsky](https://github.com/mogul)