rudimentary command line generator tool

This commit is contained in:
Loic Nageleisen 2014-02-20 14:37:46 +01:00
parent 1bce8e08ea
commit 5c842de162

12
bin/rpdf Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env ruby
$LOAD_PATH.push File.expand_path(File.join(__FILE__, '../..'))
require 'tilt-pdf'
require 'slim'
rpdf = ARGV.shift or fail('usage: rpdf filename')
pdf = Tilt.new(rpdf).render
File.open(File.basename(rpdf, '.rpdf') + '.pdf', 'wb') do |f|
f.write(pdf)
end