Old version of Adamocomp.
Go to file
2020-05-28 00:32:31 -04:00
test init 2020-05-21 08:08:44 -04:00
.gitignore Added linter file to git ignore. 2020-05-21 08:53:20 -04:00
broker.sh Added a bunch of new gitlab features. 2020-05-28 00:32:31 -04:00
completions.sh Moved filename of completions script and added another remote function. 2020-05-26 19:26:00 -04:00
data-tool.js init 2020-05-21 08:08:44 -04:00
data.json Added a bunch of new gitlab features. 2020-05-28 00:32:31 -04:00
package.json init 2020-05-21 08:08:44 -04:00
parser.js init 2020-05-21 08:08:44 -04:00
README.md Update README.md 2020-05-21 12:17:47 +00:00

Adamocomp

The adamocomp is an automaton worker that is able to fuzzy-parse mixed and unorganized data in order to perform local and remote operations across very flexible host clusterings. Its primary purpose is to handle complicated operations that must be done precisely the same way across multiple systems. But in reality it assists me in virtually all of my system operations tasks.

Adamocomp Data Parser

This library provides methods to interpret the adamocomp data file.

Example Usage

const Parser = require('adamocomp/parser.js');

var parser = new Parser();

parser.get.data('gitlab repo').then(function(data){
 // "data" contains all data for the gitlab deal
})

parser.get_formatted.data('gitlab repo').then(function(printable){
   // Standard output as stringified json.
   console.log(printable)
})

// parser.get_formatted.root('gitlab').then(function(str){
//   console.log(str)
// }
// Output below
node data_tool.js path "gitlab"
# ["gitlab"]

Constructor Options

  • new Parser({options})
property type description default
path string Path to data file ${program_root}/data.json

Methods

get.file()

Type: async

Params: none

Returns: an object literal of the data file.

parser.get.file().then(function(file){
   // 'file' is the entire data file
})

get.data(string)

Type: async

param type description
1 string search string

Returns: data tree underneath node corresponding to search string, if found, otherwise null.

parser.get.data(str).then(function(data){
   console.log(JSON.stringify(data));
})

get.root(string)

Type: async

param type description
1 string search string

Returns: array of keys (directories) leading to deal, if found, or an empty array.

parser.get.root(str).then(function(nodes){
   console.log(locations);
   // ['gitlab']
})

get.list()

Type: async

Params: none

Returns: array of all deployments in the environment.

parser.get.list().then(function(deployments){
   console.log(location);
   // ['gitlab', 'factorio/clusterio_host', 'factorio/factorio_host', etc.]
})

Running Tests

npm test