29 May 2008

Dr Nic Pastiepacker is cool

When I start on a legacy project, I like to print most of the source code so I can scribble some notes. I could read it on screen but I feel sooooooooo much confortable on paper. Of course, to save the environment, I print 2 pages on each sheet of paper ;-)

So far, the printing process was quite manual: I opened a file, printed it, opened another, printed itm etc ...

But, in the wonderful world of geeks hating repetitive manual tasks, someone came with a solution:

In 2 seconds, you "cd" to your project directory and type:

sudo gem install pastiepacker
pastiepacker -s > to_print.txt

and that's it!

I wrote this post to tell the worlf about this cool tool but also to warn you that this won't work on linux because ruby files are not recognised like ascii files, you'll need to replace the /usr/lib/ruby/gems/1.8/gems/pastiepacker-1.0.0/lib/pastiepacker/conversion.rb by the follwing pastie:

I should definitely spend 45 min to patch Dr Nic git repo I know ;-)

No comments: