@verb #7214:"findHelpTexts" this none this rxd #7214 @program #7214:"findHelpTexts" this none this ":findHelpTexts(INT mode)" "Mode may be one of:" " 0 -> find all help texts" " 1 -> find all help texts in new XML format" " 2 -> find all help texts not in new XML format" {mode} = args dbs = $help_db:descendents() candidates = {} for db in (dbs) topics = db:topics() for t in (topics) s = db:fetch_topic(t) if (!mode || (typeof(s) == $LIST && length(s) > 1 && (mode == 1 && index(s[1], "")))) candidates = {@candidates, tostr(db, "!", t)} endif $command_utils:suspend_if_needed(0) endfor endfor return candidates "allhashes = $list_utils:sort($list_utils:slice(candidates, 1));" "uniqhashes = $list_utils:compress(allhashes);" "duphashes = $list_utils:compress($set_utils:diff(allhashes, uniqhashes));" "dtpcs = {};" "for dh in (duphashes)" " dups = {};" " a = $list_utils:assoc(dh, candidates);" " while (a != {})" " dups = {@dups, a[2]};" " candidates = $list_utils:setremove_all(candidates, a);" " a = $list_utils:assoc(dh, candidates);" " $command_utils:suspend_if_needed(0);" " endwhile" " dtpcs = {@dtpcs, dups};" "endfor" "return dtpcs;" "Last modified by Dax (#789) on Tue May 3 13:55:57 2005 MDT." .