#!/usr/bin/env ruby require 'optparse' require File.expand_path(File.dirname(__FILE__) + "/../lib/seo_checker") options = {} opts = OptionParser.new do |opts| opts.banner = "Usage: seo_checker [OPTIONS] website_url" opts.on('-b', '--batch BATCH_SIZE', 'get a batch size of pages') do |batch| options[:batch_size] = batch end opts.on('-i', '--interval INTERVAL_TIME', 'interval time between two batches') do |interval| options[:interval_time] = interval end opts.on('--debug') do options[:logger] = true end opts.on_tail('-h', '--help', 'Show this message') do puts opts exit end opts.parse! end if ARGV.empty? puts opts.help exit end checker = SEOChecker.new(ARGV[0], options) checker.check