Class: Mutool
- Inherits:
-
Object
- Object
- Mutool
- Defined in:
- lib/mutool.rb,
lib/mutool/version.rb
Constant Summary collapse
- VERSION =
'0.1.0'
Class Method Summary collapse
-
.convert(input, pages = '1-N', ops) ⇒ Object
Reference: mupdf.com/docs/manual-mutool-convert.html.
- .flags(ops) ⇒ Object
Class Method Details
.convert(input, pages = '1-N', ops) ⇒ Object
Reference: mupdf.com/docs/manual-mutool-convert.html
10 11 12 13 |
# File 'lib/mutool.rb', line 10 def convert(input, pages='1-N', ops) system "mutool convert #{flags(ops)} #{input} #{pages}", out: File::NULL, err: File::NULL $? end |
.flags(ops) ⇒ Object
5 6 7 |
# File 'lib/mutool.rb', line 5 def flags(ops) ops.map { |key, value| ["-#{key}", "'#{value}'"].join(' ') }.join(' ') end |