Class: Bookmaker::Parser::Mobi

Inherits:
Base
  • Object
show all
Defined in:
lib/bookmaker/parser/mobi.rb

Instance Attribute Summary

Attributes inherited from Base

#root_dir, #source

Instance Method Summary collapse

Methods inherited from Base

#config, #entries, #initialize, #name, parse, #read_content, #render_template, #spawn_command

Constructor Details

This class inherits a constructor from Bookmaker::Parser::Base

Instance Method Details

#epub_fileObject



12
13
14
# File 'lib/bookmaker/parser/mobi.rb', line 12

def epub_file
  root_dir.join("output/#{name}.epub")
end

#parseObject



4
5
6
7
8
9
10
11
# File 'lib/bookmaker/parser/mobi.rb', line 4

def parse
  puts "-- Exporting MOBI"
  spawn_command ["kindlegen", epub_file.to_s,]
  true
rescue Exception
  p $!, $@
  false
end