Slide kit command

drawing.insert

Insert Drawing Object

Inserts a KitDrawing object (shape, text box or chart) from geometry, frame, fill, stroke and text on the current slide and answers its id.

Kit
Slide 0.1.0 (.kslide and .pptx)
Changes the document
yes

Parameters

Parameters of drawing.insert
NameTypeRequiredDescription
bodyanyno
chartobjectno{kind?, title?, categories?, series?: [{name, values, color?}], legend?, dataLabels?, gridlines?, xTitle?, yTitle?}
fillanyno
frameobjectno{x,y,w,h,rot?,flipH?,flipV?}
geometryobjectno{preset, adjust?}
kind"shape" | "textBox" | "chart"no
paragraphsanynoinstead of text
placementobjectno{kind: slide}
strokeanyno
textstringno
warpanyno

Call through slide_run

text
slide_run {
  "path": "<file>.pptx",
  "steps": [{ "command": "drawing.insert" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: body, chart, fill, frame, geometry, kind, paragraphs, placement, stroke, text, warp. slide_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": {
    "body": {},
    "chart": {
      "additionalProperties": true,
      "description": "{kind?, title?, categories?, series?: [{name, values, color?}], legend?, dataLabels?, gridlines?, xTitle?, yTitle?}",
      "properties": {
        "categories": {},
        "dataLabels": {},
        "gridlines": {},
        "kind": {},
        "legend": {},
        "series": {
          "description": "[{name, values, color?}]",
          "items": {
            "additionalProperties": true,
            "properties": {
              "color": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "values": {}
            },
            "type": "object"
          },
          "type": "array"
        },
        "title": {
          "type": "string"
        },
        "xTitle": {},
        "yTitle": {}
      },
      "type": "object"
    },
    "fill": {},
    "frame": {
      "additionalProperties": true,
      "description": "{x,y,w,h,rot?,flipH?,flipV?}",
      "properties": {
        "flipH": {},
        "flipV": {},
        "h": {
          "type": "number"
        },
        "rot": {},
        "w": {
          "type": "number"
        },
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "geometry": {
      "additionalProperties": true,
      "description": "{preset, adjust?}",
      "properties": {
        "adjust": {},
        "preset": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "kind": {
      "enum": [
        "shape",
        "textBox",
        "chart"
      ],
      "type": "string"
    },
    "paragraphs": {
      "description": "instead of text"
    },
    "placement": {
      "additionalProperties": true,
      "description": "{kind: slide}",
      "properties": {
        "kind": {
          "description": "slide"
        }
      },
      "type": "object"
    },
    "stroke": {},
    "text": {
      "type": "string"
    },
    "warp": {}
  },
  "type": "object"
}

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