Hi, I'm Frederic.

Web Developer & Entrepreneur
blogging about life and programming in Node.js, Go and React.

GithubTwitterEmailKeybase

Presenting you Pivotal Printer

Pivotal Printer is a simple tool to export your user stories as a nice PDF

Built quickly & still work in progress this simple website will help you print your user stories as neat little cards. The little sinatra app powering it is also open source & available on GitHub. Feel free to submit pull requests.

How does it work?

It’s fuelled by a great singer & has unicorn’s filling your requested pdf’s in the background. Actually, it’s almost like described in that first sentence, as a framework I used sinatra, the app being in one small file (app.rb) all route handling and dispatching occurs there.

For getting your Pivotal Tracker projects & cards I use the pivotal-tracker gem which abstracts any interaction needed with PT’s api in neat ruby classes. A quick rundown of how I used it can be seen in the following snippet:

PivotalTracker::Client.token = "<your api key here>"
@projects = PivotalTracker::Project.all

# Find all stories for the first project's first iteration
@stories = @projects.first.stories.all

# Or you could even filter out stories by different criterias
@feature_stories = @projects.first.stories.all(:story_type => 'feature')

As for actually generating the pdf I based my code on karmi’s great little script (it can be found here). It mainly uses the prawn ruby gem to write on the pdf & align everything on a grid. The code handling this part has been extracted to the pdf.rb file that can be consulted here.

That’s all there is to it. I hope I get more time to improve the filtering features & add more customizations.

Happy hacking!