Module: Softcover

Extended by:
Softcover
Includes:
Utils
Included in:
Softcover
Defined in:
lib/softcover.rb,
lib/softcover/cli.rb,
lib/softcover/client.rb,
lib/softcover/config.rb,
lib/softcover/builder.rb,
lib/softcover/formats.rb,
lib/softcover/mathjax.rb,
lib/softcover/version.rb,
lib/softcover/uploader.rb,
lib/softcover/sanitizer.rb,
lib/softcover/builders/pdf.rb,
lib/softcover/builders/epub.rb,
lib/softcover/builders/html.rb,
lib/softcover/builders/mobi.rb,
lib/softcover/commands/auth.rb,
lib/softcover/rails/railtie.rb,
lib/softcover/commands/build.rb,
lib/softcover/commands/opener.rb,
lib/softcover/builders/preview.rb,
lib/softcover/commands/generator.rb,
lib/softcover/commands/deployment.rb,
lib/softcover/commands/epub_validator.rb

Defined Under Namespace

Modules: Builders, Commands, Mathjax, Output, Sanitizer, Utils Classes: App, BaseConfig, Book, BookConfig, BookManifest, Builder, CLI, Client, Config, Railtie, Uploader

Constant Summary collapse

FORMATS =
%w{html epub mobi pdf}
BUILD_ALL_FORMATS =

mobi calls epub, which calls html, so “all formats” is just mobi & pdf.

%w{mobi pdf}
VERSION =
"0.6.4"

Constants included from Utils

Utils::UNITS

Instance Method Summary collapse

Methods included from Utils

#add_highlight_class!, #as_size, #current_book, #digest, #executable, #execute, #in_book_directory?, #logged_in?, #mkdir, #path, #reset_current_book!, #rm, #silence, #source, #tmpify, #write_pygments_file

Instance Method Details

#custom_stylesObject

Return the custom styles, if any.



43
44
45
46
# File 'lib/softcover.rb', line 43

def custom_styles
  custom_file = 'custom.sty'
  File.exist?(custom_file) ? File.read(custom_file) : ''
end

#profiling?Boolean

Returns:

  • (Boolean)


56
57
58
59
# File 'lib/softcover.rb', line 56

def profiling?
  return false if test?
  false
end

#set_test_mode!Object



48
49
50
# File 'lib/softcover.rb', line 48

def set_test_mode!
  @test_mode = true
end

#test?Boolean

Returns:

  • (Boolean)


52
53
54
# File 'lib/softcover.rb', line 52

def test?
  @test_mode
end