mirror of
https://github.com/lloeki/tilt-pdf.git
synced 2025-12-06 02:24:42 +01:00
12 lines
279 B
Ruby
Executable file
12 lines
279 B
Ruby
Executable file
#!/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
|