You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Template engines are used often in technology where text needs to be customised by substituting variables with values from a data source. Examples where this may take place:
49
19
- web sites using template engines (for server side scripting)
50
20
- code generation
51
-
- mail merge
21
+
- mail merge
52
22
- notification messages
53
23
54
-
Please review the [License](#License) section below before including the Sempare Template Engine in commercial products.
55
-
56
-
The Sempare Template Engine is a small templating engine for [Delphi](https://www.embarcadero.com/products/delphi) (Object Pascal) that allows for templates to be created easily and efficiently by providing a simple and easy to use API.
24
+
The Sempare Template Engine is a small templating (scripting) engine for [Delphi](https://www.embarcadero.com/products/delphi) (Object Pascal) that allows for templates to be created easily and efficiently by providing a simple and easy to use API.
57
25
58
26
Example usage:
59
27
```
@@ -68,20 +36,20 @@ type
68
36
end;
69
37
begin
70
38
var tpl := Template.Parse(
71
-
'My name is <% name %>.'#13#10 +
72
-
'My favourite sport is <% favourite_sport %>.'#13#10 +
39
+
'My name is <% name %>.'#13#10 +
40
+
'My favourite sport is <% favourite_sport %>.'#13#10 +
73
41
'Counting... <% for i := 1 to count %><% i %><% betweenitems %>, <% end %>' +
74
42
'Counting... <% for i := 1 to count ; print(i) ; betweenitems ; print(', '); onbegin; print('[ '); onend; print('] '); end %>'
75
43
);
76
44
var info : TInformation;
77
45
info.name := 'conrad';
78
46
info.favourite_sport := 'ultimate';
79
47
info.count := 3;
80
-
writeln(Template.Eval(tpl, info));
48
+
writeln(Template.Eval(tpl, info));
81
49
end.
82
50
```
83
51
84
-
The project uses Run-time Type Information (RTTI) to allow for almost any type to be dereferenced within the template script.
52
+
The project allows for almost any type to be dereferenced within the template script.
85
53
86
54
In the example above, you can see that the '<%' start and '%>' end the scripting statement respectively. Within a scripting statement, you can reference variables, assign variables, use conditions, for and while loops, and include other templates.
87
55
@@ -93,6 +61,38 @@ Please 'star' the project on github.
@@ -158,7 +158,6 @@ There should be no platform specific restrictions.
158
158
Have a look at Sempare.Template.Compiler.inc. The following defines can be defined if appropriate:
159
159
160
160
- SEMPARE_TEMPLATE_NO_INDY - if Indy is not present. This is used to access an html encoder if TNetEncoding is not available.
161
-
- SEMPARE_TEMPLATE_CONFIRM_LICENSE - if present, you confirm you understand the conditions.
162
161
163
162
<aname="Installation"><h2>Installation</h3></a>
164
163
@@ -220,16 +219,15 @@ The deployment process is based off the dev branch. Once we decide to push a new
220
219
221
220
<aname="License"><h2>License</h3></a>
222
221
223
-
The Sempare Template Engine is dual-licensed. You may choose to use it under the restrictions of the [GPL v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html) at
222
+
The Sempare Template Engine is dual-licensed. You may choose to use it under the restrictions of the [Apache v2.0](https://www.apache.org/licenses/LICENSE-2.0) at
224
223
no cost to you, or you may license it for use under the [Sempare Limited Commercial License](./docs/commercial.license.md)
225
224
226
-
The dual-licensing scheme allows you to use and test the library with no restrictions, but subject to the terms of the GPL. A nominal fee is requested to support the maintenance of the library if the product is to be used in commercial products. This support fee binds you to the commercial license, removing any of the GPL restrictions, and allowing you to use the library in your products as you will. The Sempare Template Engine may NOT be included or distributed as part of another commercial library or framework without approval / commercial review.
225
+
The dual-licensing scheme allows you to use and test the library under the appropriate license.
227
226
228
227
A commercial licence grants you the right to use Sempare Template Engine in your own applications, royalty free, and without any requirement to disclose your source code nor any modifications to
229
-
Sempare Template Engine or to any other party. A commercial license lasts into perpetuity, and entitles you to all future updates.
228
+
Sempare Template Engine or to any other party. A commercial license helps to ensure the project is maintained with continuous integration, patches, etc.
230
229
231
-
A commercial licence is provided per developer developing applications that uses the Sempare Template Engine. The initial license fee is $70 per developer.
232
-
For support thereafter, at your discretion, a support fee of $30 per developer per year would be appreciated.
230
+
A support fee of $70 per developer is appreciated.
233
231
234
232
The following payment links allow you to quickly subscribe. Please note that the initial license and support links are seperate.
Copy file name to clipboardExpand all lines: Sempare.TemplateEngine.dspec
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
2
"metadata": {
3
3
"id": "Sempare.TemplateEngine",
4
-
"version": "1.7.7",
4
+
"version": "1.8.0",
5
5
"description": "Sempare Template Engine for Delphi allows for flexible text manipulation. It can be used for generating email, html, source code, xml, configuration, etc.\r\n\r\nCommercial non-gpl license available.",
Copy file name to clipboardExpand all lines: boss.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
2
"name": "Sempare Template Engine",
3
3
"description": "Sempare Template Engine for Delphi allows for flexible text manipulation. It can be used for generating email, html, source code, xml, configuration, etc.",
0 commit comments