Doc kit command

file.paragraph

Paragraph Details

Answers one paragraph's details by its path (index from file.inspect): text, runs with formatting, style and paragraph properties.

Kit
Doc 0.1.0 (.docx)
Changes the document
no

Parameters

Parameters of file.paragraph
NameTypeRequiredDescription
pathinteger[]no
story"body" | objectno"body", or {"part": n} for a header, footer, note, comment or text box story

Call through doc_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: path, story. doc_run answers the step’s result in completed[i].result.

Result

Result of file.paragraph
NameTypeRequiredDescription
paragraphobjectno
resolvedobjectno
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "paragraph": {
      "additionalProperties": true,
      "properties": {
        "mark": {
          "additionalProperties": true,
          "properties": {
            "font": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "props": {
          "additionalProperties": true,
          "properties": {
            "style": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "runs": {
          "items": {
            "additionalProperties": true,
            "properties": {
              "len": {
                "type": "number"
              },
              "props": {
                "additionalProperties": true,
                "properties": {
                  "font": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "text": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "resolved": {
      "additionalProperties": true,
      "properties": {
        "align": {
          "type": "string"
        },
        "autoSpaceDe": {
          "type": "boolean"
        },
        "autoSpaceDn": {
          "type": "boolean"
        },
        "bidi": {
          "type": "boolean"
        },
        "borders": {},
        "contextualSpacing": {
          "type": "boolean"
        },
        "dropCap": {
          "type": "number"
        },
        "indentFirst": {
          "type": "number"
        },
        "indentLeft": {
          "type": "number"
        },
        "indentRight": {
          "type": "number"
        },
        "keepLines": {
          "type": "boolean"
        },
        "keepNext": {
          "type": "boolean"
        },
        "kinsoku": {
          "type": "boolean"
        },
        "lineSpacing": {
          "additionalProperties": true,
          "properties": {
            "rule": {
              "type": "string"
            },
            "value": {
              "type": "number"
            }
          },
          "type": "object"
        },
        "numbering": {},
        "outlineLevel": {
          "type": "number"
        },
        "overflowPunct": {
          "type": "boolean"
        },
        "pageBreakBefore": {
          "type": "boolean"
        },
        "shading": {},
        "spaceAfter": {
          "type": "number"
        },
        "spaceBefore": {
          "type": "number"
        },
        "style": {
          "type": "string"
        },
        "suppressHyphens": {
          "type": "boolean"
        },
        "tabs": {
          "type": "array"
        },
        "topLinePunct": {
          "type": "boolean"
        },
        "widowControl": {
          "type": "boolean"
        },
        "wordWrap": {
          "type": "boolean"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "path": {
      "items": {
        "type": "integer"
      },
      "type": "array"
    },
    "story": {
      "description": "\"body\", or {\"part\": n} for a header, footer, note, comment or text box story",
      "oneOf": [
        {
          "enum": [
            "body"
          ],
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "part": {
              "description": "header, footer, footnote, endnote, comment or text box story number",
              "type": "integer"
            }
          },
          "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.