Sha256: 7b3ef11ba6dc598254e5edc5e012a657fe256c86a80f9e3c6e5c24a60feae558

Contents?: true

Size: 1.18 KB

Versions: 31

Compression:

Stored size: 1.18 KB

Contents

#!/usr/bin/env ruby
# Executable to delete a new site into the tracking data repository
# This is useful as a self-correction mechanism to flag out unique website in a constant way
require "wmap"

def print_usage
	puts "Program to delete an entry from the local data repository. Usage: wdel <site> [data_dir]"
end

puts Wmap.banner
print_usage
if ARGV.length == 1
	# Log the command entry
	Log_dir = File.dirname(__FILE__) + '/../logs/'
elsif ARGV.length == 2
	# Log to the instance running directory
	Log_dir = File.dirname(__FILE__) + '/../logs/' + ARGV[1]
else
	Log_dir = File.dirname(__FILE__) + '/../logs/'
end
Dir.mkdir(Log_dir) unless Dir.exist?(Log_dir)
Wmap.wlog("Execute the command: wdel #{ARGV[0]}","wdel",Log_dir+"wmap.log")

if ARGV.length == 1
	puts puts "Invoke the SiteTracker."
	st=Wmap::SiteTracker.instance
	st.verbose=false
elsif ARGV.length == 2
	puts puts "Invoke the SiteTracker."
	st=Wmap::SiteTracker.instance
	st.verbose=false
	st.data_dir=ARGV[1]
else
	aborts "Error firing up SiteTracker instance!"
end

# Evaluate the argument and update the data store accordingly
if st.is_site?(ARGV[0])
	st.delete(ARGV[0])
	st.save!
	st=nil
else
	abort "Unknown argument format: #{ARGV[0]}"
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
wmap-2.8.4 bin/wdel
wmap-2.8.3 bin/wdel
wmap-2.8.2 bin/wdel
wmap-2.8.1 bin/wdel
wmap-2.7.9 bin/wdel
wmap-2.7.7 bin/wdel
wmap-2.7.6 bin/wdel
wmap-2.7.2 bin/wdel
wmap-2.7.1 bin/wdel
wmap-2.7.0 bin/wdel
wmap-2.6.9 bin/wdel
wmap-2.6.8 bin/wdel
wmap-2.6.7 bin/wdel
wmap-2.6.6 bin/wdel
wmap-2.6.5 bin/wdel
wmap-2.6.4 bin/wdel
wmap-2.6.3 bin/wdel
wmap-2.6.2 bin/wdel
wmap-2.6.1 bin/wdel
wmap-2.6.0 bin/wdel