Sha256: 8e91fbed0ed224a19ba272137fb8895ab8c86922efcbe9b0298c0471670e1bd7

Contents?: true

Size: 430 Bytes

Versions: 7

Compression:

Stored size: 430 Bytes

Contents

module Asciibook
  module Builders
    class MobiBuilder < EpubBuilder
      def initialize(book)
        super

        @dest_dir = File.join(@book.dest_dir, 'mobi')
        @theme_dir = File.join(@book.theme_dir, 'mobi')
      end

      def build
        super

        epub_file = File.join(@dest_dir, "#{@book.basename}.epub")
        system 'kindlegen', epub_file

        FileUtils.rm epub_file
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
asciibook-0.0.5 lib/asciibook/builders/mobi_builder.rb
asciibook-0.0.4 lib/asciibook/builders/mobi_builder.rb
asciibook-0.0.3 lib/asciibook/builders/mobi_builder.rb
asciibook-0.0.2 lib/asciibook/builders/mobi_builder.rb
asciibook-0.0.2.beta2 lib/asciibook/builders/mobi_builder.rb
asciibook-0.0.2.beta1 lib/asciibook/builders/mobi_builder.rb
asciibook-0.0.1 lib/asciibook/builders/mobi_builder.rb