Calibre utilities in Ruby