DEBE is a TOTEM plugin that provides notebook agents at
/NOTEBOOK.TYPE ? QUERY
where the notebook TYPE:
view | run | brief | browse
exe | tou | md | status | suitors | usage | EVENTS
import | export | publish | mod
js | py | m | jx | jade | R
renders, runs, probes, manages or licenses a notebook.
DEBE also provides the following info agents at:
search | searches | words
wms | wfs | tips | DG | HYDRA | NCL | ISPY | ESS | MIDB
uploads | stores | ingest
follow | proctor | likeus
notebooks
decode | config | info
ESC
matlab
npm install @totemorg/debe # install extended service
npm update
npm run start [ ? | $ | ...] # Unit test
npm run verminor # Roll minor version
npm run vermajor # Roll major version
npm run redoc # Regen documentation
npm run pubminor # republish as minor version
npm run pubmajor # republish as major version
npm run startdbs # Start required database servers
npm run setprot # Configure for protected mode
npm run setdebug # Configure for debugging mode
npm run setoper # Configure for operational mode
npm run setprod # Configure for production mode
npm run genio # Generate totem-man.github.io from jades/totemblog
npm run raster --in=src --out=tar # Rasterize source url into a target file
Acquire, optionally configure and start a DEBE server:
import * as DEBE from "@totemorg/debe";
DEBE.config({
key: value, // set key
"key.key": value, // indexed set
"key.key.": value // indexed append
}, sql => {
console.log( sql ? "look mom - Im running!" : "something evil is lurking" );
});
where configuration keys follow ENUMS deep copy conventions.
Open/Close
## Modules- DEBE
-
Provides notebook interface to the barebone TOTEM web service. This module documented in accordance with jsdoc.
- String
- Array
- Data
Provides notebook interface to the barebone TOTEM web service. This module documented in accordance with jsdoc.
Requires: module:totem
, module:atomic
, module:man
, module:enums
, module:reader
, module:skin
, module:crypto
, module:child_process
, module:fs
, module:stream
, module:cluster
, module:repl
, module:i18n-abide
, module:optimist
, module:tokml
, module:officegen
Author: ACMESDS
Example
// npm test D2
// Start challenge-protected server with additional node Routers.
config({
riddles: 10,
"nodeRouters.": {
wfs: function (req,res) {
res("here i go again");
Fetch(WFS_TEST, data => {
_Trace(data);
});
}
}
}, sql => {
_Trace( "This bad boy in an encrypted service with a database and has an /wfs endpoint" );
});
Example
// npm test D3
// Start server using default config
config({
}, sql => {
_Trace( "Stateful network flow manger started" );
});
Example
// npm test D4
// Start server and prep file system
function readFile(sql, path, cb) {
sql.beginBulk();
readers.xls( "./config.stores/test.xls", rec => {
if (rec)
cb(rec,sql);
else
sql.endBulk();
});
}
config({
}, sql => {
var recs = 0, now = new Date();
readFile( sql, "./config.stores/test.xls", (rec,sql) => {
if ( ++recs<5 ) {
var
doc = (rec.doc || rec.Doc || rec.report || rec.Report || "")
.replace( /\n/g, " ")
.replace( /\&\#10;/g, " "),
docs = doc
.match( /(.*)TEXT:(.*)COMMENTS:(.*)/ ) || [ "", "", doc, ""],
text = "";
docs[2].replace( /\. /g, "\n").replace( /^[0-9 ]*\. \(.*\) (.*)/gm, (str,txt) => text += txt + ". " );
sql.query("INSERT INTO openv.docs SET ?", {
Reported: rec.reported || rec.Reported || now,
Name: rec.reportID || ("tbd-"+recs),
Pipe: JSON.stringify( text )
}, err => _Trace("add", err) );
}
});
});
Kind: inner method of String
Kind: inner method of String
Merge changes when doing table deltas from their baseline versions.
Kind: inner method of Array
Param | Type | Description |
---|---|---|
Recs | Array |
Source records to merge into this records |
idx | String |
Key name to use for detecting record changes |
Returns a schema of the array using the specified src path.
Kind: inner method of Array
Param | Type | Description |
---|---|---|
src | String |
path to source |
Returns a tree = {name,weight,nodes} from records having been sorted on keys=[key,...]
Kind: inner method of Array
Param | Type | Description |
---|---|---|
idx | Number |
starting index (0 on first call) |
kids | Number |
number of leafs following starting index (this.length on first call) |
level | Number |
current depth (0 on first call) |
keys | Array |
pivot keys |
wt | String |
key name that contains leaf weight (defaults to "size") |
-
Data
- static
-
inner
- ~defaultDocs
- ~licenseOnDownload
-
~probono :
boolean
-
~isSpawned :
Boolean
-
~soapRouters :
Object
- ~_Notebooks
- ~_Errors
- ~_SQLs
- ~_$lib
- ~_Paths
- ~config(sql, init)
- ~SOAPsession(req, res, proxy)
- ~linkInspect()
- ~publishNotebooks()
- ~licenseCode()
- ~sendMail()
- ~genDoc(recs, req, res)
- ~getEngine()
- ~fileUpload()
- ~savePage()
- ~statusNotebook()
- ~matchNotebook()
- ~docNotebook()
- ~trackNotebook()
- ~getNotebook()
- ~usersNotebook(req, res)
- ~exportNotebook()
- ~importNotebook()
- ~wikiNotebook()
- ~publishNotebook()
- ~extendNotebook()
- ~retractNotebook()
- ~helpNotebook()
- ~getCert(req, res)
Watchdogs {name: dog(sql, lims), ... } run at intervals dog.cycle seconds usings its dog.trace, dog.parms, sql connector and threshold parameters.
Kind: static constant of Data
Cfg: Object
Site skinning context
Kind: static constant of Data
Data filters:
(recs,req,res) => { ... }
convert the recs list provided on the current req request and uses the res responder to supply the filtered results.
Kind: static constant of Data
Param | Type | Description |
---|---|---|
recs | Array |
Records to filter |
req | Object |
Totem session request |
res | function |
Totem session response |
Default doc for reserved notebook keys
Kind: inner property of Data
Kind: inner property of Data
Enable to give-away plugin services
Kind: inner property of Data
Enabled when this is child server spawned by a master server
Kind: inner property of Data
Reserved for soap interfaces
Kind: inner property of Data
Kind: inner constant of Data
Client error messages
Kind: inner constant of Data
Kind: static property of _Errors
Kind: static property of _Errors
Kind: static property of _Errors
Kind: static property of _Errors
Kind: static property of _Errors
Kind: static property of _Errors
Kind: static property of _Errors
Kind: static property of _Errors
Kind: static property of _Errors
Kind: static property of _Errors
Kind: static property of _Errors
Kind: static property of _Errors
Kind: static property of _Errors
Kind: static property of _Errors
Kind: inner constant of Data
Kind: inner constant of Data
See debe
Kind: static property of _$lib
See debe
Kind: static property of _$lib
See debe
Kind: static property of _$lib
See jsdb
Kind: static property of _$lib
See jsdb
Kind: static property of _$lib
Kind: static method of _$lib
Kind: static method of _$lib
Kind: static method of _$lib
Kind: inner constant of Data
Configure DEBE on startup.
Kind: inner method of Data
Param | Type | Description |
---|---|---|
sql | Object |
MySQL connector |
init | function |
callback(sql) when service init completed |
Process a SOAP session peer-to-peer request. Currently customized for Hydra-peer and could/should be revised to support more generic peer-to-peer soapRouters interfaces.
Kind: inner method of Data
Param | Type | Description |
---|---|---|
req | Object |
HTTP request |
res | Object |
HTTP response |
proxy | function |
Name of APP proxy function to handle this session. |
Inspect doc - kludge i/f to support nlp project
Kind: inner method of Data
Kind: inner method of Data
License notebook engine code.
Kind: inner method of Data
Kind: inner method of Data
Convert records to requested req.type office file.
Kind: inner method of Data
Param | Type | Description |
---|---|---|
recs | Array |
list of records to be converted |
req | Object |
Totem session request |
res | function |
Totem session response |
Kind: inner method of Data
Kind: inner method of Data
Kind: inner method of Data
Kind: inner method of Data
Kind: inner method of Data
Kind: inner method of Data
Kind: inner method of Data
Return a watermarked engine to a registered notebook.
Kind: inner method of Data
Endpoint to return users of a requested notebook.
Kind: inner method of Data
Param | Type | Description |
---|---|---|
req | Object |
http request |
res | function |
Totem session response callback |
Kind: inner method of Data
Kind: inner method of Data
Kind: inner method of Data
Kind: inner method of Data
Kind: inner method of Data
Kind: inner method of Data
Kind: inner method of Data
Create/return public-private cert.
Kind: inner method of Data
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
Feel free to
- submit and status TOTEM issues
- contribute to TOTEM notebooks
- revise TOTEM requirements
- browse TOTEM holdings
- or follow TOTEM milestones
© 2012 ACMESDS