jasy.script.api package

Submodules

jasy.script.api.Comment module

class jasy.script.api.Comment.Comment(text, context=None, lineNo=0, indent='', fileId=None)[source]

Bases: object

Comment class is attached to parsed nodes and used to store all comment related information.

The class supports a new Markdown and TomDoc inspired dialect to make developers life easier and work less repeative.

context = None
getHtml(highlight=True)[source]

Returns the comment text converted to HTML.

Parameters:highlight (bool) – Whether to highlight the code
getTags()[source]
hasContent()[source]
hasTag(name)[source]
params = None
returns = None
tags = None
text = None
type = None
exception jasy.script.api.Comment.CommentException(message, lineNo=0)[source]

Bases: Exception

Thrown when errors during comment processing are detected.

jasy.script.api.Data module

class jasy.script.api.Data.ApiData(id, highlight=True)[source]

Bases: object

Container for all relevant API data.

Automatically generated, filled and cached by jasy.item.Script.getApiDocs().

addAssets(assets)[source]

Adds the info about used assets.

addConstructor(valueNode, commentNode=None)[source]
addEntry(name, valueNode, commentNode, collection)[source]
addEvent(name, valueNode, commentNode, collection)[source]
addFields(permutations)[source]
addProperty(name, valueNode, commentNode, collection)[source]
addSize(size)[source]

Adds the statistics on different size aspects.

addUses(uses)[source]
assets
basename
construct
content
errors
events
export()[source]
highlight
id
implementedBy
implements
includedBy
includes
isEmpty
main
members
package
permutations
properties
removeUses(uses)[source]
scanTree(tree)[source]
setMain(mainType, mainNode, exportName)[source]
size
statics
usedBy
uses
warn(message, line)[source]

jasy.script.api.Text module

jasy.script.api.Text.extractSummary(text)[source]

jasy.script.api.Writer module

class jasy.script.api.Writer.ApiWriter(profile)[source]

Bases: object

Processes JavaScript classes into data for API documentation.

Exports plain data which can be used by a wide varity of tools for further processing or for displaying documentation. A good example of how to use the data generated by write is the ApiBrowser: https://github.com/zynga/apibrowser

write(distFolder, classFilter=None, callback='apiload', showInternals=False, showPrivates=False, printErrors=True, highlightCode=True)[source]

Writes API data generated from JavaScript into distFolder.

Parameters:
  • distFolder (str) – Where to store the API data
  • classFilter (tuple or function) – Tuple of classes or method to use for filtering
  • callback (function) – Name of callback to use for loading or None if pure JSON should be used
  • showInternals (bool) – Include internal methods inside API data
  • showPrivates (bool) – Include private methods inside API data
  • printErrors (bool) – Whether errors should be printed to the console
  • highlightCode (bool) – Whether to enable code highlighting using Pygments
jasy.script.api.Writer.connectInterface(className, interfaceName, classApi, interfaceApi)[source]
jasy.script.api.Writer.convertFunction(item)[source]
jasy.script.api.Writer.convertTags(item)[source]
jasy.script.api.Writer.isErrornous(data)[source]
jasy.script.api.Writer.mergeMixin(className, mixinName, classApi, mixinApi)[source]
jasy.script.api.Writer.safeUpdate(dest, origin)[source]

Like update() but only never overwrites.

Module contents