id = "a2ps"
name = "a2ps"
homepage = "https://www.gnu.org/software/a2ps/"
description = "a2ps formats files for printing on a PostScript printer."
executables = ["a2ps"]
[dotfiles]
paths = ["~/.a2ps/a2psrc"]
secret = []
[commands]
format = 1
label = "Format for printing"
description = "Convert files to PostScript for printing or saving with a2ps. Delegations, encodings and custom prologues are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true }
[[commands.source]]
id = "man"
kind = "manual"
url = "https://man.archlinux.org/man/a2ps.1.en"
revision = "2026-10-27"
evidence = """
-o,
--output=FILE
leave output to file FILE. If FILE is `-', leave output to stdout.
-P,
--printer=NAME
send output to printer NAME
-r,
--landscape
print in landscape mode
-R,
--portrait
print in portrait mode
--columns=NUM
number of columns per sheet
--rows=NUM
number of rows per sheet
-T,
--tabsize=NUM
set tabulator size to NUM
-E,
--pretty-print[=LANG]
enable pretty-printing (set style to LANG)
-t,
--title=NAME
set the name of the job
-B,
--no-header
no page headers at all
-b,
--header[=TEXT]
set page header
-j,
--borders*
print borders around columns
-n,
--copies=NUM
print NUM copies of each page
-s,
--sides=MODE
set the duplex MODE (`1' or `simplex', `2' or `duplex', `tumble')
--line-numbers=NUM
precede each NUM lines with its line number
-M,
--medium=NAME
use output medium NAME
"""
[[commands.field]]
id = "files"
label = "Files"
description = "Reads standard input when empty."
type = "path"
path = { kind = "file", role = "input" }
position = 0
multiple = true
sources = ["man"]
[[commands.field]]
id = "output"
label = "Output file"
description = "Write PostScript here instead of sending it to the default printer."
type = "path"
path = { kind = "file", role = "output" }
option = ["--output", "-o"]
sources = ["man"]
[[commands.field]]
id = "printer"
label = "Printer"
type = "string"
option = ["--printer", "-P"]
sources = ["man"]
[[commands.field]]
id = "columns"
label = "Columns per sheet"
type = "integer"
option = ["--columns"]
sources = ["man"]
[[commands.field]]
id = "rows"
label = "Rows per sheet"
type = "integer"
option = ["--rows"]
sources = ["man"]
[[commands.field]]
id = "landscape"
label = "Landscape"
type = "boolean"
option = ["--landscape", "-r"]
sources = ["man"]
[[commands.field]]
id = "portrait"
label = "Portrait"
type = "boolean"
option = ["--portrait", "-R"]
sources = ["man"]
[[commands.field]]
id = "pretty_print"
label = "Syntax highlight language"
description = "Leave empty to disable."
type = "string"
option = ["--pretty-print"]
sources = ["man"]
[[commands.field]]
id = "tabsize"
label = "Tab size"
type = "integer"
option = ["--tabsize", "-T"]
sources = ["man"]
[[commands.field]]
id = "title"
label = "Job title"
type = "string"
option = ["--title", "-t"]
sources = ["man"]
[[commands.field]]
id = "no_header"
label = "No page header"
type = "boolean"
option = ["--no-header", "-B"]
sources = ["man"]
[[commands.field]]
id = "copies"
label = "Copies"
type = "integer"
option = ["--copies", "-n"]
sources = ["man"]
[[commands.field]]
id = "sides"
label = "Duplex mode"
type = "enum"
option = ["--sides"]
choices = [{ value = "simplex", label = "Simplex" }, { value = "duplex", label = "Duplex" }, { value = "tumble", label = "Tumble" }]
sources = ["man"]
[[commands.field]]
id = "line_numbers"
label = "Line number interval"
description = "Precede every N lines with its line number."
type = "integer"
option = ["--line-numbers"]
sources = ["man"]
[[commands.task]]
id = "to-ps"
label = "Source file to PostScript"
fields = ["files", "output", "pretty_print", "line_numbers", "landscape"]
required = ["files", "output"]
[[commands.task]]
id = "print"
label = "Print to a printer"
fields = ["files", "printer", "copies", "sides", "columns"]
required = ["files"]
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["files", "output", "printer", "pretty_print", "landscape", "portrait", "columns", "rows"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["tabsize", "title", "no_header", "copies", "sides", "line_numbers"]