Board kit command

card.add

Card

Places a card that links to a workspace file (note, table, board or any file) or a web address; the card shows the target's title and opens it.

Kit
Board 0.1.0 (.kboard)
Changes the document
yes

Parameters

Parameters of card.add
NameTypeRequiredDescription
captionstringnoA caption under the card
filestringnoA workspace file, relative to the board's folder or rooted with /
kind"note" | "table" | "board" | "file" | "link"noThe card's kind (from the file's extension when absent)
pagestringnoThe page's id; the shown page when absent
positionnumber[] | objectno[x, y]; right of the content when absent
sizenumber[] | objectno[w, h]; 320 × 200 by default
titlestringnoA link card's title
urlstringnoAn http, https or mailto address (instead of file)
viewobjectnoWhere in the target: { heading: [...] }, { blockId }, { page }

Call through board_run

text
board_run {
  "path": "<file>.kboard",
  "steps": [{ "command": "card.add" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: caption, file, kind, page, position, size, title, url, view. board_run answers the step’s result in completed[i].result.

Result

The kit gives no result schema for this command.

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "caption": {
      "description": "A caption under the card",
      "type": "string"
    },
    "file": {
      "description": "A workspace file, relative to the board's folder or rooted with /",
      "type": "string",
      "x-khp-file": {
        "accept": [
          "md",
          "markdown",
          "ktable",
          "kboard"
        ],
        "access": "read"
      }
    },
    "kind": {
      "description": "The card's kind (from the file's extension when absent)",
      "enum": [
        "note",
        "table",
        "board",
        "file",
        "link"
      ],
      "type": "string"
    },
    "page": {
      "description": "The page's id; the shown page when absent",
      "type": "string",
      "x-khp-types": [
        "Page"
      ]
    },
    "position": {
      "description": "[x, y]; right of the content when absent",
      "oneOf": [
        {
          "items": {
            "description": "One component",
            "maximum": 1000000,
            "minimum": -1000000,
            "type": "number"
          },
          "type": "array"
        },
        {
          "additionalProperties": false,
          "properties": {
            "x": {
              "description": "One component",
              "maximum": 1000000,
              "minimum": -1000000,
              "type": "number"
            },
            "y": {
              "description": "One component",
              "maximum": 1000000,
              "minimum": -1000000,
              "type": "number"
            }
          },
          "required": [
            "x",
            "y"
          ],
          "type": "object"
        }
      ]
    },
    "size": {
      "description": "[w, h]; 320 × 200 by default",
      "oneOf": [
        {
          "items": {
            "description": "One component",
            "maximum": 100000,
            "minimum": 0,
            "type": "number"
          },
          "type": "array"
        },
        {
          "additionalProperties": false,
          "properties": {
            "h": {
              "description": "One component",
              "maximum": 100000,
              "minimum": 0,
              "type": "number"
            },
            "w": {
              "description": "One component",
              "maximum": 100000,
              "minimum": 0,
              "type": "number"
            }
          },
          "required": [
            "h",
            "w"
          ],
          "type": "object"
        }
      ]
    },
    "title": {
      "description": "A link card's title",
      "type": "string"
    },
    "url": {
      "description": "An http, https or mailto address (instead of file)",
      "type": "string"
    },
    "view": {
      "additionalProperties": true,
      "description": "Where in the target: { heading: [...] }, { blockId }, { page }",
      "type": "object"
    }
  },
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (board_commands through @kition/[email protected], built from KitionAI/kition-board@e78c190). As data: commands.jsonl.