{
  "id": "httrack",
  "name": "HTTrack",
  "homepage": "https://www.httrack.com/",
  "description": "An offline browser utility for downloading websites to a local directory.",
  "executables": [
    "httrack"
  ],
  "dotfiles": {
    "paths": [
      "~/.httrackrc"
    ],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Mirror a website",
    "description": "Download a site into a local folder. URL filters (+pattern, -pattern), cookies, proxies and cache tuning are not in this form.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://manpages.debian.org/bookworm/httrack/httrack.1.en.html",
        "revision": "bookworm",
        "evidence": "  -O\n  path for mirror/logfiles+cache (-O path mirror[,path cache and logfiles])\n  -rN\n  set the mirror depth to N (* r9999) (--depth[=N])\n  -AN\n  maximum transfer rate in bytes/seconds (1000=1KB/s max)\n    (--max-rate[=N])\n  -cN\n  number of multiple connections (*c8) (--sockets[=N])\n  -q\n  no questions - quiet mode (--quiet)\n  -%v\n  display on screen filenames downloaded (in realtime) - * %v1 short version\n  -a\n  *stay on the same address (--stay-on-same-address)\n  -d\n  stay on the same principal domain (--stay-on-same-domain)\n  -e\n  go everywhere on the web (--go-everywhere)\n"
      }
    ],
    "field": [
      {
        "id": "path",
        "label": "Output folder",
        "type": "path",
        "option": [
          "-O"
        ],
        "path": {
          "kind": "directory",
          "role": "output",
          "must_exist": false
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "depth",
        "label": "Mirror depth",
        "type": "integer",
        "option": [
          "--depth"
        ],
        "value_style": "equals",
        "sources": [
          "man"
        ]
      },
      {
        "id": "max_rate",
        "label": "Max transfer rate (bytes/s)",
        "type": "integer",
        "option": [
          "--max-rate"
        ],
        "value_style": "equals",
        "sources": [
          "man"
        ]
      },
      {
        "id": "sockets",
        "label": "Parallel connections",
        "type": "integer",
        "option": [
          "--sockets"
        ],
        "value_style": "equals",
        "sources": [
          "man"
        ]
      },
      {
        "id": "quiet",
        "label": "No questions",
        "type": "boolean",
        "option": [
          "-q"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "same_address",
        "label": "Stay on same address",
        "type": "boolean",
        "option": [
          "-a"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "same_domain",
        "label": "Stay on same domain",
        "type": "boolean",
        "option": [
          "-d"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "everywhere",
        "label": "Go everywhere",
        "type": "boolean",
        "option": [
          "-e"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "urls",
        "label": "URLs",
        "type": "url",
        "position": 0,
        "multiple": true,
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "mirror",
        "label": "Mirror one site",
        "set": {
          "same_address": [
            true
          ]
        },
        "fields": [
          "urls",
          "path",
          "depth",
          "quiet",
          "same_address"
        ],
        "required": [
          "urls",
          "path"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "urls",
          "path",
          "depth",
          "quiet"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "max_rate",
          "sockets",
          "same_address",
          "same_domain",
          "everywhere"
        ]
      }
    ]
  }
}
