RCS file: RCS/template.py,v Working file: template.py head: 1.26 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 26; selected revisions: 26 description: ---------------------------- revision 1.26 date: 2000/04/11 23:23:04; author: john; state: Exp; lines: +9 -3 Added a new member, Template.modEpoch, containing the modification timestamp of the template's source file. This will be used in determining whether .html files are out of date. ---------------------------- revision 1.25 date: 2000/04/09 01:39:32; author: john; state: Exp; lines: +117 -24 Added three new format codes, as per request by Dianne Phelan: - "%ifup;": Used to test for presence of a parent page - "%uptitle;": Generates title of parent page - "%upurl;": Generates link to parent page ---------------------------- revision 1.24 date: 2000/03/27 00:53:12; author: john; state: Exp; lines: +2 -2 B2 In the Template.formatScanners dispatch table, the key for "see" should be "seealso". ---------------------------- revision 1.23 date: 2000/03/27 00:50:00; author: john; state: Exp; lines: +2 -2 S1 In Template.__readFormat(): scan.error ( "There is no such format code as `%s%s%s'." % START_FORMAT, gi, END_FORMAT ) should be: scan.error ( "There is no such format code as `%s%s%s'." % ( START_FORMAT, gi, END_FORMAT ) ) ---------------------------- revision 1.22 date: 2000/03/27 00:47:46; author: john; state: Exp; lines: +3 -2 T3 In Template.__readFormat(), the call to LiteralToken() was missing the `openCondStack' and `scan' arguments. ---------------------------- revision 1.21 date: 2000/03/27 00:44:25; author: john; state: Exp; lines: +2 -2 T2 In Template.__readFormat(): gi = scan.tabMany ( string.lower ( FORMAT_NAME_CSET ) ) should be: gi = string.lower ( scan.tabMany ( FORMAT_NAME_CSET ) ) ---------------------------- revision 1.20 date: 2000/03/27 00:41:51; author: john; state: Exp; lines: +2 -2 T1 In Template.__readFile(): while not scan.endFile: should be: while not scan.atEndFile: ---------------------------- revision 1.19 date: 2000/03/27 00:40:05; author: john; state: Exp; lines: +9 -5 Added default template argument to _TmplPool() constructor. ---------------------------- revision 1.18 date: 2000/03/27 00:37:38; author: john; state: Exp; lines: +9 -6 Having TmplPool() read the default template file from the current directory will not work for the planview.py CGI script. The TmplPool() constructor will now accept an optional argument, kept it TmplPool.defTemplate, for the default template name. ---------------------------- revision 1.17 date: 2000/03/27 00:02:52; author: john; state: Exp; lines: +2 -2 Fixed line for FORMAT_NAME_CSET to use cset properly. ---------------------------- revision 1.16 date: 2000/03/27 00:01:22; author: john; state: Exp; lines: +10 -4 (1) Fixed infinite loop in TmplPool() wrapper---call the constructor, not itself! (2) For some unknown reason, IfStack()'s constructor wants an argument. Is this a Python bug? (3) Import log, scan, and cset correctly. ---------------------------- revision 1.15 date: 2000/02/13 23:17:13; author: john; state: Exp; lines: +2 -2 Added another side effect (on Log()) for _TmplPool.__getitem__(). ---------------------------- revision 1.14 date: 2000/02/09 21:55:07; author: john; state: Exp; lines: +4 -10 TToken classes that start %if-conditionals must use ifStack.start() and not ifStack.append(). Caught during trace table verification. ---------------------------- revision 1.13 date: 2000/01/30 00:26:56; author: john; state: Exp; lines: +7 -7 Untabified; should be no other changes ---------------------------- revision 1.12 date: 2000/01/30 00:23:18; author: john; state: Exp; lines: +2 -2 Condition.elseCheck() is a public method, not a private one ---------------------------- revision 1.11 date: 2000/01/30 00:17:43; author: john; state: Exp; lines: +24 -15 Various improvements from trace table work ---------------------------- revision 1.10 date: 2000/01/29 22:08:14; author: john; state: Exp; lines: +2 -2 Minor I/F change ---------------------------- revision 1.9 date: 2000/01/29 22:05:40; author: john; state: Exp; lines: +21 -6 Several changes found during trace table analysis ---------------------------- revision 1.8 date: 1999/11/21 22:45:04; author: john; state: Exp; lines: +2 -1 Fixed error found in trace table verification: - Template() constructor did not set .__tokenList to an empty list. ---------------------------- revision 1.7 date: 1999/11/18 01:19:07; author: john; state: Exp; lines: +8 -4 Two more problems caught in trace table verification: - In the generic intended function for TToken.expand(), allow for the possibility that a conditional expansion token may not be valid in the context of ifStack. - In IfStack.elseCheck(), add the side effect that the top Condition in self is marked as having seen an `%else;' ---------------------------- revision 1.6 date: 1999/11/18 01:04:45; author: john; state: Exp; lines: +17 -1 Added ElseToken.expand(), noticed it missing during trace table verification. ---------------------------- revision 1.5 date: 1999/11/18 00:38:06; author: john; state: Exp; lines: +2 -6 Fixed a bugf in BodyToken.expand(), caught in trace table verification: There is no Body.expand() method. ---------------------------- revision 1.4 date: 1999/11/16 22:41:45; author: john; state: Exp; lines: +217 -6 Added OpenCond, IfStack, and Condition classes. ---------------------------- revision 1.3 date: 1999/11/14 20:18:42; author: john; state: Exp; lines: +8 -0 Trying to check in on a Linux box after checkin failed on Puce. Since 1.1: - Added TToken and derived tokens - Added Template class ---------------------------- revision 1.2 date: 1999/11/14 20:06:05; author: john; state: Exp; lines: +368 -2 Added class Template. Still needs OpenCond, IfStack, and Condition. ---------------------------- revision 1.1 date: 1999/11/13 19:06:47; author: john; state: Exp; Initial revision =============================================================================