tmpl

Line-based key-value templator
git clone https://git.sinitax.com/sinitax/tmpl
Log | Files | Refs | README | LICENSE | sfeed.txt

tmpl.1 (788B)


      1.Dd Feb 17, 2024
      2.Dt TMPL 1
      3.Os linux
      4
      5.Sh NAME
      6.Nm tmpl
      7.Nd Simple key-value templator
      8
      9.Sh SYNOPSIS
     10
     11.Nm
     12.Op Fl e
     13.Op Fl C Ar config
     14.Op Fl D Ar KEY=VALUE
     15
     16.Sh DESCRIPTION
     17
     18.Nm
     19is key-value templator based on the C preprocessor
     20.Xr cpp 1 .
     21Variables are defined via line-based conditional and assignment directives,
     22and substituted in-line for sequences matching
     23.Em #{NAME} .
     24Untemplated content is read from
     25.Xr stdin 3
     26and templated content is written to
     27.Xr stdout 3 .
     28
     29The following directives are supported:
     30.Bl -tag -offset 1c
     31.It #ifeq
     32.It #ifdef
     33.It #else
     34.It #endif
     35.It #define
     36.It #default
     37.El
     38
     39Templated values are read from the environment, the commandline
     40or a
     41.Ar config
     42file in
     43.Ar KEY=VALUE
     44format.
     45
     46.Sh AUTHORS
     47Written by
     48.An Louis Burda Aq Mt quent.burda@gmail.com .