Skip to content

Commit 01b9c1b

Browse files
authored
Merge pull request #199 from sempare/dev
v1.8.0
2 parents 2bbdf4c + 85a36f1 commit 01b9c1b

File tree

73 files changed

+2018
-2000
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+2018
-2000
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [darnocian]

.github/workflows/delphi-package.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
run: Sempare.Template.Tester.exe -cm:quiet -exit:continue -b -xmlfile:.\results.xml
3131

3232
- name: publish win32 debug test results
33-
uses: actions/upload-artifact@v2
33+
uses: actions/upload-artifact@v4
3434
with:
3535
name: Win32 Debug Results
3636
path: './Win32/Debug/results.xml'
@@ -53,7 +53,7 @@ jobs:
5353
run: Sempare.Template.Tester.exe -cm:quiet -exit:continue -b -xmlfile:.\results.xml
5454

5555
- name: publish win32 release test results
56-
uses: actions/upload-artifact@v2
56+
uses: actions/upload-artifact@v4
5757
with:
5858
name: Win32 Release Results
5959
path: './Win32/Release/results.xml'
@@ -75,7 +75,7 @@ jobs:
7575
run: Sempare.Template.Tester.exe -cm:quiet -exit:continue -b -xmlfile:.\results.xml
7676

7777
- name: publish win64 debug test results
78-
uses: actions/upload-artifact@v2
78+
uses: actions/upload-artifact@v4
7979
with:
8080
name: Win64 Debug Results
8181
path: './Win64/Debug/results.xml'
@@ -97,7 +97,7 @@ jobs:
9797
run: Sempare.Template.Tester.exe -cm:quiet -exit:continue -b -xmlfile:.\results.xml
9898

9999
- name: publish win64 release test results
100-
uses: actions/upload-artifact@v2
100+
uses: actions/upload-artifact@v4
101101
with:
102102
name: Win64 Release Results
103103
path: './Win64/Release/results.xml'

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "thirdparty/DUnitX"]
2+
path = thirdparty/DUnitX
3+
url = git@github.com:VSoftTechnologies/DUnitX.git

LICENSE

Lines changed: 202 additions & 674 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 45 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,27 @@
11
![delphi compatibility](https://img.shields.io/badge/delphi%20compatability-XE%204%20or%20newer-brightgreen)
22
![platform compatibility](https://img.shields.io/badge/platform-Android32%20%7C%20Android64%20%7C%20Linux64%20%7C%20macOS64%20%7C%20Win32%20%7C%20Win64-lightgrey)
3-
![license](https://img.shields.io/github/license/sempare/sempare-delphi-template-engine)
43

54
# ![](./images/sempare-logo-45px.png) Sempare Template Engine
65

76
Copyright (c) 2019-2024 [Sempare Limited](http://www.sempare.ltd)
87

98
Contact: <info@sempare.ltd>
109

11-
License: [GPL v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html) or [Sempare Limited Commercial License](./docs/commercial.license.md)
10+
License: [Apache v2.0](https://www.apache.org/licenses/LICENSE-2.0) or [Sempare Limited Commercial License](./docs/commercial.license.md)
1211

1312
Open Source: https://github.com/sempare/sempare-delphi-template-engine
1413

15-
## Contents
16-
- [Introduction](#Introduction)
17-
- [Call To Action](#CallToAction)
18-
- [Quickstart](#Quickstart)
19-
- [Features](#Features)
20-
- [Objectives](#Objectives)
21-
- [Requirements](#Requirements)
22-
- [Installation](#Installation)
23-
- [GetIt](#GetIt)
24-
- [Boss](#Boss)
25-
- [Delphinus](#DelphinusSupport)
26-
- [Manual Install](#ManualInstall)
27-
- [Feedback](#Feedback)
28-
- Template Language
29-
- [Statements](./docs/statements.md)
30-
- [Expressions](./docs/expressions.md)
31-
- [Builtin functions](./docs/builtin-functions.md)
32-
- [Builtin variables](./docs/builtin-variables.md)
33-
- [Comments](./docs/comments.md)
34-
- [Template Registry](./docs/template-registry.md)
35-
- Customisation
36-
- [Custom functions](./docs/custom-functions.md)
37-
- [Configuration](./docs/configuration.md)
38-
- [Components](./docs/components.md)
39-
- [Tricks](./docs/tricks.md)
40-
- [Template Patterns](./docs/template-patterns.md)
41-
- [Whitespace Removal](./docs/whitespace-removal.md)
42-
- [Internals](./docs/internals.md)
43-
- [Restrictions/Limitations/Known Bugs](./docs/restrictions.md)
44-
- [License](#License)
14+
*Questionaire*: https://docs.google.com/forms/d/e/1FAIpQLScioIiDxvsWK01fMFqYr9aJ6KhCGeiw4UaU_esGuztEE7vYwA/viewform
4515

4616
<a name="Introduction"><h2>Introduction</h3></a>
4717

4818
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:
4919
- web sites using template engines (for server side scripting)
5020
- code generation
51-
- mail merge
21+
- mail merge
5222
- notification messages
5323

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.
5725

5826
Example usage:
5927
```
@@ -68,20 +36,20 @@ type
6836
end;
6937
begin
7038
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 +
7341
'Counting... <% for i := 1 to count %><% i %><% betweenitems %>, <% end %>' +
7442
'Counting... <% for i := 1 to count ; print(i) ; betweenitems ; print(', '); onbegin; print('[ '); onend; print('] '); end %>'
7543
);
7644
var info : TInformation;
7745
info.name := 'conrad';
7846
info.favourite_sport := 'ultimate';
7947
info.count := 3;
80-
writeln(Template.Eval(tpl, info));
48+
writeln(Template.Eval(tpl, info));
8149
end.
8250
```
8351

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.
8553

8654
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.
8755

@@ -93,6 +61,38 @@ Please 'star' the project on github.
9361

9462
![](./images/sempare-template-engine-start-cta.png)
9563

64+
65+
## Contents
66+
- [Introduction](#Introduction)
67+
- [Call To Action](#CallToAction)
68+
- [Quickstart](#Quickstart)
69+
- [Features](#Features)
70+
- [Objectives](#Objectives)
71+
- [Requirements](#Requirements)
72+
- [Installation](#Installation)
73+
- [GetIt](#GetIt)
74+
- [Boss](#Boss)
75+
- [Delphinus](#DelphinusSupport)
76+
- [Manual Install](#ManualInstall)
77+
- [Feedback](#Feedback)
78+
- Template Language
79+
- [Statements](./docs/statements.md)
80+
- [Expressions](./docs/expressions.md)
81+
- [Builtin functions](./docs/builtin-functions.md)
82+
- [Builtin variables](./docs/builtin-variables.md)
83+
- [Comments](./docs/comments.md)
84+
- [Template Registry](./docs/template-registry.md)
85+
- Customisation
86+
- [Custom functions](./docs/custom-functions.md)
87+
- [Configuration](./docs/configuration.md)
88+
- [Components](./docs/components.md)
89+
- [Tricks](./docs/tricks.md)
90+
- [Template Patterns](./docs/template-patterns.md)
91+
- [Whitespace Removal](./docs/whitespace-removal.md)
92+
- [Internals](./docs/internals.md)
93+
- [Restrictions/Limitations/Known Bugs](./docs/restrictions.md)
94+
- [License](#License)
95+
9696
<a name="Quickstart"><h2>Quickstart</h3></a>
9797

9898
There are a few ways to get started quickly.
@@ -117,7 +117,7 @@ There are a few ways to get started quickly.
117117
- simple expression evaluation (logical, numerical and string)
118118
- variable definition
119119
- functions and methods calls
120-
- dereference records, custom managed records, classes, arrays, JSON objects, TDataSet descendants and dynamic arrays
120+
- dereference records, custom managed records, classes, interfaces, arrays, JSON objects, TDataSet descendants and dynamic arrays
121121
- ternary operator
122122
- safety
123123
- max run-time protection
@@ -158,7 +158,6 @@ There should be no platform specific restrictions.
158158
Have a look at Sempare.Template.Compiler.inc. The following defines can be defined if appropriate:
159159

160160
- 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.
162161

163162
<a name="Installation"><h2>Installation</h3></a>
164163

@@ -220,16 +219,15 @@ The deployment process is based off the dev branch. Once we decide to push a new
220219

221220
<a name="License"><h2>License</h3></a>
222221

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
224223
no cost to you, or you may license it for use under the [Sempare Limited Commercial License](./docs/commercial.license.md)
225224

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.
227226

228227
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.
230229

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.
233231

234232
The following payment links allow you to quickly subscribe. Please note that the initial license and support links are seperate.
235233
- [Initial License Fee](https://buy.stripe.com/aEU7t61N88pffQIdQQ)

Sempare.Template.Pkg.dpk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
* *
1717
* Contact: info@sempare.ltd *
1818
* *
19-
* Licensed under the GPL Version 3.0 or the Sempare Commercial License *
19+
* Licensed under the Apache Version 2.0 or the Sempare Commercial License *
2020
* You may not use this file except in compliance with one of these Licenses. *
2121
* You may obtain a copy of the Licenses at *
2222
* *
23-
* https://www.gnu.org/licenses/gpl-3.0.en.html *
23+
* https://www.apache.org/licenses/LICENSE-2.0 *
2424
* https://github.com/sempare/sempare-delphi-template-engine/blob/master/docs/commercial.license.md *
2525
* *
2626
* Unless required by applicable law or agreed to in writing, software *

Sempare.Template.Tester.dpr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
* *
1717
* Contact: info@sempare.ltd *
1818
* *
19-
* Licensed under the GPL Version 3.0 or the Sempare Commercial License *
19+
* Licensed under the Apache Version 2.0 or the Sempare Commercial License *
2020
* You may not use this file except in compliance with one of these Licenses. *
2121
* You may obtain a copy of the Licenses at *
2222
* *
23-
* https://www.gnu.org/licenses/gpl-3.0.en.html *
23+
* https://www.apache.org/licenses/LICENSE-2.0 *
2424
* https://github.com/sempare/sempare-delphi-template-engine/blob/master/docs/commercial.license.md *
2525
* *
2626
* Unless required by applicable law or agreed to in writing, software *

Sempare.Template.Tester.dproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
4646
<Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
4747
<Icns_MainIcns>$(BDS)\bin\delphi_PROJECTICNS.icns</Icns_MainIcns>
48-
<DCC_UnitSearchPath>$(DUnitX);src;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
48+
<DCC_UnitSearchPath>thirdparty\DUnitX\Source;$(DUnitX);src;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
4949
<SanitizedProjectName>Sempare_Template_Tester</SanitizedProjectName>
5050
</PropertyGroup>
5151
<PropertyGroup Condition="'$(Base_Win32)'!=''">
52-
<DCC_UsePackage>DBXSqliteDriver;RESTComponents;vclFireDAC;tethering;FireDACADSDriver;vcltouch;vcldb;bindcompfmx;inetdb;fmx;FireDACIBDriver;fmxdae;vquery260;dacvcl260;dbexpress;vclx;dsnap;FireDACCommon;RESTBackendComponents;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACMySQLDriver;FireDACCommonDriver;inet;bindcompdbx;vcl;ADODataProvider;dsnapcon;FireDACDataProvider;FireDACMSAccDriver;vclimg;FireDAC;DBXDataProvider;FireDACSqliteDriver;FireDACPgDriver;crcontrols260;soaprtl;DbxCommonDriver;xmlrtl;soapmidas;fmxobj;vclwinx;dac260;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;DOSCommandDR;bindcomp;appanalytics;bindcompvcl;dbxcds;adortl;dsnapxml;dbrtl;inetdbxpress;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
52+
<DCC_UsePackage>$(DCC_UsePackage)</DCC_UsePackage>
5353
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
5454
<BT_BuildType>Debug</BT_BuildType>
5555
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.5.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=ltd.sempare.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.5.0.0;Comments=</VerInfo_Keys>

Sempare.TemplateEngine.dspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"id": "Sempare.TemplateEngine",
4-
"version": "1.7.7",
4+
"version": "1.8.0",
55
"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.",
66
"icon": "images\\sempare-logo-45px.png",
77
"authors": "Sempare Limited",

boss.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Sempare Template Engine",
33
"description": "Sempare Template Engine for Delphi allows for flexible text manipulation. It can be used for generating email, html, source code, xml, configuration, etc.",
4-
"version": "1.7.7",
4+
"version": "1.8.0",
55
"homepage": "https://github.com/sempare/sempare-delphi-template-engine",
66
"mainsrc": "./src/",
77
"projects": [],

0 commit comments

Comments
 (0)