lib/unbreakable.rb in unbreakable-0.0.3 vs lib/unbreakable.rb in unbreakable-0.0.4

- old
+ new

@@ -4,14 +4,14 @@ # retrieving and processing data. The data will be stored in {DataStorage}; # this gem currently provides only a {DataStorage::FileDataStore FileDataStore}. # You may enhance a datastore with {Decorators} and {Observers}: for example, # a {Decorators::Timeout Timeout} decorator to retry on timeout with exponential # backoff and a {Observers::Log Log} observer which logs retrieval progress. -# Of course, you must also define a {Processors::Transform Processor} to turn -# your raw data into machine-readable data. +# Of course, you must also define a {Processors Processor} to turn your raw data +# into machine-readable data. # -# A skeleton scraper: +# A simple skeleton scraper: # # require 'unbreakable' # # class MyScraper < Unbreakable::Scraper # def retrieve(args) @@ -38,10 +38,27 @@ # end # scraper.run(ARGV) # # Every scraper script can run as a command-line script. Try it! # -# ruby myscraper.rb +# $ ruby myscraper.rb +# usage: irb [options] <command> [<args>] +# +# The most commonly used commands are: +# retrieve Cache remote files to the datastore for later processing +# process Process cached files into machine-readable data +# config Print the current configuration +# +# Specific options: +# --root_path ARG default "/var/tmp/unbreakable" +# --[no-]store_meta default true +# --cache_duration ARG default 31536000 +# --fallback_mime_type ARG default "application/octet-stream" +# --secret ARG default "secret yo" +# --[no-]trust_file_extensions default true +# +# General options: +# -h, --help Display this screen module Unbreakable autoload :Scraper, 'unbreakable/scraper' module Processors autoload :Transform, 'unbreakable/processors/transform'