Doc kit command

file.wordCount

Word Count

Answers the document's (or selection's) pages, words, characters, paragraphs and lines, optionally counting text boxes; each Chinese or Japanese character counts as a word.

Kit
Doc 0.1.0 (.docx)
Changes the document
no

Parameters

Parameters of file.wordCount
NameTypeRequiredDescription
includeTextBoxesbooleanno

Call through doc_run

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

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

Result

Result of file.wordCount
NameTypeRequiredDescription
charactersnumberno
charactersWithSpacesnumberno
includeTextBoxesbooleanno
linesnumberno
pagesnumberno
paragraphsnumberno
wordsnumberno
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "characters": {
      "type": "number"
    },
    "charactersWithSpaces": {
      "type": "number"
    },
    "includeTextBoxes": {
      "type": "boolean"
    },
    "lines": {
      "type": "number"
    },
    "pages": {
      "type": "number"
    },
    "paragraphs": {
      "type": "number"
    },
    "words": {
      "type": "number"
    }
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "includeTextBoxes": {
      "type": "boolean"
    }
  },
  "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.