Class: Repub::App
- Defined in:
- lib/repub/app.rb,
lib/repub/app/logger.rb,
lib/repub/app/parser.rb,
lib/repub/app/builder.rb,
lib/repub/app/fetcher.rb,
lib/repub/app/options.rb,
lib/repub/app/profile.rb
Defined Under Namespace
Modules: Builder, Fetcher, Logger, Options, Parser, Profile
Constant Summary
Constants included from Logger
Logger::LOGGER_NORMAL, Logger::LOGGER_QUIET, Logger::LOGGER_VERBOSE
Constants included from Profile
Constants included from Fetcher
Constants included from Parser
Instance Attribute Summary
Attributes included from Options
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Options
Methods included from Logger
Methods included from Profile
#dump_profile, #list_profiles, #load_profile, #write_profile
Methods included from Fetcher
Methods included from Parser
Methods included from Builder
Class Method Details
.data_path ⇒ Object
23 24 25 26 27 |
# File 'lib/repub/app.rb', line 23 def self.data_path data_path = File.join(File.('~'), '.repub') FileUtils.mkdir_p(data_path) unless File.exist?(data_path) data_path end |
.name ⇒ Object
19 20 21 |
# File 'lib/repub/app.rb', line 19 def self.name File.basename($0) end |
Instance Method Details
#run(args) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/repub/app.rb', line 29 def run(args) (args) log.level = [:verbosity] log.info "Making ePub from #{[:url]}" builder = build(parse(fetch)) log.info "Saved #{builder.output_path}" Launchy::Browser.run(builder.document_path) if [:browser] rescue RuntimeError => ex log.fatal "** ERROR: #{ex.to_s}" end |