Doc kit command

drawing.format

Format Drawing Objects

Changes the fill, stroke or geometry of drawing objects by id.

Kit
Doc 0.1.0 (.docx)
Changes the document
yes
Acts on
ids (a list of ids), which a run step’s on fills

Parameters

Parameters of drawing.format
NameTypeRequiredDescription
effectsobjectnoread by the command beside its listed parameters
fillstring | objectnothe shape's fill
geometryobjectno{preset, adjust?: {adj…: value}} or {paths: […]}
idinteger | stringnoread by the command beside its listed parameters
idsinteger[]no
strokeobjectnothe outline: {color?, width? (pt), dash?} or {none: true}

Call through doc_run

text
doc_run {
  "path": "<file>.docx",
  "steps": [{ "command": "drawing.format" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: effects, fill, geometry, id, ids, stroke. doc_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": {
    "effects": {
      "additionalProperties": true,
      "description": "read by the command beside its listed parameters",
      "type": "object"
    },
    "fill": {
      "description": "the shape's fill",
      "oneOf": [
        {
          "description": "a colour: \"#rrggbb\" or a theme slot such as \"accent1\"; \"none\" for no fill",
          "type": "string"
        },
        {
          "additionalProperties": true,
          "description": "{color}, {gradient} or {none: true}",
          "type": "object"
        }
      ]
    },
    "geometry": {
      "additionalProperties": true,
      "description": "{preset, adjust?: {adj…: value}} or {paths: […]}",
      "type": "object"
    },
    "id": {
      "description": "read by the command beside its listed parameters",
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "x-khp-types": [
        "Inline"
      ]
    },
    "ids": {
      "items": {
        "description": "an id",
        "type": "integer"
      },
      "type": "array",
      "x-khp-types": [
        "Inline"
      ]
    },
    "stroke": {
      "additionalProperties": true,
      "description": "the outline: {color?, width? (pt), dash?} or {none: true}",
      "type": "object"
    }
  },
  "type": "object"
}

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