{
  "id": "gnu-units",
  "name": "GNU Units",
  "homepage": "https://www.gnu.org/software/units/",
  "description": "A unit conversion program and calculator",
  "executables": [
    "units",
    "units_cur"
  ],
  "dotfiles": {
    "paths": [
      "~/.units"
    ],
    "exclude": [
      "~/.units_history"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "Convert units",
    "description": "Convert one unit expression to another. Data files, locale, unit lists and interactive history options are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": true
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://manpages.debian.org/bookworm/units/units.1.en.html",
        "revision": "bookworm",
        "evidence": "-d ndigits,\n    --digits ndigits\n-e,\n    --exponential\n-1, --one-line\n-t, --terse\n-q, --quiet,\n    --silent\n-s, --strict\n-v, --verbose\n"
      }
    ],
    "field": [
      {
        "id": "from",
        "label": "From",
        "description": "Unit expression to convert, for example 5 miles.",
        "type": "string",
        "position": 0,
        "sources": [
          "man"
        ]
      },
      {
        "id": "to",
        "label": "To",
        "description": "Target unit. Leave empty to see the reduced form.",
        "type": "string",
        "position": 1,
        "sources": [
          "man"
        ]
      },
      {
        "id": "digits",
        "label": "Significant digits",
        "type": "integer",
        "option": [
          "--digits",
          "-d"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "exponential",
        "label": "Exponential output",
        "type": "boolean",
        "option": [
          "--exponential",
          "-e"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "one_line",
        "label": "One line",
        "description": "Print only the forward conversion.",
        "type": "boolean",
        "option": [
          "--one-line",
          "-1"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "terse",
        "label": "Terse",
        "description": "Print only a single conversion factor.",
        "type": "boolean",
        "option": [
          "--terse",
          "-t"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "strict",
        "label": "Strict",
        "type": "boolean",
        "option": [
          "--strict",
          "-s"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "verbose",
        "label": "Verbose",
        "type": "boolean",
        "option": [
          "--verbose",
          "-v"
        ],
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "convert",
        "label": "Convert",
        "fields": [
          "from",
          "to",
          "digits"
        ],
        "required": [
          "from",
          "to"
        ]
      },
      {
        "id": "factor",
        "label": "Conversion factor only",
        "set": {
          "terse": [
            true
          ]
        },
        "lock": [
          "terse"
        ],
        "fields": [
          "from",
          "to",
          "terse"
        ],
        "required": [
          "from",
          "to"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "from",
          "to",
          "digits",
          "terse"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "exponential",
          "one_line",
          "strict",
          "verbose"
        ]
      }
    ]
  }
}
