SKIN
The SKIN TOTEM plugin provides:
/DATASET.TYPE ? QUERY
/AREA/FILE ? QUERY
/AREA/STORE ? QUERY
/AREA/GRAPH ? QUERY
/AREA/ ? QUERY
endpoints to render datasets, folders, graphs and client-side markdown where the optional TYPE:
view | help
specifies the rendering mode.
Manage
npm install @totemstan/skin # Install
npm run start [ ? | $ | ...] # Unit test
npm run verminor # Roll minor version
npm run vermajor # Roll major version
npm run redoc # Regen documentation
Usage
Acquire and optionally configure SKIN:
const SKIN = require("skin").config({
key: value, // set key
"key.key": value, // indexed set
"key.key.": value // indexed append
});
where configuration keys follow ENUMS deep copy conventions.
Program Reference
Open/Close
SKIN
Provides an endpoint to render DEBE notebooks, datasets, and engines using the (possibly dynamically generated) jade associated with the requested notebook/table/engine. Converts TOTEM markdown to html. This module documented in accordance with jsdoc.
Env Vars:
URL_REPO = URL to code repo
Requires: module:enums
, module:fs
, module:cluster
, module:jade@1.9.0
Author: ACMESDS
SKIN.areaRouters
Kind: static constant of SKIN
SKIN.typeRouters
Kind: static constant of SKIN
SKIN.lookups
Kind: static constant of SKIN
SKIN.blogCtx
Blogging context.
Kind: static constant of SKIN
SKIN.skinCtx
Kind: static constant of SKIN
SKIN.renderSkin(req, res)
Endpoint to render req.table using associated jade engine.
Kind: static method of SKIN
Param | Type | Description |
---|---|---|
req | Object |
Totem request |
res | function |
Totem response |
SKIN.skinContext(req, cb)
Callback cb with skinning context ctx for requested table.
Kind: static method of SKIN
Param | Type | Description |
---|---|---|
req | Object |
Totem request |
cb | function |
callback(ctx) |
SKIN.renderJade(jade, ctx, cb)
Render jade string to callback cb( err || html ) in a new context created for this request.
Kind: static method of SKIN
Param | Type | Description |
---|---|---|
jade | String |
contents to render |
ctx | Object |
skinning context |
cb | function |
callback(ctx) |
SKIN~sqls
Kind: inner constant of SKIN
SKIN~errors
Kind: inner constant of SKIN
SKIN~blog(ctx, src, rec, cb)
Converts markdown to html:
$VIEW{ SRC ? w=WIDTH & h=HEIGHT & x=KEY$INDEX & y=KEY$INDEX ... }
$embed{ QUERY }
${ KEY }
[ LINK || WIDTH,HEIGHT ] ( URL )
$$ inline TeX $$
n$$ newline TeX $$
a$$ AsciiMath $$
m$$ MathML $$
TeX := TeX || #VAR || VAR#KEY#KEY...
# SECTION
| GRID | GRID | ...
ESCAPE || $with || $for || $if:
CODE
Kind: inner method of SKIN
Param | Type | Description |
---|---|---|
ctx | Object |
initial blogging context |
src | String |
default source path |
rec | Object |
source record |
cb | function |
callback accepting the resulting html |
Contacting, Contributing, Following
Feel free to
- submit and status TOTEM issues
- contribute to TOTEM notebooks
- revise TOTEM requirements
- browse TOTEM holdings
- or follow TOTEM milestones
License
© 2012 ACMESDS