Home Reference Source Repository

Variable

Static Public Summary
public

Exposes assets communication methods

public

Translates a peritext bibType to a schema.org Type

public

Citation contextualizer that resolve sections data according to contextualization+settings params

public

cleanNaiveTree(params: Object, models: Object, callback: function(error: error, results: {errors: array, validTree: Object})): *

Resolves resource and metadata statements from a naive representation of a section

public

composeRenderedSections(sections: array, settings: Object, inputStyle: string, messages: array): Object: *

Resolves a sections' list against rendering settings by modifying contents, adding output-related pseudo-sections, and updating css styles

public

computeReferences(sections: array, settings: Object): array: *

Filter and order a list of resources against bibliography settings

public

concatTree(tree: Object, params: Object, callback: function(error: error, newTree: object)): *

Turns a fsTree into a dumTree, that is to say a tree which presents .bib resources and .md files contents concatenated by folder (according to inner 'include' statements and then automatically)

public

Exposes contents communication methods

public

contextualizeBlockDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle a block contextualization for dynamic outputs

public

contextualizeBlockDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle a block contextualization for dynamic outputs

public

contextualizeBlockDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle a block contextualization for dynamic outputs

public

contextualizeBlockDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle an block contextualization for dynamic outputs

public

contextualizeBlockDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle a block contextualization for dynamic outputs

public

contextualizeBlockDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle a block contextualization for dynamic outputs

public

contextualizeBlockStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle a block contextualization for static outputs

public

contextualizeBlockStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle a block contextualization for static outputs

public

contextualizeBlockStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle a block contextualization for static outputs

public

contextualizeBlockStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle a block contextualization for static outputs

public

contextualizeBlockStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle a block contextualization for static outputs

public

contextualizeBlockStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle a block contextualization for static outputs

public

contextualizeInlineDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle an inline contextualization for dynamic outputs

public

contextualizeInlineDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle an inline contextualization for dynamic outputs

public

contextualizeInlineDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle an inline contextualization for dynamic outputs

public

contextualizeInlineDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle an inline contextualization for dynamic outputs

public

contextualizeInlineDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle an inline contextualization for dynamic outputs

public

contextualizeInlineDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle an inline contextualization for dynamic outputs

public

contextualizeInlineStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle an inline contextualization for static outputs

public

contextualizeInlineStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle an inline contextualization for static outputs

public

contextualizeInlineStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle an inline contextualization for static outputs

public

contextualizeInlineStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle an inline contextualization for static outputs

public

contextualizeInlineStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle an inline contextualization for static outputs

public

contextualizeInlineStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: *

Handle an inline contextualization for static outputs

public

models of peritext contextualizers

public

createFromPath(requestParams: Object, callback: function(error: error, returnedPath: string)): *

Creates a file from a certain path and possibly some contents (Crud)

public

Exposes peritext default models for metadata, resources, contextualizers, and rendering settings

public

Exposes default language parameters for includes and templates

public

deleteFromPath(requestParams: Object, callback: function(error: error)): *

Deletes a file from a certain path and possibly some contents (cruD)

public

deleteMeta(metaList: array, domain: string, key: string): array: *

Delete a specific metadata prop

public

exportSectionToPdf(params: Object, assetsParams: Object, callback: function(err: error)): *

Exports a section representation to a pdf file

public

filterResources(resourcesList: array, key: string, value: string): array: *

Filter resources that have a specific value

public

findByMetadata(sections: array, domain: string, key: string): Object: *

Finds a specific section in a sections list through one of its metadata

public

generateOpenUrl(resource: Object): string: *

Generates an openUrl URI describing the resource, and aimed at being used in a ContextObjectInSpan (COinS)

public

getAssetUri(requestParams: Object, callback: function(error: error, finalPath: string)): *

Gets the absolute uri of an asset

public

getAssetUri(path: array | string, params: Object): function(connectorError: error, uri: string): *

Provides the URI of a specific assets file from connector

public

getContextualizerModel(bibType: string, contextualizerModels: Object): Object: *

Build a model object from a specific bibType, composing it according to its inheritance dependencies, from more general models to the specific bibType

public

getMetaValue(metaList: array, domain: string, key: string): string: *

Gets a value in metadata props array by its domain and key

public

getReader(params: Object): function(err: error, res: Object): *

Returns an appropriate connector function for directly reading a file from assets source

public

getResourceModel(bibType: string, resourceModels: Object): Object: *

Builds a model object from a specific bibType, composing it according to its inheritance dependencies, from more general models to the specific bibType

public

Glossary contextualizer that resolve sections data according to contextualization+settings params

public

hasMeta(metaList: array, domain: string, key: string): boolean: *

Checks if the value has a metadata property

public

hasResource(resourcesList: array, resource: Object): boolean: *

Checks if a resource list contains a resource, by citeKey

public

Image gallery contextualizer that resolve sections data according to contextualization+settings params

public

ISO 690 style citation - formatted in french language

public

jsToComponent(node: Object, index: number): ReactElement: *

Consumes a peritext content's pseudo-dom node (described as a js object) and returns a react component

public

markdownToJsAbstraction(section: Object, parameters: Object, callback: function(error: error, results: {errors: array, section: Object})): *

Parses markdown contents in order to update section data with new contents (as a pseudo-DOM nested javascript object representation), notes, contextualizers and contextualizations

public

Converts a bibtex metadata expression (e.g.

public

models of peritext sections metadata

public

Transforms 1, 2, 3 ordinally used number into a, b, c ordinally used letters

public

organizeTree(params: Object, callback: function(error: error, results: {errors: array, sections: array})): *

Organizes relations betwwen sections

public

parseBibAuthors(str: string): array: *

Parses a list of authors as they are formatted in bbiTeX statements

public

Parses a bibTeX-like contextualization statement given as string and returns an object

public

Parses bibTeX nested values inside a bibObject

public

parseBibTexStr(str: string): function(error: error, result: Object): *

Parses a bibTeX string and returns an object

public

parseMarkdown(str: string, expressions: Object, -: function(error: error, results: {extracted: array, cleanStr: string})): *

Parses markdown string for markdown files includes statements and inline resources descriptions

public

parseSection(params: Object, callback: function(error: error, sections: array)): *

Parses an fsTree representation and renders a list of sections to be used with peritext exporters or as is

public

parseTreeResources(dumbTree: Object, callback: function(error: error, dumbTree: Object)): *

Converts dumbTree resources representations (as string) to js objects - recursively do the same for tree's children

public

propagateData(params: Object, callback: function(error: error, result: {errors: array, sections: array})): *

Populate the metadatas of a list of sections, by applying propagation from parents or inbetween metadata values (e.g.

public

readFromPath(requestParams: Object, callback: function(error: error)): *

Reads a file from a certain path (cRud)

public

renderSection(params: Object, assetsParams: Object, rendererCallback: function(err: error, result: string)): *

Renders a section representation as a string representation of an html page

public

resolveBindings(contextualizer: object, section: object, models: object, callback: function(err: error, results: {errors: array, newSection: Object})): *

Resolves contextualizations' contextualizer and resource, verifying that contextualization will be possible

public

resolveContextualizationsImplementation(section: object, renderingMode: string, settings: object): Object: *

Resolves all the contextualizations of a section by updating its contents pseudo-DOM representation

public

resolveContextualizationsRelations(sections: array, settings: object): array: *

Resolves relations of recurrence, order, and similarity between contextualizations in a section

public

resolvePropAgainstType(prop: Object, valueType: string, model: Object): string | array | number | Object: *

Transforms a string value to a complex and type-compliant value, thanks to its model's type

public

resolveSectionAgainstModels(section: Object, models: Object, callback: function(err: error, result: {errors: array, section: Object})): *

Consumes and normalize the metadata of a section

public

resolveSettings(settings: Object, bibType: string, settingsModel: Object): Object: *

Populate rendering settings according to default bibtype-related settings

public

models of peritext resources

public

sameMetaScope(meta1: Object, meta1: Object): boolean: *

Checks if two metadata props have the same scope (domain and key)

public

models of possible peritext sections bibType and their inheritance rules

public

serializeBibTexObject(bibObject: object): function(error: error, bibStr: string): *

Serializes a javascript object representing a resource or a contextualizer, to a bibTeX-formatted string

public

serializeHtmlMeta(metadata: Object, template: string): string: *

Consumes a metadata object against an html metadata node template

public

serializePropAgainstType(prop: Object, valueType: string, model: Object): string: *

Transforms a (possibly not primitive : array, object, bibAuthor) value to a string-friendly value, thanks to its model's type

public

serializeSectionList(param: Object, callback: function(error: error, fsTree: Object)): *

Converts a sections' list to a fsTree representation of the resulting sourcedata

public

setMetaValue(metaList: array, domain: string, key: string, newValue: string): array: *

Sets a value in metadata props array after localized it by its domain and key

public

models of peritext (possible, and default) rendering settings

public

table: *

Table contextualizer that resolve sections data according to contextualization+settings params

public

Timeline contextualizer that resolve sections data according to contextualization+settings params

public

updateFromPath(requestParams: Object, callback: function(error: error)): *

Updates a file from a certain path and possibly some contents (crUd)

public

updateFromSource(params: Object, models: Object, parametesr: Object, callback: function(parsingErrors: error, results: Object)): *

public

updateToSource(params: Object, sections: array, models: Object, oldFsTree: Object, callback: function(serializingErrors: error, sections: array)): *

Serializes the representation of a series of peritext sections to an fsTree representation by "diffing" new fsTree with previous fsTree then makes a diff list with deep-diff then monitor source tree updating (with C.U.D.

public

validateResources(section: Object, models: Object, callback: function(err: null, output: Object)): *

Validates the resources of a section against resources models

public

webpage: *

Webpage contextualizer that resolve sections data according to contextualization+settings params

Static Public

public assetsController: * source

import {assetsController} from 'peritext/src/index.js'

Exposes assets communication methods

Properties:

NameTypeAttributeDescription
assetsController Object

public bibToSchema(bib: string): string: * source

Translates a peritext bibType to a schema.org Type

Return:

string

SchemaType - the corresponding SchemaType

public citation: * source

import {citation} from 'peritext/src/contextualizers/index.js'

Citation contextualizer that resolve sections data according to contextualization+settings params

public cleanNaiveTree(params: Object, models: Object, callback: function(error: error, results: {errors: array, validTree: Object})): * source

Resolves resource and metadata statements from a naive representation of a section

public composeRenderedSections(sections: array, settings: Object, inputStyle: string, messages: array): Object: * source

import {composeRenderedSections} from 'peritext/src/renderers/sharedStaticUtils/index.js'

Resolves a sections' list against rendering settings by modifying contents, adding output-related pseudo-sections, and updating css styles

Return:

Object

results - an object composed of an array of rendered sections and a string with the updated css styles

public computeReferences(sections: array, settings: Object): array: * source

import {computeReferences} from 'peritext/src/core/utils/referenceUtils/index.js'

Filter and order a list of resources against bibliography settings

Return:

array

references - the resulting list

public concatTree(tree: Object, params: Object, callback: function(error: error, newTree: object)): * source

Turns a fsTree into a dumTree, that is to say a tree which presents .bib resources and .md files contents concatenated by folder (according to inner 'include' statements and then automatically)

public contentsController: * source

import {contentsController} from 'peritext/src/index.js'

Exposes contents communication methods

Properties:

NameTypeAttributeDescription
contentsController Object

public contextualizeBlockDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeBlockDynamic} from 'peritext/src/contextualizers/glossary/index.js'

Handle a block contextualization for dynamic outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeBlockDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeBlockDynamic} from 'peritext/src/contextualizers/timeline/index.js'

Handle a block contextualization for dynamic outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeBlockDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeBlockDynamic} from 'peritext/src/contextualizers/imagegallery/index.js'

Handle a block contextualization for dynamic outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeBlockDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeBlockDynamic} from 'peritext/src/contextualizers/citation/index.js'

Handle an block contextualization for dynamic outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeBlockDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeBlockDynamic} from 'peritext/src/contextualizers/table/index.js'

Handle a block contextualization for dynamic outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeBlockDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeBlockDynamic} from 'peritext/src/contextualizers/webpage/index.js'

Handle a block contextualization for dynamic outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeBlockStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeBlockStatic} from 'peritext/src/contextualizers/timeline/index.js'

Handle a block contextualization for static outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeBlockStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeBlockStatic} from 'peritext/src/contextualizers/citation/index.js'

Handle a block contextualization for static outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeBlockStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeBlockStatic} from 'peritext/src/contextualizers/webpage/index.js'

Handle a block contextualization for static outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeBlockStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeBlockStatic} from 'peritext/src/contextualizers/glossary/index.js'

Handle a block contextualization for static outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeBlockStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeBlockStatic} from 'peritext/src/contextualizers/table/index.js'

Handle a block contextualization for static outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeBlockStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeBlockStatic} from 'peritext/src/contextualizers/imagegallery/index.js'

Handle a block contextualization for static outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeInlineDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeInlineDynamic} from 'peritext/src/contextualizers/imagegallery/index.js'

Handle an inline contextualization for dynamic outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeInlineDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeInlineDynamic} from 'peritext/src/contextualizers/timeline/index.js'

Handle an inline contextualization for dynamic outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeInlineDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeInlineDynamic} from 'peritext/src/contextualizers/table/index.js'

Handle an inline contextualization for dynamic outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeInlineDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeInlineDynamic} from 'peritext/src/contextualizers/citation/index.js'

Handle an inline contextualization for dynamic outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeInlineDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeInlineDynamic} from 'peritext/src/contextualizers/webpage/index.js'

Handle an inline contextualization for dynamic outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeInlineDynamic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeInlineDynamic} from 'peritext/src/contextualizers/glossary/index.js'

Handle an inline contextualization for dynamic outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeInlineStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeInlineStatic} from 'peritext/src/contextualizers/imagegallery/index.js'

Handle an inline contextualization for static outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeInlineStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeInlineStatic} from 'peritext/src/contextualizers/webpage/index.js'

Handle an inline contextualization for static outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeInlineStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeInlineStatic} from 'peritext/src/contextualizers/glossary/index.js'

Handle an inline contextualization for static outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeInlineStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeInlineStatic} from 'peritext/src/contextualizers/citation/index.js'

Handle an inline contextualization for static outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeInlineStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeInlineStatic} from 'peritext/src/contextualizers/timeline/index.js'

Handle an inline contextualization for static outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizeInlineStatic(inputSection: Object, inputContextualization: Object, settings: Object): Object: * source

import {contextualizeInlineStatic} from 'peritext/src/contextualizers/table/index.js'

Handle an inline contextualization for static outputs

Return:

Object

newSection - the updated representation of the peritext section in which the contextualization was made

public contextualizerModels: * source

import {contextualizerModels} from 'peritext/src/core/models/index.js'

models of peritext contextualizers

public createFromPath(requestParams: Object, callback: function(error: error, returnedPath: string)): * source

import {createFromPath} from 'peritext/src/connectors/filesystem/index.js'

Creates a file from a certain path and possibly some contents (Crud)

public defaultModels: * source

import {defaultModels} from 'peritext/src/index.js'

Exposes peritext default models for metadata, resources, contextualizers, and rendering settings

Properties:

NameTypeAttributeDescription
defaultModels Object

public defaultParameters: * source

import {defaultParameters} from 'peritext/src/index.js'

Exposes default language parameters for includes and templates

Properties:

NameTypeAttributeDescription
defaultParameters Object

public deleteFromPath(requestParams: Object, callback: function(error: error)): * source

import {deleteFromPath} from 'peritext/src/connectors/filesystem/index.js'

Deletes a file from a certain path and possibly some contents (cruD)

public deleteMeta(metaList: array, domain: string, key: string): array: * source

Delete a specific metadata prop

Return:

array

updatedMetaList - the new metadata list, without the deleted prop

public exportSectionToPdf(params: Object, assetsParams: Object, callback: function(err: error)): * source

import {exportSectionToPdf} from 'peritext/src/exporters/pdfExporter/index.js'

Exports a section representation to a pdf file

public filterResources(resourcesList: array, key: string, value: string): array: * source

import {filterResources} from 'peritext/src/core/utils/sectionUtils/index.js'

Filter resources that have a specific value

Return:

array

updatedResourceList - the filtered resources list

public findByMetadata(sections: array, domain: string, key: string): Object: * source

import {findByMetadata} from 'peritext/src/core/utils/sectionUtils/index.js'

Finds a specific section in a sections list through one of its metadata

Return:

Object

section - the resulting section

public generateOpenUrl(resource: Object): string: * source

import {generateOpenUrl} from 'peritext/src/core/utils/microDataUtils/index.js'

Generates an openUrl URI describing the resource, and aimed at being used in a ContextObjectInSpan (COinS)

Return:

string

uri - the uri describing the resource

public getAssetUri(requestParams: Object, callback: function(error: error, finalPath: string)): * source

Gets the absolute uri of an asset

TODO:

  • question : should it check for resource availability ?

public getAssetUri(path: array | string, params: Object): function(connectorError: error, uri: string): * source

Provides the URI of a specific assets file from connector

Return:

function(connectorError: error, uri: string)

callback - possible errors and the uri

public getContextualizerModel(bibType: string, contextualizerModels: Object): Object: * source

import {getContextualizerModel} from 'peritext/src/core/utils/modelUtils/index.js'

Build a model object from a specific bibType, composing it according to its inheritance dependencies, from more general models to the specific bibType

Return:

Object

model - the model corresponding to the input bibType

public getMetaValue(metaList: array, domain: string, key: string): string: * source

Gets a value in metadata props array by its domain and key

Return:

string

value - the value

public getReader(params: Object): function(err: error, res: Object): * source

Returns an appropriate connector function for directly reading a file from assets source

Return:

function(err: error, res: Object)

readFunction - the connector function for directly reading a file contents from assets source

public getResourceModel(bibType: string, resourceModels: Object): Object: * source

import {getResourceModel} from 'peritext/src/core/utils/modelUtils/index.js'

Builds a model object from a specific bibType, composing it according to its inheritance dependencies, from more general models to the specific bibType

Return:

Object

model - the model corresponding to the input bibType

public glossary: * source

import {glossary} from 'peritext/src/contextualizers/index.js'

Glossary contextualizer that resolve sections data according to contextualization+settings params

public hasMeta(metaList: array, domain: string, key: string): boolean: * source

Checks if the value has a metadata property

Return:

boolean

hasMeta - whether the prop is there

public hasResource(resourcesList: array, resource: Object): boolean: * source

Checks if a resource list contains a resource, by citeKey

Return:

boolean

hasResource - whether resource is present in the list

public imagegallery: * source

import {imagegallery} from 'peritext/src/contextualizers/index.js'

Image gallery contextualizer that resolve sections data according to contextualization+settings params

public iso690fr: * source

import {iso690fr} from 'peritext/src/referencers/index.js'

ISO 690 style citation - formatted in french language

TODO:

  • : try to internationalize it from scratch in order to have language-agnostic citation modules ?

public jsToComponent(node: Object, index: number): ReactElement: * source

Consumes a peritext content's pseudo-dom node (described as a js object) and returns a react component

Return:

ReactElement

markup describing the node

public markdownToJsAbstraction(section: Object, parameters: Object, callback: function(error: error, results: {errors: array, section: Object})): * source

import {markdownToJsAbstraction} from 'peritext/src/core/converters/markdownConverter/index.js'

Parses markdown contents in order to update section data with new contents (as a pseudo-DOM nested javascript object representation), notes, contextualizers and contextualizations

public metaStringToCouple(str: string): Object: * source

import {metaStringToCouple} from 'peritext/src/core/utils/sectionUtils/index.js'

Converts a bibtex metadata expression (e.g. "title", "twitter_twitter") to an object prop

Return:

Object

metadata - the metadata prop object, without value

public metadataModels: * source

import {metadataModels} from 'peritext/src/core/models/index.js'

models of peritext sections metadata

public numbersToLetters(num: number): string: * source

Transforms 1, 2, 3 ordinally used number into a, b, c ordinally used letters

Return:

string

letter - the output letter

public organizeTree(params: Object, callback: function(error: error, results: {errors: array, sections: array})): * source

Organizes relations betwwen sections

public parseBibAuthors(str: string): array: * source

Parses a list of authors as they are formatted in bbiTeX statements

Return:

array

authors - the javascript representation of authors as an array

public parseBibContextualization(inputStr: string): Object: * source

import {parseBibContextualization} from 'peritext/src/core/converters/bibTexConverter/index.js'

Parses a bibTeX-like contextualization statement given as string and returns an object

Return:

Object

contextualization - the contextualization object

public parseBibNestedValues(bibObject: Object): Object: * source

import {parseBibNestedValues} from 'peritext/src/core/converters/bibTexConverter/index.js'

Parses bibTeX nested values inside a bibObject

Return:

Object

newObject - the resulting updated object

public parseBibTexStr(str: string): function(error: error, result: Object): * source

Parses a bibTeX string and returns an object

Return:

function(error: error, result: Object)

callback - error and the resulting object

public parseMarkdown(str: string, expressions: Object, -: function(error: error, results: {extracted: array, cleanStr: string})): * source

Parses markdown string for markdown files includes statements and inline resources descriptions

public parseSection(params: Object, callback: function(error: error, sections: array)): * source

Parses an fsTree representation and renders a list of sections to be used with peritext exporters or as is

public parseTreeResources(dumbTree: Object, callback: function(error: error, dumbTree: Object)): * source

Converts dumbTree resources representations (as string) to js objects - recursively do the same for tree's children

public propagateData(params: Object, callback: function(error: error, result: {errors: array, sections: array})): * source

Populate the metadatas of a list of sections, by applying propagation from parents or inbetween metadata values (e.g. : from twitter domain to open graph domain)

public readFromPath(requestParams: Object, callback: function(error: error)): * source

import {readFromPath} from 'peritext/src/connectors/filesystem/index.js'

Reads a file from a certain path (cRud)

public renderSection(params: Object, assetsParams: Object, rendererCallback: function(err: error, result: string)): * source

Renders a section representation as a string representation of an html page

public resolveBindings(contextualizer: object, section: object, models: object, callback: function(err: error, results: {errors: array, newSection: Object})): * source

Resolves contextualizations' contextualizer and resource, verifying that contextualization will be possible

public resolveContextualizationsImplementation(section: object, renderingMode: string, settings: object): Object: * source

import {resolveContextualizationsImplementation} from 'peritext/src/core/resolvers/resolveContextualizations/index.js'

Resolves all the contextualizations of a section by updating its contents pseudo-DOM representation

Return:

Object

newSection - the updated section

public resolveContextualizationsRelations(sections: array, settings: object): array: * source

import {resolveContextualizationsRelations} from 'peritext/src/core/resolvers/resolveContextualizations/index.js'

Resolves relations of recurrence, order, and similarity between contextualizations in a section

Return:

array

newSections - the udpated sections

public resolvePropAgainstType(prop: Object, valueType: string, model: Object): string | array | number | Object: * source

import {resolvePropAgainstType} from 'peritext/src/core/utils/modelUtils/index.js'

Transforms a string value to a complex and type-compliant value, thanks to its model's type

Return:

string | array | number | Object

newValue - the resolved value

public resolveSectionAgainstModels(section: Object, models: Object, callback: function(err: error, result: {errors: array, section: Object})): * source

import {resolveSectionAgainstModels} from 'peritext/src/core/resolvers/resolveSectionAgainstModels/index.js'

Consumes and normalize the metadata of a section

public resolveSettings(settings: Object, bibType: string, settingsModel: Object): Object: * source

import {resolveSettings} from 'peritext/src/core/utils/modelUtils/index.js'

Populate rendering settings according to default bibtype-related settings

Return:

Object

newSettings - the populated settings

public resourceModels: * source

import {resourceModels} from 'peritext/src/core/models/index.js'

models of peritext resources

public sameMetaScope(meta1: Object, meta1: Object): boolean: * source

import {sameMetaScope} from 'peritext/src/core/utils/sectionUtils/index.js'

Checks if two metadata props have the same scope (domain and key)

Return:

boolean

sameScope - whether the two props have the same scope

public sectionTypeModels: * source

import {sectionTypeModels} from 'peritext/src/core/models/index.js'

models of possible peritext sections bibType and their inheritance rules

public serializeBibTexObject(bibObject: object): function(error: error, bibStr: string): * source

import {serializeBibTexObject} from 'peritext/src/core/converters/bibTexConverter/index.js'

Serializes a javascript object representing a resource or a contextualizer, to a bibTeX-formatted string

Return:

function(error: error, bibStr: string)

callback - error and the bibTeX mention as a string

public serializeHtmlMeta(metadata: Object, template: string): string: * source

Consumes a metadata object against an html metadata node template

Return:

string

htmlMeta - the representation of the html metadata as string

public serializePropAgainstType(prop: Object, valueType: string, model: Object): string: * source

import {serializePropAgainstType} from 'peritext/src/core/utils/modelUtils/index.js'

Transforms a (possibly not primitive : array, object, bibAuthor) value to a string-friendly value, thanks to its model's type

Return:

string

newValue - the serialized value

public serializeSectionList(param: Object, callback: function(error: error, fsTree: Object)): * source

import {serializeSectionList} from 'peritext/src/core/converters/sectionConverter/index.js'

Converts a sections' list to a fsTree representation of the resulting sourcedata

public setMetaValue(metaList: array, domain: string, key: string, newValue: string): array: * source

Sets a value in metadata props array after localized it by its domain and key

Return:

array

newlist - the updated list

public settingsModels: * source

import {settingsModels} from 'peritext/src/core/models/index.js'

models of peritext (possible, and default) rendering settings

public table: * source

Table contextualizer that resolve sections data according to contextualization+settings params

public timeline: * source

import {timeline} from 'peritext/src/contextualizers/index.js'

Timeline contextualizer that resolve sections data according to contextualization+settings params

public updateFromPath(requestParams: Object, callback: function(error: error)): * source

import {updateFromPath} from 'peritext/src/connectors/filesystem/index.js'

Updates a file from a certain path and possibly some contents (crUd)

public updateFromSource(params: Object, models: Object, parametesr: Object, callback: function(parsingErrors: error, results: Object)): * source

public updateToSource(params: Object, sections: array, models: Object, oldFsTree: Object, callback: function(serializingErrors: error, sections: array)): * source

Serializes the representation of a series of peritext sections to an fsTree representation by "diffing" new fsTree with previous fsTree then makes a diff list with deep-diff then monitor source tree updating (with C.U.D. operations) accordingly

public validateResources(section: Object, models: Object, callback: function(err: null, output: Object)): * source

Validates the resources of a section against resources models

public webpage: * source

Webpage contextualizer that resolve sections data according to contextualization+settings params