{
  "id": "enscript",
  "name": "GNU Enscript",
  "homepage": "https://www.gnu.org/software/enscript/",
  "description": "A plain-text to PostScript, HTML, or RTF converter.",
  "executables": [
    "enscript"
  ],
  "dotfiles": {
    "paths": [
      "~/.enscriptrc",
      "~/.enscript/"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "Convert text to PostScript",
    "description": "Convert text or source files to PostScript with enscript, optionally with syntax highlighting, and write to a file or a printer. Fonts, filters, fancy headers, underlays and special escapes are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": true
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://manpages.debian.org/bookworm/enscript/enscript.1.en.html",
        "revision": "bookworm",
        "evidence": "-1, -2, -3, -4, -5, -6, -7, -8, -9,\n    --columns=num\n  Specify how many columns each page have.\n-a pages,\n    --pages=pages\n  Specify which pages are printed.\n-b header,\n    --header=header\n  Use the text header as a page header.\n-B, --no-header\n-C[start_line],\n    --line-numbers[=start_line]\n-E[lang],\n    --highlight[=lang]\n  Highlight source code by creating a special input filter with the states program.\n-G,\n    --fancy-header[=name]\n-j, --borders\n-p file, --output=file\n  Leave the output to file file. If the file is `-', enscript sends the output to the standard output stdout.\n-P name,\n    --printer=name\n  Spool the output to the printer name.\n-q, --quiet,\n    --silent\n-r, --landscape\n  Print in the landscape mode; rotate page 90 degrees.\n-R, --portrait\n-t title,\n    --title=title\n-T num,\n    --tabsize=num\n  Set the tabulator size to num characters. The default is 8.\n-M name,\n    --media=name\n-n num, --copies=num\n"
      }
    ],
    "field": [
      {
        "id": "files",
        "label": "Input files",
        "description": "Leave empty to read standard input.",
        "type": "path",
        "position": 0,
        "multiple": true,
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "output",
        "label": "Output file",
        "description": "Write PostScript to this file instead of the default printer.",
        "type": "path",
        "option": [
          "--output",
          "-p"
        ],
        "path": {
          "kind": "file",
          "role": "output",
          "must_exist": false
        },
        "effect": "overwrite",
        "sources": [
          "man"
        ]
      },
      {
        "id": "printer",
        "label": "Printer",
        "description": "Spool the output to this named printer.",
        "type": "string",
        "option": [
          "--printer",
          "-P"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "highlight",
        "label": "Highlight language",
        "description": "Syntax-highlight using this language name (enscript --help-highlight lists them).",
        "type": "string",
        "option": [
          "--highlight"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "columns",
        "label": "Columns per page",
        "type": "integer",
        "option": [
          "--columns"
        ],
        "min": 1,
        "sources": [
          "man"
        ]
      },
      {
        "id": "landscape",
        "label": "Landscape",
        "type": "boolean",
        "option": [
          "--landscape",
          "-r"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "portrait",
        "label": "Portrait",
        "type": "boolean",
        "option": [
          "--portrait",
          "-R"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "line_numbers",
        "label": "Line numbers",
        "type": "boolean",
        "option": [
          "-C"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "no_header",
        "label": "No page header",
        "type": "boolean",
        "option": [
          "--no-header",
          "-B"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "borders",
        "label": "Page borders",
        "type": "boolean",
        "option": [
          "--borders",
          "-j"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "title",
        "label": "Job title",
        "type": "string",
        "option": [
          "--title",
          "-t"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "tabsize",
        "label": "Tab size",
        "type": "integer",
        "option": [
          "--tabsize",
          "-T"
        ],
        "min": 1,
        "sources": [
          "man"
        ]
      },
      {
        "id": "media",
        "label": "Media",
        "description": "Paper size name, for example A4 or Letter.",
        "type": "string",
        "option": [
          "--media",
          "-M"
        ],
        "suggestions": [
          {
            "value": "A4",
            "label": "A4"
          },
          {
            "value": "Letter",
            "label": "Letter"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "copies",
        "label": "Copies",
        "type": "integer",
        "option": [
          "--copies",
          "-n"
        ],
        "min": 1,
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "to-ps",
        "label": "Convert to PostScript file",
        "fields": [
          "files",
          "output",
          "highlight",
          "columns",
          "landscape",
          "line_numbers"
        ],
        "required": [
          "files",
          "output"
        ]
      },
      {
        "id": "print",
        "label": "Print to a printer",
        "fields": [
          "files",
          "printer",
          "highlight",
          "copies",
          "media"
        ],
        "required": [
          "files",
          "printer"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "files",
          "output",
          "printer",
          "highlight",
          "columns",
          "landscape",
          "line_numbers"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "portrait",
          "no_header",
          "borders",
          "title",
          "tabsize",
          "media",
          "copies"
        ]
      }
    ]
  }
}
