Sha256: 59b505877a665d57afd43a7183f6f3e9e05c0b68aba2b91f855c56f4b6947e02

Contents?: true

Size: 916 Bytes

Versions: 2

Compression:

Stored size: 916 Bytes

Contents

#!/usr/bin/env ruby

require 'rawler'
require File.join(File.dirname(__FILE__), '..', '/vendor/lib-trollop.rb')

opts = Trollop::options do
  version "rawler #{Rawler::VERSION} (c) 2011 Oscar Del Ben"
  banner <<-EOS
Rawler is a command line utility for parsing links on a website

Usage:
      rawler http://example.com [options]

where [options] are:
EOS
  
  opt :username, "HTT Basic Username", :type => :string
  opt :password, "HTT Basic Password", :type => :string
  opt :wait, "Seconds to wait between requests, may be fractional e.g. '1.5'", :type => :float, :default => 3.0
  opt :log, "Log results to file rawler_log.txt", :type => :boolean, :default => false
end

domain = ARGV.shift

if domain.nil?
  Trollop::die "Domain name is mandatory. Type --help for help"
else
  Trollop::options do
    opt :domain, "Domain address", :type => :string
  end
end

Rawler::Base.new(domain, $stdout, opts).validate

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rawler-0.1.4 bin/rawler
rawler-0.1.3 bin/rawler