# # Mar 30 2010 # by horgh # # Requires Tcl 8.5+ and tcllib # # Wikipedia.org fetcher # # To enable you must .chanset #channel +wiki # # Tests: Whole number (list of possible interpretations) # package require http package require htmlparse namespace eval wiki { variable max_lines 1 variable max_chars 400 variable output_cmd "putserv" variable url "https://en.wikipedia.org/wiki/" bind pub -|- "!w" wiki::search bind pub -|- "!wiki" wiki::search # variable parse_regexp {(.*?

.*?
)??.*?

(.*?)

\n)?.*?

(.*)(()|(

)).*?((
)|(
.*?((may refer to:)|(in one of the following senses:))

} $data]} { # regexp -- {