Sha256: 99349f11ca949ec65756d7fa091cdb0704f86a68dd0143cd9481c0cc6200c4da
Contents?: true
Size: 872 Bytes
Versions: 18
Compression:
Stored size: 872 Bytes
Contents
#!/usr/bin/env ruby # Executable to refresh a site within the tracking data repository # This is useful as site information may change over the time ## Usage: refresh [a site|all] require "wmap" def print_usage puts "Program to refresh the website entry in the local data repository. Usage: refresh [a site|all]" end puts Wmap.banner print_usage Log_dir=File.dirname(__FILE__)+'/../logs/' Wmap.wlog("Execute the command: refresh #{ARGV[0]}","refresh",Log_dir+"wmap.log") abort "Incorrect program argument! Proper Usage: refresh [site]" unless ARGV.length==1 #puts "Captured command argument: #{ARGV[0]}" if ARGV[0]=="all" # magic token 'all' to refresh all sites in the store Wmap.refresh_all else abort "Error: incorrect site syntax! It must be in http(s):://xxx.xxx/ format." unless Wmap::SiteTracker.instance.is_site?(ARGV[0]) st=nil Wmap.refresh(ARGV[0]) end
Version data entries
18 entries across 18 versions & 1 rubygems