/usr/games/sc_spell is in scid 1:4.3.0.cvs20120311-1ubuntu3.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | #!/bin/sh
# sc_spell:
# Clean a Scid database by applying all player, event, site and round
# name corrections, then flagging all duplicate games as deleted.
#
# Usage: sc_spell <scid-database> <spellcheck-file>
# The next line restarts using tcscid: \
exec tcscid "$0" "$@"
set args [llength $argv]
if {$args != 2} {
puts stderr "Usage: sc_spell <scid-database> <spellcheck-file>"
exit 1
}
# Open the spellcheck file:
set spellfile [lindex $argv 1]
if {[catch {sc_name read $spellfile} result]} {
puts stderr "Error reading spellcheck file: $result"
exit 1
}
# Open the database:
set basename [lindex $argv 0]
if {[catch {sc_base open $basename} result]} {
puts stderr "Error opening database \"$basename\": $result"
exit 1
}
if {[sc_base isReadOnly]} {
puts stderr "Error: database \"$basename\" is read-only."
exit 1
}
puts "Spellchecking names..."
foreach nameType {player event site round} {
# Now do each name correction:
if {![catch {sc_name spellcheck $nameType} corrections]} {
if {[catch {sc_name correct $nameType $corrections} result]} {
puts stderr "Error correcting $nameType names"
exit 1
}
puts " $result"
} else {
puts " 0 $nameType names were corrected."
}
}
puts "Checking for duplicate games..."
set result [sc_base duplicates]
puts " Found $result duplicate games."
sc_base close
|