Sha256: b1a535d44a98b4637aede6222292b2e67f0982be4fd5fccc29e38bab341b6106
Contents?: true
Size: 1.22 KB
Versions: 2
Compression:
Stored size: 1.22 KB
Contents
#!/usr/bin/env ruby require 'domain_check' require 'date' require 'optparse' options = { } opt_parser = OptionParser.new do |opts| opts.banner = "Usage: domain_check [options]" opts.separator "" opts.separator "Specific options:" opts.on("-d", "--domain DOMAIN", "Check the availability of DOMAIN") do |dom| options[:domain] = dom end opts.on("-f", "--file FILE", "Pass in a YAML configuration file at FILE") do |file| options[:file] = file end opts.on("-p", "--prefixes KW1,KW2,...", "Create domain names starting with each keyword and check them") do |prefixes| options[:prefixes] = prefixes.split(/,/) end opts.on("-s", "--suffixes KW1,KW2,...", "Create domain names ending with each keyword and check them") do |suffixes| options[:suffixes] = suffixes.split(/,/) end opts.on("-t", "--tlds TLD1,TLD2,...", "Create domain names with each of the TLDs and check them") do |tlds| options[:tlds] = tlds.split(/,/) end opts.on_tail("-?", "--help", "Show this message") do puts opts exit end end opt_parser.parse!(ARGV) DomainCheck.new(**options).check do |result| formatter = DomainCheck::ConsoleFormatter.new(result) formatter.format end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
domain_check-0.0.2 | bin/domain_check |
domain_check-0.0.1 | bin/domain_check |