Note kit command
table.read
Read a table
Answers one table (`table`, from 0) as its header, body rows, column alignment and lines; without `table` it answers how many tables the note has and where each is.
- Kit
- Note 0.3.0 (Markdown (.md))
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table | integer | no | The table's index in the note, from 0 (document order). |
Call through note_run
text
note_run {
"path": "<file>.md",
"steps": [{ "command": "table.read" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: table. note_run answers the step’s result in completed[i].result.
Result
Result JSON Schema
json
{
"description": "Without table: how many tables there are and where; with table: that table.",
"oneOf": [
{
"additionalProperties": false,
"properties": {
"list": {
"description": "Each table.",
"items": {
"additionalProperties": false,
"properties": {
"columns": {
"description": "Its columns (the header's cells).",
"type": "integer"
},
"line": {
"description": "Its first line, from 1.",
"type": "integer"
},
"rows": {
"description": "Its rows, the header row included.",
"type": "integer"
},
"table": {
"description": "The table's index in the note, from 0 (document order).",
"type": "integer"
}
},
"required": [
"columns",
"line",
"rows",
"table"
],
"type": "object"
},
"type": "array"
},
"tables": {
"description": "How many tables the note has.",
"type": "integer"
}
},
"required": [
"list",
"tables"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"align": {
"description": "Each column's alignment.",
"items": {
"description": "A column's alignment.",
"enum": [
"left",
"center",
"right",
"none"
],
"type": "string"
},
"type": "array"
},
"header": {
"description": "The header cells' text.",
"items": {
"type": "string"
},
"type": "array"
},
"lines": {
"description": "Its first and last line, from 1.",
"items": {
"type": "integer"
},
"type": "array"
},
"rows": {
"description": "The body rows, top to bottom (row 1 first).",
"items": {
"description": "A body row's cells.",
"items": {
"type": "string"
},
"type": "array"
},
"type": "array"
},
"table": {
"description": "The table's index in the note, from 0 (document order).",
"type": "integer"
}
},
"required": [
"align",
"header",
"lines",
"rows",
"table"
],
"type": "object"
}
]
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"table": {
"description": "The table's index in the note, from 0 (document order).",
"type": "integer"
}
},
"type": "object"
}Generated from kition-sdk packages/script/kits/note.ts and the kit itself (kition-note@69e14d9). As data: commands.jsonl.