CSV tabular metadata

Read a delimited text file into a folio-tabular-csvw/v1 record: one table, its columns and their CSVW datatypes, each measured or explicitly undetermined. Routing is by content, never by extension: the first rows must agree on one field count of two or more, under exactly one of , ; TAB |. A CSV’s fac:anchor sheet and cell are a determined null. Governed by the tabular-metadata skill.

Skills it satisfies

A skill states the capability; this Tool is one way to exercise it. Each skill’s declared input and output contract follows, where it has one.

tabular-metadata

Extract tabular metadata from a CSV or spreadsheet as CSVW — tables, rows, headers, columns, datatypes and location on sheet — recording every field as determined or explicitly undetermined. Read before touching a tabular ingest arm, adding a format, or deciding what a sheet is in the graph.

Source: folio-assistant-core/skills/library/ingestion/tabular-metadata.md.

Also satisfied by: tabular-xlsx.

The skill declares no I/O contract (schemas/skills/tabular-metadata/{input,output}.schema.json).

Inputs and outputs

Each port names a shared type by IRI, so two Tools for one skill can be checked for interchangeability.

porttyperequireddescriptionconstraint
infileDelimitedTextPathyesPath to the delimited text file.string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A repository path to a delimited text (CSV or TSV) file.
indoc-idDocIdThe record’s doc_id. Default: the file name without its extension.string · pattern ^[A-Za-z0-9][A-Za-z0-9._-]*$ · A library document id, e.g. WPR-RDO-2020-003-eng
inoutRepoPathWhere to write tabular.csvw.json. Default: stdout.string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments.
outrecordTextA folio-tabular-csvw/v1 document. Exit 2 when the file is not shown to be a table.string · A short single-line human string. Not admissible as a command-line argument.

Processes and tasks

No process step names a skill this Tool satisfies.

How it is deployed and reached

  • Command line. From the repository root: bun run folio-assistant-core/scripts/tabular-csv.ts.
  • GitHub Actions. No workflow in this checkout runs its command.

As an API: its operation in the OpenAPI document and the MCP tool list of its layer.

installnone
runtimebun
networkno

What it is made of

Linked data

The Tool is published as its own JSON-LD document at its IRI, https://litlfred.github.io/folio-assistant/folio-assistant-core/tools/tabular-csv.jsonld, partOf its layer’s document. The node below is the definition this page was drawn from, and is embedded in the page as application/ld+json.

{
  "@context": "https://litlfred.github.io/folio-assistant/folio-assistant-core/folio-assistant-core.context.jsonld",
  "@id": "https://litlfred.github.io/folio-assistant/folio-assistant-core/tools/tabular-csv.jsonld",
  "@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
  "partOf": "https://litlfred.github.io/folio-assistant/folio-assistant-core/folio-assistant-core.jsonld",
  "name": "tabular-csv",
  "title": "CSV tabular metadata",
  "description": "Read a delimited text file into a `folio-tabular-csvw/v1` record: one table, its columns and their CSVW datatypes, each measured or explicitly undetermined. Routing is by content, never by extension: the first rows must agree on one field count of two or more, under exactly one of `,` `;` TAB `|`. A CSV's `fac:anchor` sheet and cell are a determined null. Governed by the `tabular-metadata` skill.",
  "install": {
    "none": true
  },
  "invoke": {
    "shell": "bun run folio-assistant-core/scripts/tabular-csv.ts"
  },
  "io": {
    "inputs": [
      {
        "name": "file",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/DelimitedTextPath",
        "description": "Path to the delimited text file.",
        "required": true,
        "arg": {
          "positional": 0
        }
      },
      {
        "name": "doc-id",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/DocId",
        "description": "The record's `doc_id`. Default: the file name without its extension.",
        "required": false,
        "arg": {
          "flag": "--doc-id"
        }
      },
      {
        "name": "out",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "Where to write `tabular.csvw.json`. Default: stdout.",
        "required": false,
        "arg": {
          "flag": "--out"
        }
      }
    ],
    "outputs": [
      {
        "name": "record",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Text",
        "description": "A `folio-tabular-csvw/v1` document. Exit 2 when the file is not shown to be a table."
      }
    ]
  },
  "satisfies": [
    "tabular-metadata"
  ],
  "requirements": {
    "runtime": [
      "bun"
    ],
    "network": false
  }
}

folio-assistant — code under the Apache License 2.0, documentation under CC BY 3.0. Generated schema and API references are rebuilt from source on every push to main.

deployed dev