@lotics/cli 0.321.72 → 0.321.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/cli.js +3 -3
- package/docs/document_templates.md +2 -0
- package/package.json +1 -1
|
@@ -126,6 +126,8 @@ The `html` and `email` types print a raw value through a helper in the template'
|
|
|
126
126
|
|
|
127
127
|
A field can also print as a **QR code** or a **Code 128 barcode** (a picture a phone's camera or a scanner reads back): `{{qr link}}` or `{{code128 position 6}}` in html (never email: mail clients do not show the picture, and a save refuses it), `{{position | qr}}` or `{{position | code128:6}}` as a whole Excel cell (its row grows to the picture), `{{IMAGE qr(position)}}` or `{{IMAGE code128(position, 6)}}` in Word. The optional number is the picture's width in centimetres. Without it the width follows the value's length — each module prints 0.5 mm in a QR code and 0.33 mm in a barcode, so a longer value prints wider; a width that would shrink a module below what a scanner reads (0.3 mm, 0.19 mm) is refused, naming the least width that scans. An empty field draws nothing.
|
|
128
128
|
|
|
129
|
+
A cell merged in an Excel template over the rows of a loop covers the rows that loop becomes; inside an outer loop, each of its items its own rows (a group's name merged beside its lines). An Excel cell's text can stand in parts, some of them bold: `{{goods | rich}}` as the whole cell takes a list of `{ text, bold }` and writes the parts as one text, a bold part in the cell's own font made bold. Excel shows a row at most 409 points tall and cuts a cell's text past it, so a long text is laid over several rows.
|
|
130
|
+
|
|
129
131
|
A record's **photos** (a files field, or a lookup of one through its links, an act's paper hands each as a file cell `{id, name, mime, url}`) print too, and only for a file whoever makes the paper may read — the same rule the file proxy applies; any other file is never drawn. html: `{{#each photos}}<img src="{{url}}">{{/each}}` (only the data's file cells are inlined; a url typed into a text field stays a link). Word: `{{IMAGE picture(cover, 8)}}`, and `{{FOR p IN photos}}{{IMAGE picture($p, 8)}}{{END-FOR p}}` for several. Excel: `{{cover | picture:6}}` as the whole cell, or `{{this | picture}}` inside `{{#each photos}}` (each row grows to its picture). The number is the width in centimetres (8, or 6 in Excel, by default). `picture` takes one image file: a list (loop over it), a file that is no image or one that cannot be read is refused by name. Photos are embedded at most 1600 pixels across, about 200 dpi at 20 cm.
|
|
130
132
|
|
|
131
133
|
A Word command (`{{ … }}`) reads the data and calls, by name, a Word helper (`picture`, `qr`, `code128`) or one of these text
|