Sha256: 31fa88cc045bba47f73d62bef41c93619f95430a904f6ce9d919a2c13b6a2cdd

Contents?: true

Size: 831 Bytes

Versions: 4

Compression:

Stored size: 831 Bytes

Contents

#!/usr/bin/env ruby

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

opts = Trollop::options do
  version "rawler 0.0.3 (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 :domain, "domain that you want to test", :type => :string
  opt :username, "HTT Basic Username", :type => :string
  opt :password, "HTT Basic Password", :type => :string
end

# Use dup to unfrozen string
domain = ARGV.shift.dup

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[:username], opts[:password]).validate

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rawler-0.0.9 bin/rawler
rawler-0.0.8 bin/rawler
rawler-0.0.7 bin/rawler
rawler-0.0.6 bin/rawler