Roxen.git / server / modules / misc / randomtext.pike

version» Context lines:

Roxen.git/server/modules/misc/randomtext.pike:49:   // trailing spaces should be removed, and any internal sequences of   // whitespace should be converted into a single space. The "second-rule"   // rule has the directive "single-shot", meaning it should only select   // randomly once, but then produce the same result every time it is   // called.      #include <module.h>   inherit "module";   inherit "roxenlib";    - string version = "$Id: randomtext.pike,v 1.1 2000/02/01 18:25:55 leif Exp $"; + string version = "$Id: randomtext.pike,v 1.2 2000/02/12 16:09:55 nilsson Exp $";      mapping text_cache = ([ ]);      string recentfile = "(none)", recenterror = "(none)", recentdiag = "(none)";   int recentsteps, recenttagtime;      void create()   { defvar("searchpath", "NONE", "Rules File Search Path", TYPE_DIR,    "This is the location in the real file system where the random "    "text module will look for rule files.");
Roxen.git/server/modules/misc/randomtext.pike:74:    "search path. (Note: may not work yet.)");       defvar("flushcache", 3, "Minutes Between Cache Flushes", TYPE_MULTIPLE_INT,    "This is the number of minutes that should pass between each "    "flushing of the text cache. The default value for this option "    "is 3.",    ({ 0, 1, 2, 3, 5, 10, 15 })    );   }    - array register_module() - { return ({ MODULE_PARSER, -  "Random Text Generator Module", -  ("This module provides a simple way of generating texts on a " + constant module_type = MODULE_PARSER; + constant module_name = "Random Text Generator Module"; + constant module_doc = "This module provides a simple way of generating texts on a "    "semi-random basis according to a set of rules. Apart from its "    "amusement value, this can be useful for testing and educational "    "purposes, such as generating small quiz pages or producing " -  "many different kinds of input to text processing tags."), -  0, -  1 }); - } +  "many different kinds of input to text processing tags.";      string status()   { return    "<b>Most recent tagtime</b>:" + recenttagtime + "<br>" +    "<b>Most recent file</b>:" + recentfile + "<br>" +    "<b>Most recent error</b>:" + recenterror + "<br>" +    "<b>Steps in recent run</b>:" + recentsteps + "<br>" +    "<b>Debug diagnostics</b>:" + recentdiag + "<br>" +    "<b>Text cache for</b>: " + sprintf("%O", indices(text_cache));   }