PageTemplate 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/MANIFEST +4 -0
- data/Rakefile +54 -0
- data/config.save +12 -0
- data/doc/classes/BlockCommand.html +229 -0
- data/doc/classes/BlockCommand.src/M000004.html +18 -0
- data/doc/classes/BlockCommand.src/M000005.html +25 -0
- data/doc/classes/BlockCommand.src/M000006.html +18 -0
- data/doc/classes/BlockCommand.src/M000007.html +23 -0
- data/doc/classes/BlockCommand.src/M000008.html +24 -0
- data/doc/classes/Command.html +167 -0
- data/doc/classes/Command.src/M000029.html +19 -0
- data/doc/classes/Command.src/M000030.html +18 -0
- data/doc/classes/IfCommand.html +193 -0
- data/doc/classes/IfCommand.src/M000039.html +19 -0
- data/doc/classes/IfCommand.src/M000040.html +20 -0
- data/doc/classes/IfCommand.src/M000041.html +20 -0
- data/doc/classes/IfElseCommand.html +189 -0
- data/doc/classes/IfElseCommand.src/M000023.html +19 -0
- data/doc/classes/IfElseCommand.src/M000024.html +23 -0
- data/doc/classes/IfElseCommand.src/M000025.html +20 -0
- data/doc/classes/IncludeCommand.html +178 -0
- data/doc/classes/IncludeCommand.src/M000017.html +21 -0
- data/doc/classes/IncludeCommand.src/M000018.html +23 -0
- data/doc/classes/IncludeCommand.src/M000019.html +18 -0
- data/doc/classes/LoopCommand.html +197 -0
- data/doc/classes/LoopCommand.src/M000001.html +19 -0
- data/doc/classes/LoopCommand.src/M000002.html +33 -0
- data/doc/classes/LoopCommand.src/M000003.html +20 -0
- data/doc/classes/LoopElseCommand.html +190 -0
- data/doc/classes/LoopElseCommand.src/M000020.html +19 -0
- data/doc/classes/LoopElseCommand.src/M000021.html +23 -0
- data/doc/classes/LoopElseCommand.src/M000022.html +20 -0
- data/doc/classes/Namespace.html +297 -0
- data/doc/classes/Namespace.src/M000031.html +19 -0
- data/doc/classes/Namespace.src/M000032.html +18 -0
- data/doc/classes/Namespace.src/M000033.html +18 -0
- data/doc/classes/Namespace.src/M000034.html +19 -0
- data/doc/classes/Namespace.src/M000035.html +36 -0
- data/doc/classes/Namespace.src/M000036.html +21 -0
- data/doc/classes/Namespace.src/M000037.html +18 -0
- data/doc/classes/Namespace.src/M000038.html +18 -0
- data/doc/classes/PageTemplate.html +352 -0
- data/doc/classes/PageTemplate.src/M000009.html +46 -0
- data/doc/classes/PageTemplate.src/M000010.html +29 -0
- data/doc/classes/PageTemplate.src/M000011.html +18 -0
- data/doc/classes/PageTemplate.src/M000012.html +18 -0
- data/doc/classes/PageTemplate.src/M000013.html +18 -0
- data/doc/classes/PageTemplate.src/M000014.html +18 -0
- data/doc/classes/PageTemplate.src/M000015.html +18 -0
- data/doc/classes/PageTemplate.src/M000016.html +19 -0
- data/doc/classes/Syntax.html +139 -0
- data/doc/classes/Syntax/CachedParser.html +163 -0
- data/doc/classes/Syntax/CachedParser.src/M000045.html +19 -0
- data/doc/classes/Syntax/CachedParser.src/M000046.html +52 -0
- data/doc/classes/Syntax/Glossary.html +245 -0
- data/doc/classes/Syntax/Glossary.src/M000047.html +20 -0
- data/doc/classes/Syntax/Glossary.src/M000048.html +29 -0
- data/doc/classes/Syntax/Parser.html +261 -0
- data/doc/classes/Syntax/Parser.src/M000049.html +22 -0
- data/doc/classes/Syntax/Parser.src/M000050.html +35 -0
- data/doc/classes/Syntax/Parser.src/M000051.html +18 -0
- data/doc/classes/Syntax/Parser.src/M000052.html +21 -0
- data/doc/classes/Syntax/Parser.src/M000053.html +53 -0
- data/doc/classes/Syntax/Parser.src/M000054.html +107 -0
- data/doc/classes/TextCommand.html +185 -0
- data/doc/classes/TextCommand.src/M000042.html +18 -0
- data/doc/classes/TextCommand.src/M000043.html +18 -0
- data/doc/classes/TextCommand.src/M000044.html +18 -0
- data/doc/classes/ValueCommand.html +186 -0
- data/doc/classes/ValueCommand.src/M000026.html +18 -0
- data/doc/classes/ValueCommand.src/M000027.html +18 -0
- data/doc/classes/ValueCommand.src/M000028.html +20 -0
- data/doc/created.rid +1 -0
- data/doc/files/README_txt.html +224 -0
- data/doc/files/lib/PageTemplate_rb.html +119 -0
- data/doc/fr_class_index.html +41 -0
- data/doc/fr_file_index.html +28 -0
- data/doc/fr_method_index.html +80 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/install.rb +1015 -0
- data/lib/MANIFEST +2 -0
- data/lib/PageTemplate.rb +936 -0
- data/pkg/PageTemplate-1.1.2.gem +0 -0
- data/tdata/complex.txt +116 -0
- data/tdata/i1.txt +1 -0
- data/tdata/i2.txt +7 -0
- data/tdata/ib1.txt +7 -0
- data/tdata/ib2.txt +13 -0
- data/tdata/ie1.txt +4 -0
- data/tdata/ie2.txt +15 -0
- data/tdata/include.1.txt +1 -0
- data/tdata/include.2.txt +1 -0
- data/tdata/include.3.txt +1 -0
- data/tdata/include.4.out.txt +3 -0
- data/tdata/include.4.txt +2 -0
- data/tdata/include.4a.txt +1 -0
- data/tdata/include.4b.txt +2 -0
- data/tdata/include.5.txt +2 -0
- data/tdata/l1.txt +5 -0
- data/tdata/l2.txt +7 -0
- data/tdata/nm.txt +4 -0
- data/tdata/p/_b1.txt +0 -0
- data/tdata/p/b1.txt +4 -0
- data/tdata/p/cb1.txt +4 -0
- data/tdata/t.txt +2 -0
- data/tdata/v1.txt +11 -0
- data/tdata/v2.txt +11 -0
- data/test-install.rb +2 -0
- metadata +137 -4
Binary file
|
data/tdata/complex.txt
ADDED
@@ -0,0 +1,116 @@
|
|
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
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
This is some text. [%if flag %]It's all true![%endif%]
|
data/tdata/i2.txt
ADDED
data/tdata/ib1.txt
ADDED
data/tdata/ib2.txt
ADDED
data/tdata/ie1.txt
ADDED
data/tdata/ie2.txt
ADDED
data/tdata/include.1.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Dude! What's mine say?
|
data/tdata/include.2.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Sweet! What's mine say?
|
data/tdata/include.3.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
[%var x], where's my car?
|
data/tdata/include.4.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
beta
|
data/tdata/include.5.txt
ADDED
data/tdata/l1.txt
ADDED
data/tdata/l2.txt
ADDED
data/tdata/nm.txt
ADDED
data/tdata/p/_b1.txt
ADDED
Binary file
|
data/tdata/p/b1.txt
ADDED
data/tdata/p/cb1.txt
ADDED
data/tdata/t.txt
ADDED
data/tdata/v1.txt
ADDED
data/tdata/v2.txt
ADDED
data/test-install.rb
ADDED
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.8.
|
2
|
+
rubygems_version: 0.8.6
|
3
3
|
specification_version: 1
|
4
4
|
name: PageTemplate
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.1.
|
7
|
-
date: 2005-
|
6
|
+
version: 1.1.2
|
7
|
+
date: 2005-03-06
|
8
8
|
summary: A simple templating system for Web sites.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -12,7 +12,7 @@ email: brian@coolnamehere.com
|
|
12
12
|
homepage: http://coolnamehere.com/products/pagetemplate
|
13
13
|
rubyforge_project:
|
14
14
|
description:
|
15
|
-
autorequire: PageTemplate
|
15
|
+
autorequire: PageTemplate.rb
|
16
16
|
default_executable:
|
17
17
|
bindir: bin
|
18
18
|
has_rdoc: true
|
@@ -28,6 +28,139 @@ authors:
|
|
28
28
|
- Brian Wisti
|
29
29
|
files:
|
30
30
|
- README.txt
|
31
|
+
- MANIFEST
|
32
|
+
- install.rb
|
33
|
+
- lib
|
34
|
+
- doc
|
35
|
+
- config.save
|
36
|
+
- test-install.rb
|
37
|
+
- Rakefile
|
38
|
+
- tdata
|
39
|
+
- TC_PageTemplate.rb
|
40
|
+
- pkg
|
41
|
+
- lib/PageTemplate.rb
|
42
|
+
- lib/MANIFEST
|
43
|
+
- doc/fr_class_index.html
|
44
|
+
- doc/index.html
|
45
|
+
- doc/fr_file_index.html
|
46
|
+
- doc/rdoc-style.css
|
47
|
+
- doc/created.rid
|
48
|
+
- doc/classes
|
49
|
+
- doc/files
|
50
|
+
- doc/fr_method_index.html
|
51
|
+
- doc/classes/LoopCommand.html
|
52
|
+
- doc/classes/LoopCommand.src
|
53
|
+
- doc/classes/Syntax
|
54
|
+
- doc/classes/LoopElseCommand.src
|
55
|
+
- doc/classes/LoopElseCommand.html
|
56
|
+
- doc/classes/IfCommand.src
|
57
|
+
- doc/classes/ValueCommand.src
|
58
|
+
- doc/classes/IfElseCommand.html
|
59
|
+
- doc/classes/ValueCommand.html
|
60
|
+
- doc/classes/IncludeCommand.html
|
61
|
+
- doc/classes/Namespace.html
|
62
|
+
- doc/classes/Command.html
|
63
|
+
- doc/classes/BlockCommand.html
|
64
|
+
- doc/classes/Command.src
|
65
|
+
- doc/classes/PageTemplate.src
|
66
|
+
- doc/classes/BlockCommand.src
|
67
|
+
- doc/classes/TextCommand.html
|
68
|
+
- doc/classes/TextCommand.src
|
69
|
+
- doc/classes/Syntax.html
|
70
|
+
- doc/classes/IfCommand.html
|
71
|
+
- doc/classes/IfElseCommand.src
|
72
|
+
- doc/classes/IncludeCommand.src
|
73
|
+
- doc/classes/Namespace.src
|
74
|
+
- doc/classes/PageTemplate.html
|
75
|
+
- doc/classes/LoopCommand.src/M000002.html
|
76
|
+
- doc/classes/LoopCommand.src/M000003.html
|
77
|
+
- doc/classes/LoopCommand.src/M000001.html
|
78
|
+
- doc/classes/Syntax/CachedParser.src
|
79
|
+
- doc/classes/Syntax/Parser.html
|
80
|
+
- doc/classes/Syntax/Glossary.html
|
81
|
+
- doc/classes/Syntax/CachedParser.html
|
82
|
+
- doc/classes/Syntax/Parser.src
|
83
|
+
- doc/classes/Syntax/Glossary.src
|
84
|
+
- doc/classes/Syntax/CachedParser.src/M000046.html
|
85
|
+
- doc/classes/Syntax/CachedParser.src/M000045.html
|
86
|
+
- doc/classes/Syntax/Parser.src/M000052.html
|
87
|
+
- doc/classes/Syntax/Parser.src/M000054.html
|
88
|
+
- doc/classes/Syntax/Parser.src/M000050.html
|
89
|
+
- doc/classes/Syntax/Parser.src/M000049.html
|
90
|
+
- doc/classes/Syntax/Parser.src/M000053.html
|
91
|
+
- doc/classes/Syntax/Parser.src/M000051.html
|
92
|
+
- doc/classes/Syntax/Glossary.src/M000047.html
|
93
|
+
- doc/classes/Syntax/Glossary.src/M000048.html
|
94
|
+
- doc/classes/LoopElseCommand.src/M000022.html
|
95
|
+
- doc/classes/LoopElseCommand.src/M000021.html
|
96
|
+
- doc/classes/LoopElseCommand.src/M000020.html
|
97
|
+
- doc/classes/IfCommand.src/M000041.html
|
98
|
+
- doc/classes/IfCommand.src/M000039.html
|
99
|
+
- doc/classes/IfCommand.src/M000040.html
|
100
|
+
- doc/classes/ValueCommand.src/M000026.html
|
101
|
+
- doc/classes/ValueCommand.src/M000027.html
|
102
|
+
- doc/classes/ValueCommand.src/M000028.html
|
103
|
+
- doc/classes/Command.src/M000029.html
|
104
|
+
- doc/classes/Command.src/M000030.html
|
105
|
+
- doc/classes/PageTemplate.src/M000013.html
|
106
|
+
- doc/classes/PageTemplate.src/M000014.html
|
107
|
+
- doc/classes/PageTemplate.src/M000010.html
|
108
|
+
- doc/classes/PageTemplate.src/M000015.html
|
109
|
+
- doc/classes/PageTemplate.src/M000012.html
|
110
|
+
- doc/classes/PageTemplate.src/M000016.html
|
111
|
+
- doc/classes/PageTemplate.src/M000009.html
|
112
|
+
- doc/classes/PageTemplate.src/M000011.html
|
113
|
+
- doc/classes/BlockCommand.src/M000007.html
|
114
|
+
- doc/classes/BlockCommand.src/M000005.html
|
115
|
+
- doc/classes/BlockCommand.src/M000006.html
|
116
|
+
- doc/classes/BlockCommand.src/M000004.html
|
117
|
+
- doc/classes/BlockCommand.src/M000008.html
|
118
|
+
- doc/classes/TextCommand.src/M000042.html
|
119
|
+
- doc/classes/TextCommand.src/M000044.html
|
120
|
+
- doc/classes/TextCommand.src/M000043.html
|
121
|
+
- doc/classes/IfElseCommand.src/M000023.html
|
122
|
+
- doc/classes/IfElseCommand.src/M000024.html
|
123
|
+
- doc/classes/IfElseCommand.src/M000025.html
|
124
|
+
- doc/classes/IncludeCommand.src/M000018.html
|
125
|
+
- doc/classes/IncludeCommand.src/M000019.html
|
126
|
+
- doc/classes/IncludeCommand.src/M000017.html
|
127
|
+
- doc/classes/Namespace.src/M000036.html
|
128
|
+
- doc/classes/Namespace.src/M000031.html
|
129
|
+
- doc/classes/Namespace.src/M000035.html
|
130
|
+
- doc/classes/Namespace.src/M000037.html
|
131
|
+
- doc/classes/Namespace.src/M000033.html
|
132
|
+
- doc/classes/Namespace.src/M000034.html
|
133
|
+
- doc/classes/Namespace.src/M000032.html
|
134
|
+
- doc/classes/Namespace.src/M000038.html
|
135
|
+
- doc/files/lib
|
136
|
+
- doc/files/README_txt.html
|
137
|
+
- doc/files/lib/PageTemplate_rb.html
|
138
|
+
- tdata/include.3.txt
|
139
|
+
- tdata/include.2.txt
|
140
|
+
- tdata/ib2.txt
|
141
|
+
- tdata/include.4b.txt
|
142
|
+
- tdata/t.txt
|
143
|
+
- tdata/p
|
144
|
+
- tdata/v2.txt
|
145
|
+
- tdata/l2.txt
|
146
|
+
- tdata/ib1.txt
|
147
|
+
- tdata/v1.txt
|
148
|
+
- tdata/complex.txt
|
149
|
+
- tdata/i2.txt
|
150
|
+
- tdata/include.4.out.txt
|
151
|
+
- tdata/nm.txt
|
152
|
+
- tdata/include.4a.txt
|
153
|
+
- tdata/ie1.txt
|
154
|
+
- tdata/include.4.txt
|
155
|
+
- tdata/l1.txt
|
156
|
+
- tdata/include.5.txt
|
157
|
+
- tdata/i1.txt
|
158
|
+
- tdata/ie2.txt
|
159
|
+
- tdata/include.1.txt
|
160
|
+
- tdata/p/b1.txt
|
161
|
+
- tdata/p/cb1.txt
|
162
|
+
- tdata/p/_b1.txt
|
163
|
+
- pkg/PageTemplate-1.1.2.gem
|
31
164
|
test_files:
|
32
165
|
- TC_PageTemplate.rb
|
33
166
|
rdoc_options: []
|