@s-counago00/dotcat-parser
v0.0.1
Published
TypeScript parser for Spanish Cadastre .CAT fixed-width exchange files
Readme
dotcat-parser
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.
Local Spec
The official CAT format reference lives under docs/spec/.
Planned API
parseLine(line)
parseFile(path)
parseStream(stream)
validateFile(file)Streaming Usage
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.
Status
Pre-alpha. APIs and schemas are not stable yet.
License
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.
