/ac-tools

small library to parse and modify Adlib tagged files for import into Axiell applications

Primary LanguageTypeScriptMIT LicenseMIT

Test & Deploy codecov npm version

Axiell Data Tools

This small library was built to parse and modify Adlib tagged files for import into Axiell applications through the Axiell Designer

It is provided as is, and in no way endorsed or maintained by Axiell ALM

Usage

Sample workflow to import a folder of CSVs and render them as a tagged Adlib file.

const actools = require("@nondef/ac-tools")
const fs = require('fs');

const dataFolder = './datain/';
const import_set = new actools.AdlibRecordSet("importset")

fs.readdirSync(dataFolder).forEach(file => {
    //loads the CSV as a set using the first row for column heading
    import_set.loadSetFromCSV(`${dataFolder}${file}`, null, ";");
});

import_set.set.forEach((rec) => {
  //some record manipulations
})


fs.writeFileSync("./dataout/importset.dat", import_set.jsonToAdlibDat(["IN", "bt"]))

For details see the documentation

Building

npm install     # Installs dependencies for building the project
npm build     # builds to ./lib
npm doccument # builds the documentation to /docs