Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Metatab-JS

A Metatab parser for javascript. See http://metatab.org for an overview of the system.

The module is developed in node, but is intended to also run in Google Script and browsers. More developement need to be done, but most of it would involved changes to generateRowsSync and generateRows in generaterows.js.

Note that the parsing is synchronous, because Declare terms, which reference other files, must be fully processed before any following terms can be processed. There may be a way to make all IO asynchronous, but it would probably involve a significant change in structure.

Install

Install the development version from Github.

$ npm install CivicKnowledge/metatab-js

Library

To produce JSON of a metatab file, given a file system path or URL:

var ti = new Metatab.TermInterpreter(urlOrFilePath);
var json = JSON.stringify(ti.run().toDict());

Command line

When the module is installed with npm, it also creates an executable metatab-js, which can parse files from the shell:

$ metatab-js  https://raw.githubusercontent.com/CivicKnowledge/metatab-py/master/test-data/children.csv

The metatab-js program is very simple. For a more complete, robust command line parser, install the python module and run the metatab program.

About

Metatab parser for javascript. http://metatab.org

Resources

Releases

No releases published

Packages

No packages published