Code: Select all
@@ -269,6 +248,10 @@
if {[regexp {no acronym matches for <strong>} $html]} {
set output(error) "The requested acronym was not found."
}
+ # my hack for showing total matches found -rosc
+ set totalmatches ""
+ regexp {>Your acronym search<br>returned (.*?) meanings} $html match totalmatches
+
# acronyms
while {$results < $incith::acronym::max_results} {
# the regexp grabs the data and stores them into their variables, while
@@ -285,7 +268,17 @@
}
if {[info exists final_output] == 1} {
- set output(acronym) $final_output
+ # my hack to show total matches found -rosc
+ if {$totalmatches != ""} {
+ if {$results < $incith::acronym::max_results} {
+ set maxresults $results
+ } else {
+ set maxresults $incith::acronym::max_results
+ }
+ set output(acronym) "(Showing $maxresults of \002$totalmatches\002 matches): $final_output"
+ } else {
+ set output(acronym) $final_output
+ }
}
# this returns our 'output' array
So with that, I've asked slennox to remove incith:acronym from the Tcl archive, and I will not be publishing anymore versions of it.Cease and desist wrote:Please stop writing and distributing scripts that illegally scrape the
copyrighted content of acronymfinder.com
This violates our terms of use and international copyright law.
Mike Molloy
AcronymFinder.com