Method: Repub::Epub::OCF#zip

Defined in:
lib/repub/epub/ocf.rb

#zip(output_path) ⇒ Object



51
52
53
54
55
56
57
58
# File 'lib/repub/epub/ocf.rb', line 51

def zip(output_path)
  File.open('mimetype', 'w') do |f|
    f << 'application/epub+zip'
  end
  # mimetype has to be first in the archive
  %x(zip -X9 \"#{output_path}\" mimetype)
  %x(zip -Xr9D \"#{output_path}\" * -xi mimetype)
end