metarisc-odt/base-odt-template
Composer 安装命令:
composer require metarisc-odt/base-odt-template
包简介
ODT rendering
README 文档
README
metarisc-odt/base-odt-template is a library to quickly generate Open Document Text-files using a simple templating mechanism. Spiritual successor to odtphp.
UNDER ACTIVE DEVELOPMENT - EXPECT BC BREAKS
Install
Via Composer
$ composer require metarisc-odt/base-odt-template
Documentation
Tags
Use Date, Field, QrCode and other tags to build your templates.
Conditional
The Conditional Tag allows to render contents only if condition is true.
[IF key]
[/IF key]
Date
The Date Tag allows to display date values (fr locale only).
{date:key}
Field
The Field Tag allows to display different string values.
{field:key}
Image
The Image Tag allows adding images from URL.
{image:key}
Segment
The Segment Tag allows to group other tags and iterate array data. The Segment is used as a template to render each row in the data set.
Usage :
[SEGMENT key]
[/SEGMENT key]
QrCode
The QrCode Tag components allow rendering QR codes from any field in the data set.
Usage :
{qrcode:key,size:150}
Options :
- size : QrCode size in pixel
- margin : Margin in pixel applied to QrCode
Markdown
The Markdown Tag allows rendering Markdown content.
Usage :
{md:key}
Table
The Simple Table Tag allows rendering a table by duplicating each table row in the document. The field must be an array of associative arrays, where each associative array represents a row in the table. The last row of the table must be the template row, which will be duplicated for each row in the data set.
Usage :
[TABLE key]
(...table...)
[/TABLE key]
Testing
$ composer test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email kevindubuc62@gmail.com instead of using the issue tracker.
Credits
License
The CeCILL-B License. Please see License File for more information.
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: CECILL-2.1
- 更新时间: 2026-05-13