Class: Repub::App
- Defined in:
- lib/repub/app.rb,
lib/repub/app/filter.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,
lib/repub/app/pre_filters.rb,
lib/repub/app/post_filters.rb
Defined Under Namespace
Modules: Builder, Fetcher, Filter, Logger, Options, Parser, Profile Classes: PostFilters, PreFilters
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
26 27 28 29 30 |
# File 'lib/repub/app.rb', line 26 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
22 23 24 |
# File 'lib/repub/app.rb', line 22 def self.name File.basename($0) end |
Instance Method Details
#run(args) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/repub/app.rb', line 32 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 |