[0.1 draft] [guide 15 · spec 15 pages]

guide/lines

System lines

Every line that starts with the prefix and a space is a system line: a keyword, then its content.

txtab

# column name=amount type=decimal unit=USD
  ^      ^
  |      keyword
  prefix
Keyword What it is Example
table Starts a table: row count, name, where the data is # table name=orders rows=1200
column One column's schema # column name=id type=long role=id
agg-<name> A pre-computed aggregate, one value per column # agg-sum ,,1050.50
meta-<key> File or table metadata # meta-source sales_db.orders
sql-pre-data / sql-post-data DDL to run before / after loading the data # sql-pre-data postgres CREATE TABLE orders (…)
sql-dql A query for provenance; never run # sql-dql postgres SELECT …
note A remark on a cell, row, column, table or the file # note key=17 col=amount text="Refund pending"
link A link on one cell # link key=17 col=invoice href="https://…"
chart A suggested chart # chart type=bar name=by_status x=status y=amount
-- A comment for humans # -- TODO: drop legacy statuses
  • Keywords are lowercase words joined by hyphens. The whole format uses hyphens, never underscores: agg-count-distinct, len-max, sql-pre-data.
  • Lines in a block can come in any order. A readable order inside a table: table, meta-*, column, chart, note/link, sql-*, agg-*.
  • Unknown keywords are skipped and kept. Your own keywords start with x-.

guide/lines.md on GitHub