{
  "id": "mark",
  "name": "mark",
  "homepage": "https://github.com/kovetskiy/mark",
  "description": "A tool for updating Atlassian Confluence pages from Markdown",
  "executables": [
    "mark"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/mark.toml"
    ],
    "secret": [],
    "secret_paths": [
      {
        "file": "[configHome]/mark.toml",
        "format": "toml",
        "match": {
          "key_path": [
            "password"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "mark",
    "description": "Publish markdown files to Confluence. Global options (credentials, base URL, config) and other subcommands are left out; set credentials in the mark config file.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "publish"
        ],
        "label": "Publish to Confluence",
        "description": "Compile markdown files into Confluence pages and create or update them.",
        "source": [
          {
            "id": "help",
            "kind": "help",
            "url": "https://github.com/kovetskiy/mark",
            "evidence": "   publish  publish markdown files to Confluence\n   --files string, -f string                      use specified markdown file(s) for converting to html. Supports file globbing patterns (needs to be quoted).\n   --continue-on-error                            don't exit if an error occurs while processing a file, continue processing remaining files.\n   --compile-only                                 show resulting HTML and don't update Confluence page content.\n   --dry-run                                      resolve page and ancestry, show resulting HTML and exit.\n   --minor-edit                                   don't send notifications while updating Confluence page.\n   --space string                                 use specified space key. If the space key is not specified, it must be set in the page metadata.\n   --parents string                               A list containing the parents of the document separated by parents-delimiter (default: '/').\n   --title-from-h1                                extract page title from a leading H1 heading.\n   --drop-h1                                      don't include the first H1 heading in Confluence output.\n   --changes-only                                 Avoids re-uploading pages that haven't changed since the last run.\n   --track-pages                                  Remember which page each file publishes to, so renaming a file or changing its title updates the existing page instead of creating a second one.\n   --ci                                           run on CI mode. It won't fail if files are not found."
          }
        ],
        "field": [
          {
            "id": "files",
            "label": "Markdown files",
            "description": "File path or quoted glob pattern.",
            "type": "string",
            "option": [
              "--files",
              "-f"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "space",
            "label": "Space key",
            "type": "string",
            "option": [
              "--space"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "parents",
            "label": "Parent pages",
            "description": "Parent page titles separated by /.",
            "type": "string",
            "option": [
              "--parents"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "dry_run",
            "label": "Dry run",
            "type": "boolean",
            "option": [
              "--dry-run"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "compile_only",
            "label": "Compile only",
            "description": "Show the resulting HTML without updating Confluence.",
            "type": "boolean",
            "option": [
              "--compile-only"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "continue_on_error",
            "label": "Continue on error",
            "type": "boolean",
            "option": [
              "--continue-on-error"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "title_from_h1",
            "label": "Title from H1",
            "type": "boolean",
            "option": [
              "--title-from-h1"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "drop_h1",
            "label": "Drop first H1",
            "type": "boolean",
            "option": [
              "--drop-h1"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "minor_edit",
            "label": "Minor edit",
            "description": "Do not send notifications.",
            "type": "boolean",
            "option": [
              "--minor-edit"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "changes_only",
            "label": "Changes only",
            "type": "boolean",
            "option": [
              "--changes-only"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "track_pages",
            "label": "Track pages",
            "type": "boolean",
            "option": [
              "--track-pages"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "ci",
            "label": "CI mode",
            "type": "boolean",
            "option": [
              "--ci"
            ],
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "preview",
            "label": "Preview HTML (no upload)",
            "set": {
              "compile_only": [
                true
              ]
            },
            "lock": [
              "compile_only"
            ],
            "fields": [
              "files",
              "compile_only",
              "title_from_h1",
              "drop_h1"
            ],
            "required": [
              "files"
            ]
          },
          {
            "id": "dry-run",
            "label": "Dry run",
            "set": {
              "dry_run": [
                true
              ]
            },
            "lock": [
              "dry_run"
            ],
            "fields": [
              "files",
              "dry_run",
              "space",
              "parents",
              "changes_only"
            ],
            "required": [
              "files"
            ]
          },
          {
            "id": "publish",
            "label": "Publish pages",
            "fields": [
              "files",
              "space",
              "parents",
              "title_from_h1",
              "minor_edit",
              "changes_only",
              "track_pages"
            ],
            "required": [
              "files"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "files",
              "space",
              "parents",
              "dry_run",
              "compile_only"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "continue_on_error",
              "title_from_h1",
              "drop_h1",
              "minor_edit",
              "changes_only",
              "track_pages",
              "ci"
            ]
          }
        ]
      }
    ]
  }
}
