Sha256: 3f4bb03d7a3b485c0a98532e14a3de5828aeea54fd23978d0b47cebf8452a8a0

Contents?: true

Size: 720 Bytes

Versions: 3

Compression:

Stored size: 720 Bytes

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]"
end

puts Wmap.banner
print_usage
Log_dir=File.dirname(__FILE__)+'/../logs/'
Wmap.wlog("Execute the command: wdel #{ARGV[0]}","wdel",Log_dir+"wmap.log")

st=Wmap::SiteTracker.instance
abort "Incorrect program argument!" unless ARGV.length==1

# 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

3 entries across 3 versions & 1 rubygems

Version Path
wmap-2.4.6 bin/wdel
wmap-2.4.5 bin/wdel
wmap-2.4.4 bin/wdel