b3cc6e19b6
git-svn-id: file:///home/svn/framework3/trunk@10924 4d416f70-5f16-0410-b530-b9f4589650da
24 lines
465 B
Ruby
24 lines
465 B
Ruby
module Anemone
|
|
module CLI
|
|
COMMANDS = %w[count cron pagedepth serialize url-list]
|
|
|
|
def self.run
|
|
command = ARGV.shift
|
|
|
|
if COMMANDS.include? command
|
|
load "anemone/cli/#{command.tr('-', '_')}.rb"
|
|
else
|
|
puts <<-INFO
|
|
Anemone is a web spider framework that can collect
|
|
useful information about pages it visits.
|
|
|
|
Usage:
|
|
anemone <command> [arguments]
|
|
|
|
Commands:
|
|
#{COMMANDS.join(', ')}
|
|
INFO
|
|
end
|
|
end
|
|
end
|
|
end |