Class: Mutool
- Inherits:
-
Object
- Object
- Mutool
- Defined in:
- lib/mutool.rb,
lib/mutool/version.rb
Constant Summary collapse
- VERSION =
'0.1.1'.freeze
Class Method Summary collapse
- .clean(input, output, pages = '1-N', ops) ⇒ Object
-
.convert(input, pages = '1-N', ops) ⇒ Object
Reference: mupdf.com/docs/manual-mutool-convert.html.
- .flags(ops = {}) ⇒ Object
Class Method Details
.clean(input, output, pages = '1-N', ops) ⇒ Object
15 16 17 |
# File 'lib/mutool.rb', line 15 def clean(input, output, pages='1-N', ops) run(['mutool', 'clean', flags(ops), input, output, pages].flatten) end |
.convert(input, pages = '1-N', ops) ⇒ Object
Reference: mupdf.com/docs/manual-mutool-convert.html
10 11 12 |
# File 'lib/mutool.rb', line 10 def convert(input, pages='1-N', ops) run(['mutool', 'convert', flags(ops), input, pages].flatten) end |
.flags(ops = {}) ⇒ Object
5 6 7 |
# File 'lib/mutool.rb', line 5 def flags(ops = {}) ops.map { |key, value| ["-#{key}", value] } end |