August 2012 Archives

My new gem: mediatype_directory

I’ve created a new gem, mediatype_directory. You can check it out on Github or download it from RubyGems.

MediatypeDirectory lets Linux/Mac users create a directory of (soft or hard) links to all files of a specified media type (or types) in a directory tree.

I made it because I store content (text files, PDFs, HTML pages, office suite files, audio files, video files, etc.) mixed together in directory trees organized by subject. For example, the directory ~/Tech/Ruby/TESTING/RSpec may hold videos, HTML files, PDFs, podcasts, etc. all related to RSpec testing in Ruby.

But when I’m programming, I often want to quickly grab a PDF reference document without searching through the directory tree. I want links to PDF files on Jasmine, RSpec, Rails, Ruby, Coffeescript, Underscore, JQuery, Javascript, Backbone, etc. all in one directory.

And when I have free time to watch videos, I’d like to quickly see a list of all available programming video files.

I hope you find it useful.

Posted by James on Aug 30, 2012

New version of my htmls_to_pdf gem

I just released version 0.0.9 of my htmls_to_pdf Ruby gem: Github Rubygems.

Recent changes:

  • config[:debug] option to print out verbose messages during PDF creation process
  • ability to pass raw CSS strings to config[:css]
  • ability to pass array with any mixture of CSS strings and CSS file URLs to config[:css]
  • addition of examples/get_jasmine_wiki.rb
  • ability to set configuration options on HtmlToPdf instance via setters (e.g., “h2p.debug = true”) as well as via configuration hash
  • updates to examples/get_ror_guides.rb, examples/get_coffeescript_cookbook.rb, examples/get_rspec.rb
  • refactored initialization method to make it cleaner
  • New tests
  • README improvements

Posted by James on Aug 24, 2012