File: tilt.1

package info (click to toggle)
ruby-tilt 2.0.0%2Breally1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 476 kB
  • ctags: 411
  • sloc: ruby: 3,546; makefile: 5
file content (43 lines) | stat: -rw-r--r-- 1,229 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.40.4.
.TH TILT "1" "July 2011" "tilt 1.3.2" "tilt"
.SH NAME
tilt \- Generic interface to multiple Ruby template engines
.SH SYNOPSIS
.B tilt
\fI<options> <file>\fR
.SH DESCRIPTION
Process template <file> and write output to stdout. With no <file> or
when <file> is '\-', read template from stdin and use the \fB\-\-type\fR option
to determine the template's type.
.PP
Options
.TP
\fB\-l\fR, \fB\-\-list\fR
List template engines + file patterns and exit
.HP
\fB\-t\fR, \fB\-\-type=\fR<pattern> Use this template engine; required if no <file>
.TP
\fB\-y\fR, \fB\-\-layout=\fR<file>
Use <file> as a layout template
.TP
\fB\-D\fR<name>=<value>
Define variable <name> as <value>
.TP
\fB\-o\fR, \fB\-\-vars=\fR<ruby>
Evaluate <ruby> to Hash and use for variables
.TP
\fB\-h\fR, \fB\-\-help\fR
Show this help message
.SS "Convert markdown to HTML:"
.IP
$ tilt foo.markdown > foo.html
.SS "Process ERB template:"
.IP
$ echo "Answer: <%= 2 + 2 %>" | tilt \fB\-t\fR erb
Answer: 4
.SS "Define variables:"
.IP
$ echo "Answer: <%= 2 + n %>" | tilt \fB\-\-locals=\fR"{:n=>40, :x=>0}"
Answer: 42
$ echo "Answer: <%= 2 + n %>" | tilt \fB\-Dn\fR=\fI40\fR \fB\-Dx\fR=\fI0\fR
Answer: 42