TypeScript library for parsing Spanish Cadastre .CAT fixed-width exchange files.
This project is just starting. The current focus is:
- keeping a local copy of the official CAT format specification;
- defining machine-readable record schemas;
- building a streaming parser for 1000-character fixed-width records;
- exposing JSON/NDJSON/CSV-friendly outputs.
See SPEC.md for the first implementation target.
The official CAT format reference lives under docs/spec/.
parseLine(line)
parseFile(path)
parseStream(stream)
validateFile(file)import { parseStream } from "dotcat-parser";
const stream = Bun.file("15001U_23012026.CAT").stream();
for await (const record of parseStream(stream)) {
console.log(record.type, record.name);
}parseStream reads the file sequentially and yields one parsed CAT record at a
time, so callers do not need to load the whole file into memory.
Pre-alpha. APIs and schemas are not stable yet.
Source code is licensed under AGPL-3.0-or-later.
This license applies to the code in this repository. It does not grant rights to private datasets, production databases, API credentials, hosted services, domains, trademarks, logos, or commercial agreements.