PageTemplate 1.2.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Changes +24 -0
- data/MANIFEST +0 -1
- data/README.txt +10 -8
- data/Rakefile +30 -9
- data/lib/PageTemplate/case.rb +72 -0
- data/lib/PageTemplate/commands.rb +500 -0
- data/lib/PageTemplate/parser.rb +373 -0
- data/lib/PageTemplate.rb +47 -991
- data/setup-usage.txt +129 -0
- data/setup.rb +1360 -0
- data/tdata/dummy.txt +2 -0
- data/test.rb +616 -0
- metadata +13 -169
- data/CVS/Entries +0 -10
- data/CVS/Repository +0 -1
- data/CVS/Root +0 -1
- data/Changes~ +0 -7
- data/InstalledFiles +0 -7
- data/Rakefile~ +0 -54
- data/TC_PageTemplate.rb +0 -974
- data/TC_PageTemplate.rb~ +0 -965
- data/config.save +0 -12
- data/doc/classes/BlockCommand.html +0 -229
- data/doc/classes/BlockCommand.src/M000004.html +0 -18
- data/doc/classes/BlockCommand.src/M000005.html +0 -25
- data/doc/classes/BlockCommand.src/M000006.html +0 -18
- data/doc/classes/BlockCommand.src/M000007.html +0 -23
- data/doc/classes/BlockCommand.src/M000008.html +0 -24
- data/doc/classes/Command.html +0 -167
- data/doc/classes/Command.src/M000032.html +0 -19
- data/doc/classes/Command.src/M000033.html +0 -18
- data/doc/classes/CommentCommand.html +0 -146
- data/doc/classes/CommentCommand.src/M000009.html +0 -18
- data/doc/classes/IfCommand.html +0 -193
- data/doc/classes/IfCommand.src/M000042.html +0 -19
- data/doc/classes/IfCommand.src/M000043.html +0 -20
- data/doc/classes/IfCommand.src/M000044.html +0 -20
- data/doc/classes/IfElseCommand.html +0 -189
- data/doc/classes/IfElseCommand.src/M000025.html +0 -19
- data/doc/classes/IfElseCommand.src/M000026.html +0 -23
- data/doc/classes/IfElseCommand.src/M000027.html +0 -20
- data/doc/classes/IncludeCommand.html +0 -171
- data/doc/classes/IncludeCommand.src/M000019.html +0 -26
- data/doc/classes/IncludeCommand.src/M000020.html +0 -28
- data/doc/classes/IncludeCommand.src/M000021.html +0 -18
- data/doc/classes/IncludeCommandError.html +0 -118
- data/doc/classes/LoopCommand.html +0 -197
- data/doc/classes/LoopCommand.src/M000001.html +0 -19
- data/doc/classes/LoopCommand.src/M000002.html +0 -42
- data/doc/classes/LoopCommand.src/M000003.html +0 -20
- data/doc/classes/LoopElseCommand.html +0 -190
- data/doc/classes/LoopElseCommand.src/M000022.html +0 -19
- data/doc/classes/LoopElseCommand.src/M000023.html +0 -23
- data/doc/classes/LoopElseCommand.src/M000024.html +0 -20
- data/doc/classes/Namespace.html +0 -297
- data/doc/classes/Namespace.src/M000034.html +0 -19
- data/doc/classes/Namespace.src/M000035.html +0 -18
- data/doc/classes/Namespace.src/M000036.html +0 -18
- data/doc/classes/Namespace.src/M000037.html +0 -19
- data/doc/classes/Namespace.src/M000038.html +0 -36
- data/doc/classes/Namespace.src/M000039.html +0 -21
- data/doc/classes/Namespace.src/M000040.html +0 -18
- data/doc/classes/Namespace.src/M000041.html +0 -18
- data/doc/classes/PageTemplate.html +0 -380
- data/doc/classes/PageTemplate.src/M000010.html +0 -49
- data/doc/classes/PageTemplate.src/M000011.html +0 -18
- data/doc/classes/PageTemplate.src/M000012.html +0 -29
- data/doc/classes/PageTemplate.src/M000013.html +0 -18
- data/doc/classes/PageTemplate.src/M000014.html +0 -18
- data/doc/classes/PageTemplate.src/M000015.html +0 -18
- data/doc/classes/PageTemplate.src/M000016.html +0 -18
- data/doc/classes/PageTemplate.src/M000017.html +0 -18
- data/doc/classes/PageTemplate.src/M000018.html +0 -19
- data/doc/classes/Syntax/CachedParser.html +0 -163
- data/doc/classes/Syntax/CachedParser.src/M000048.html +0 -19
- data/doc/classes/Syntax/CachedParser.src/M000049.html +0 -53
- data/doc/classes/Syntax/Glossary.html +0 -251
- data/doc/classes/Syntax/Glossary.src/M000050.html +0 -20
- data/doc/classes/Syntax/Glossary.src/M000051.html +0 -29
- data/doc/classes/Syntax/Parser.html +0 -261
- data/doc/classes/Syntax/Parser.src/M000052.html +0 -22
- data/doc/classes/Syntax/Parser.src/M000053.html +0 -36
- data/doc/classes/Syntax/Parser.src/M000054.html +0 -18
- data/doc/classes/Syntax/Parser.src/M000055.html +0 -21
- data/doc/classes/Syntax/Parser.src/M000056.html +0 -53
- data/doc/classes/Syntax/Parser.src/M000057.html +0 -111
- data/doc/classes/Syntax.html +0 -139
- data/doc/classes/TextCommand.html +0 -185
- data/doc/classes/TextCommand.src/M000045.html +0 -18
- data/doc/classes/TextCommand.src/M000046.html +0 -18
- data/doc/classes/TextCommand.src/M000047.html +0 -18
- data/doc/classes/UnlessCommand.html +0 -151
- data/doc/classes/UnlessCommand.src/M000028.html +0 -20
- data/doc/classes/ValueCommand.html +0 -186
- data/doc/classes/ValueCommand.src/M000029.html +0 -18
- data/doc/classes/ValueCommand.src/M000030.html +0 -18
- data/doc/classes/ValueCommand.src/M000031.html +0 -20
- data/doc/created.rid +0 -1
- data/doc/files/README_txt.html +0 -224
- data/doc/files/lib/PageTemplate_rb.html +0 -119
- data/doc/fr_class_index.html +0 -44
- data/doc/fr_file_index.html +0 -28
- data/doc/fr_method_index.html +0 -83
- data/doc/index.html +0 -24
- data/doc/rdoc-style.css +0 -208
- data/install.rb +0 -1015
- data/lib/CVS/Entries +0 -2
- data/lib/CVS/Repository +0 -1
- data/lib/CVS/Root +0 -1
- data/lib/PageTemplate.rb~ +0 -1004
- data/pkg/PageTemplate-1.2.0.gem +0 -0
- data/tdata/CVS/Entries +0 -28
- data/tdata/CVS/Repository +0 -1
- data/tdata/CVS/Root +0 -1
- data/tdata/cm.txt +0 -3
- data/tdata/complex.txt +0 -116
- data/tdata/i1.txt +0 -1
- data/tdata/i2.txt +0 -7
- data/tdata/ib1.txt +0 -7
- data/tdata/ib2.txt +0 -13
- data/tdata/ie1.txt +0 -4
- data/tdata/ie2.txt +0 -15
- data/tdata/include.1.txt +0 -1
- data/tdata/include.2.txt +0 -1
- data/tdata/include.3.txt +0 -1
- data/tdata/include.4.nf.out.txt +0 -2
- data/tdata/include.4.out.txt +0 -3
- data/tdata/include.4.txt +0 -2
- data/tdata/include.4a.txt +0 -1
- data/tdata/include.4b.txt +0 -2
- data/tdata/include.5.txt +0 -2
- data/tdata/l1.txt +0 -5
- data/tdata/l2.txt +0 -7
- data/tdata/metadata.1.txt +0 -5
- data/tdata/metadata.2.txt +0 -5
- data/tdata/metadata.3.txt +0 -5
- data/tdata/metadata.4.txt +0 -5
- data/tdata/nm.txt +0 -4
- data/tdata/p/CVS/Entries +0 -5
- data/tdata/p/CVS/Repository +0 -1
- data/tdata/p/CVS/Root +0 -1
- data/tdata/p/CVS/b2.txt,t +0 -0
- data/tdata/p/_b1.txt +0 -0
- data/tdata/p/b1.txt +0 -4
- data/tdata/p/b2.txt +0 -4
- data/tdata/p/b2.txt~ +0 -4
- data/tdata/p/cb1.txt +0 -4
- data/tdata/t.txt +0 -2
- data/tdata/v1.txt +0 -11
- data/tdata/v2.txt +0 -11
data/pkg/PageTemplate-1.2.0.gem
DELETED
Binary file
|
data/tdata/CVS/Entries
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
/complex.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
2
|
-
/i1.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
3
|
-
/i2.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
4
|
-
/ib1.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
5
|
-
/ib2.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
6
|
-
/ie1.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
7
|
-
/ie2.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
8
|
-
/include.1.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
9
|
-
/include.2.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
10
|
-
/include.3.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
11
|
-
/include.4.out.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
12
|
-
/include.4.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
13
|
-
/include.4a.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
14
|
-
/include.4b.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
15
|
-
/include.5.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
16
|
-
/l1.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
17
|
-
/l2.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
18
|
-
/nm.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
19
|
-
/t.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
20
|
-
/v1.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
21
|
-
/v2.txt/1.1.1.1/Wed Mar 9 01:30:10 2005//
|
22
|
-
D/p////
|
23
|
-
/metadata.1.txt/1.1/Thu Mar 10 08:38:10 2005//
|
24
|
-
/metadata.2.txt/1.1/Thu Mar 10 09:13:29 2005//
|
25
|
-
/metadata.3.txt/1.1/Thu Mar 10 09:21:33 2005//
|
26
|
-
/metadata.4.txt/1.1/Thu Mar 10 09:35:58 2005//
|
27
|
-
/include.4.nf.out.txt/1.1/Thu Mar 10 07:10:26 2005//
|
28
|
-
/cm.txt/1.1/Wed Mar 9 21:35:36 2005//
|
data/tdata/CVS/Repository
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
PageTemplate/tdata
|
data/tdata/CVS/Root
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
/home/wisti/CVS
|
data/tdata/cm.txt
DELETED
data/tdata/complex.txt
DELETED
@@ -1,116 +0,0 @@
|
|
1
|
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>[%var title %]</title>
|
5
|
-
<META HTTP-EQUIV=Expires CONTENT="Sun, 22 Mar 1998 16:18:35 GMT">
|
6
|
-
<link rel="STYLESHEET" href="/cnh.css" type="text/css" title="cnh.css">
|
7
|
-
[%if reverse %]
|
8
|
-
<style type="text/css">
|
9
|
-
div#content {
|
10
|
-
background-color: black;
|
11
|
-
color: white;
|
12
|
-
}
|
13
|
-
|
14
|
-
div#content table {
|
15
|
-
background-color: black;
|
16
|
-
color: white;
|
17
|
-
}
|
18
|
-
</style>
|
19
|
-
[%endif %]
|
20
|
-
|
21
|
-
</head>
|
22
|
-
<body>
|
23
|
-
<div class="navbar">
|
24
|
-
<a href="/SiteMap.html">Sitemap</a> |
|
25
|
-
<span class="trail"><a href="/">Welcome!</a> > [%var title %]</span>
|
26
|
-
</div>
|
27
|
-
<h1 id="title">[%var title %]</h1>
|
28
|
-
<div id="content">
|
29
|
-
<h2>PageTemplate In Action!</h2>
|
30
|
-
|
31
|
-
<p><em>View the <a href="/test-template.txt">template</a> used for this test</em>.</p>
|
32
|
-
<h3>Variable Substitution</h3>
|
33
|
-
<p>Simple variable substitution seems to work just fine. For example, the name of this
|
34
|
-
page is currently <em>"[%var title %]"</em>. Give this page a new
|
35
|
-
title by using the form below!</p>
|
36
|
-
|
37
|
-
<h3>If Structure</h3>
|
38
|
-
|
39
|
-
<p><tt>if</tt> functionality is working fine. To see it in action, alternate the display of this
|
40
|
-
page's content section using the form below! <em>(after you do, view the source and see the
|
41
|
-
<tt>style</tt> information that was added to the page, and goes away when you select
|
42
|
-
<tt>Normal</tt>.)</em></p>
|
43
|
-
[%if ifTest %]
|
44
|
-
<p><tt>ifTest</tt> is active, so why don't I show you the state of <tt>reverse</tt>?</p>
|
45
|
-
[%if reverse %]
|
46
|
-
<p><tt><strong>reverse</strong></tt> was set.</p>
|
47
|
-
[%else %]
|
48
|
-
<p><tt><strong>reverse</strong></tt> was not set.</p>
|
49
|
-
[%endif %]
|
50
|
-
[%endif %]
|
51
|
-
|
52
|
-
<h3>Loop Structure</h3>
|
53
|
-
|
54
|
-
<p>Loops allow you to repeat formatting for several items. It comes in very handy
|
55
|
-
in many Web situations - shopping carts, BBSes, and other stuff.</p>
|
56
|
-
|
57
|
-
<p>I have "in <em>loop</em>" and "no <em>loop</em>" (in case you want to define
|
58
|
-
special behavior for situations where the loop has not been provided). Nested loops even work.
|
59
|
-
Be careful, though - loop variable names mask outer names while looping!</p>
|
60
|
-
|
61
|
-
<p>Here is a table of my favorite programming languages <em>(today)</em>.</p>
|
62
|
-
|
63
|
-
<table border='1'>
|
64
|
-
<tr>
|
65
|
-
<th>Name</th>
|
66
|
-
<th>Created By</th>
|
67
|
-
<th>Guiding Principle</th>
|
68
|
-
</tr>
|
69
|
-
[%in languages %]
|
70
|
-
<tr>
|
71
|
-
<td>[%var name %]</td>
|
72
|
-
<td>[%var author %]</td>
|
73
|
-
<td>[%if guideline %][%var guideline %][%else %]<em>I dunno</em>[%endif %]</td>
|
74
|
-
</tr>
|
75
|
-
[%no %]
|
76
|
-
<tr>
|
77
|
-
<td colspan='3' align='center'>
|
78
|
-
<p>Guess I don't have any today</p>
|
79
|
-
</td>
|
80
|
-
</tr>
|
81
|
-
[%endin %]
|
82
|
-
</table>
|
83
|
-
|
84
|
-
<p>How about a (very simple) nested loop example before bed?</p>
|
85
|
-
|
86
|
-
<ul>
|
87
|
-
[%in favorites %]
|
88
|
-
<li><strong>[%var topic %]</strong>
|
89
|
-
<ul>[%in items %]
|
90
|
-
<li>"[%var title %]" by [%var creator %]</li>
|
91
|
-
[%no %]<li>Can't think of anything right now...</li>
|
92
|
-
[%endin %]</ul>
|
93
|
-
</li>
|
94
|
-
[%no %]
|
95
|
-
<li>No, not today.</li>
|
96
|
-
[%endin %]
|
97
|
-
</ul>
|
98
|
-
|
99
|
-
<h2>Customize It!</h2>
|
100
|
-
<form>
|
101
|
-
<strong>Title:</strong>
|
102
|
-
<input type="text" name="title" value="[%var title %]">
|
103
|
-
<strong>Page Colors:</strong>
|
104
|
-
<select name="reverse">
|
105
|
-
<option value="0">Normal</option>
|
106
|
-
<option value="1"[%if reverse %] selected[%endif %]>Reverse</option>
|
107
|
-
</select>
|
108
|
-
<input type="submit" value="update">
|
109
|
-
</form>
|
110
|
-
|
111
|
-
</div>
|
112
|
-
<div class="legal">
|
113
|
-
<p>Copyright 2000-2002 <a href="/brian/">Brian Wisti</a></p>
|
114
|
-
</div>
|
115
|
-
</body>
|
116
|
-
</html>
|
data/tdata/i1.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
This is some text. [%if flag %]It's all true![%endif%]
|
data/tdata/i2.txt
DELETED
data/tdata/ib1.txt
DELETED
data/tdata/ib2.txt
DELETED
data/tdata/ie1.txt
DELETED
data/tdata/ie2.txt
DELETED
data/tdata/include.1.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Dude! What's mine say?
|
data/tdata/include.2.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Sweet! What's mine say?
|
data/tdata/include.3.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
[%var x], where's my car?
|
data/tdata/include.4.nf.out.txt
DELETED
data/tdata/include.4.out.txt
DELETED
data/tdata/include.4.txt
DELETED
data/tdata/include.4a.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
beta
|
data/tdata/include.4b.txt
DELETED
data/tdata/include.5.txt
DELETED
data/tdata/l1.txt
DELETED
data/tdata/l2.txt
DELETED
data/tdata/metadata.1.txt
DELETED
data/tdata/metadata.2.txt
DELETED
data/tdata/metadata.3.txt
DELETED
data/tdata/metadata.4.txt
DELETED
data/tdata/nm.txt
DELETED
data/tdata/p/CVS/Entries
DELETED
data/tdata/p/CVS/Repository
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
PageTemplate/tdata/p
|
data/tdata/p/CVS/Root
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
/home/wisti/CVS
|
data/tdata/p/CVS/b2.txt,t
DELETED
File without changes
|
data/tdata/p/_b1.txt
DELETED
Binary file
|
data/tdata/p/b1.txt
DELETED
data/tdata/p/b2.txt
DELETED
data/tdata/p/b2.txt~
DELETED
data/tdata/p/cb1.txt
DELETED
data/tdata/t.txt
DELETED
data/tdata/v1.txt
DELETED