Sha256: 5ab8480f601104b514659d406d621277337f3885faebfe7340dfd711f775da78
Contents?: true
Size: 1.33 KB
Versions: 4
Compression:
Stored size: 1.33 KB
Contents
#!/usr/bin/env ruby require 'thor' require 'scrapers/manning_books' require 'awesome_print' ################################################################################ # # Scraper for Manning Books I've purchased # # (Note: you need to log into Manning and have acutally purchased e-books. # They will appear on your dashboard.) # ################################################################################ class ManningBooks < Thor desc "download", "Downloads all the editions of all the books on your dashboard" method_option :destination, :aliases => %w{-d --dest}, :desc => "Destination to store the downloads", :default => "." method_option :user, :aliases => %w{-u -U}, :desc => "Manning user. Default is read from $HOME/.netrc" method_option :password, :aliases => %w{-p -pw}, :desc => "Manning password. Default is read from $HOME/.netrc" method_option :delay, :aliases => %w{-t}, :type => :numeric, :desc => "delay time between requests", :default => Scrapers::ManningBooks::DELAY_TIME method_option :dry_run, :aliases => %w[-n], :type => :boolean, :desc => "dry run, do not download and save books", :default => false def download Signal.trap('INT', proc { STDERR.puts "Download Interrupted"; exit(-1)}) results = Scrapers::ManningBooks::Scraper.new(options).scrape ap results end end ManningBooks.start
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
scrapers-3.2.0 | bin/manning_books |
scrapers-3.1.0 | bin/manning_books |
scrapers-3.0.0 | bin/manning_books |
scrapers-2.1.0 | bin/manning_books |