Vector kit command

file.getInfo

Document Info

Answers the Document Info report: objects, styles, swatches, patterns, gradients, symbols, fonts and images, for the document or the selection.

Kit
Vector 0.1.0 (.kvector)
Changes the document
no

Parameters

Parameters of file.getInfo
NameTypeRequiredDescription
category"document" | "objects" | "graphicStyles" | "spotColors" | "patterns" | "gradients" | "symbols" | "fonts" | "fontDetails" | "linkedImages" | "embeddedImages"noonly that one in sections and the text
formatstringnolike text; → {text}: the report Document Info › Save… and Package write
selectionOnlybooleanno
textstringnoread by the command beside its listed parameters

Call through vector_run

text
vector_run {
  "path": "<file>.kvector",
  "steps": [{ "command": "file.getInfo" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: category, format, selectionOnly, text. vector_run answers the step’s result in completed[i].result.

Result

Result of file.getInfo
NameTypeRequiredDescription
characterStylesnumberno
documentobjectno
fontsany[]no
graphicStyleNamesstring[]no
graphicStylesnumberno
imagesobjectno
objectsobjectno
paragraphStylesnumberno
patternNamesany[]no
patternsnumberno
sectionsobject[]no
spotColorsany[]no
swatchesnumberno
symbolsany[]no
textanyno
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "characterStyles": {
      "type": "number"
    },
    "document": {
      "additionalProperties": true,
      "properties": {
        "artboards": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        "colorMode": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "rasterEffectsPpi": {
          "type": "number"
        },
        "title": {
          "type": "string"
        },
        "units": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "fonts": {
      "type": "array"
    },
    "graphicStyleNames": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "graphicStyles": {
      "type": "number"
    },
    "images": {
      "additionalProperties": true,
      "properties": {},
      "type": "object"
    },
    "objects": {
      "additionalProperties": true,
      "properties": {
        "paths": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "paragraphStyles": {
      "type": "number"
    },
    "patternNames": {
      "type": "array"
    },
    "patterns": {
      "type": "number"
    },
    "sections": {
      "items": {
        "additionalProperties": true,
        "properties": {
          "id": {
            "type": "string"
          },
          "rows": {
            "type": "array"
          },
          "title": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "spotColors": {
      "type": "array"
    },
    "swatches": {
      "type": "number"
    },
    "symbols": {
      "type": "array"
    },
    "text": {}
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "category": {
      "description": "only that one in sections and the text",
      "enum": [
        "document",
        "objects",
        "graphicStyles",
        "spotColors",
        "patterns",
        "gradients",
        "symbols",
        "fonts",
        "fontDetails",
        "linkedImages",
        "embeddedImages"
      ],
      "type": "string"
    },
    "format": {
      "description": "like text; → {text}: the report Document Info › Save… and Package write",
      "type": "string"
    },
    "selectionOnly": {
      "type": "boolean"
    },
    "text": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    }
  },
  "returns": "{text}: the report Document Info › Save… and Package write)} → {document, objects: {paths, compoundPaths, groups, …}, fonts, images, swatches, graphicStyleNames (with selectionOnly: the styles the selected objects are linked to), …, sections: [{id, title, rows: [[label, value]]}] (the panel's categories; fontDetails: each font's file and whether its licence lets it be embedded)}",
  "type": "object"
}

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