jasy.item package

Submodules

jasy.item.Abstract module

class jasy.item.Abstract.AbstractItem(project, id=None, package=None)[source]

Bases: object

attach(path)[source]
classmethod fromPath(project, relpath, package=None)[source]

Initialize MyData from a dict’s items.

generateId(relpath, package)[source]
getChecksum(mode='rb')[source]

Returns the SHA1 checksum of the item.

getId()[source]

Returns a unique identify of the class.

Typically as it is stored inside the project.

getModificationTime()[source]

Returns last modification time of the class.

getPath()[source]

Returns the exact position of the class file in the file system.

getProject()[source]

Returns the project which the class belongs to.

getText(encoding='utf-8')[source]

Reads the file (as UTF-8) and returns the text

id = None
kind = 'jasy.Item'
mtime = None
project = None
saveText(text, path, encoding='utf-8')[source]

Saves the given text under the given path and stores both for future access.

This is mainly useful for “virtual” files which are not edited by the developer but which are created dynamically during runtime.

setId(id)[source]
setPath(path)[source]

Sets the path for the item.

setText(text)[source]

Stores text from custom reader.

setTextFilter(filterCallback)[source]

Sets text filter callback that is called on getText().

With this callback e.g. transformations from CoffeeScript to JavaScript are possible. The callback gets two parameter (text, ItemClass)

jasy.item.Asset module

class jasy.item.Asset.AssetItem(project, id=None, package=None)[source]

Bases: jasy.item.Abstract.AbstractItem

addImageAnimationData(columns, rows, frames=None, layout=None)[source]
addImageDimensionData(width, height)[source]
addImageSpriteData(id, left, top)[source]
exportData()[source]
generateId(relpath, package)[source]
getParsedObject()[source]
getType(short=False)[source]
isAudio()[source]
isImage()[source]
isImageAnimationConfig()[source]
isImageSpriteConfig()[source]
isText()[source]
isVideo()[source]
kind = 'jasy.Asset'
setId(id)[source]

jasy.item.Doc module

class jasy.item.Doc.DocItem(project, id=None, package=None)[source]

Bases: jasy.item.Abstract.AbstractItem

generateId(relpath, package)[source]

Generates the fileId of this item as being used by other modules.

getApi()[source]
kind = 'jasy.Doc'

jasy.item.Script module

exception jasy.item.Script.ScriptError(inst, msg)[source]

Bases: Exception

class jasy.item.Script.ScriptItem(project, id=None, package=None)[source]

Bases: jasy.item.Abstract.AbstractItem

filterPermutation(permutation)[source]
generateId(relpath, package)[source]

Generates the fileId of this item as being used by other modules.

getApi(highlight=True)[source]
getBreaks(permutation=None, items=None)[source]

Returns all down-priorized dependencies. This are dependencies which are required to make the module work, but are not required being available before the current item.

getCompressed(profile)[source]
getDependencies(permutation=None, items=None, fields=None, warnings=True)[source]

Returns a set of dependencies seen through the given list of known classes (ignoring all unknown items in original set) and configured fields with their individual detection classes.

This method also makes use of the meta data and the variable data.

getFields()[source]
getHighlightedCode()[source]
getMetaData(permutation=None)[source]
getScopeData(permutation=None)[source]

Returns the top level scope object which contains information about the global variable and package usage/influence.

getTranslations()[source]
kind = 'jasy.Script'
jasy.item.Script.collectFields(node, keys=None)[source]

jasy.item.Style module

exception jasy.item.Style.StyleError(inst, msg)[source]

Bases: Exception

Error class used for issues during style processing.

class jasy.item.Style.StyleItem(project, id=None, package=None)[source]

Bases: jasy.item.Abstract.AbstractItem

filterPermutation(permutation)[source]

Returns a new permutation which only contains information about the fields actually accessed in this stylesheet.

generateId(relpath, package)[source]

Generates the fileId of this item as being used by other modules.

getBreaks(permutation=None, items=None, warnings=True)[source]

Returns all down-priorized dependencies. These are dependencies which are required to make the item work, but are not required being available before the current item.

getCompressed(profile)[source]

Returns the compressed CSS code of this item.

getDependencies(permutation=None, items=None, fields=None, warnings=True)[source]

Returns a set of dependencies seen through the given list of known items (ignoring all unknown items in original set).

getFields()[source]

Returns the fields which are used by this stylesheet.

getIncludes(permutation)[source]

Returns the includes which are referenced by this stylesheet.

getMergedTree(profile)[source]

Returns the merged (includes resolved) and optimized.

(permutation values applied) tree.

getMetaData(permutation)[source]

Returns the meta data of this stylesheet.

getModificationTime(profile)[source]

Returns the modification date of the stylesheet.

(or the sum of modification dates when using includes)

kind = 'jasy.Style'
jasy.item.Style.collectFields(node, keys=None, condition=False)[source]

Collects all fields accessed by the given root node and all children.

Returns a set of field names.

jasy.item.Style.includeGenerator(node)[source]

A generator which yiels include names and the origin include nodes for every include in the given root node.

jasy.item.Template module

class jasy.item.Template.TemplateItem(project, id=None, package=None)[source]

Bases: jasy.item.Abstract.AbstractItem

attach(path)[source]
generateId(relpath, package)[source]

Generates the fileId of this item as being used by other modules.

getScriptItem()[source]

Returns a class representation for the template instance.

kind = 'jasy.Template'
jasy.item.Template.escapeContent(content)[source]
jasy.item.Template.templateFilter(text, item)[source]

jasy.item.Translation module

class jasy.item.Translation.TranslationItem(project, id=None, package=None, table=None)[source]

Bases: jasy.item.Abstract.AbstractItem

attach(path)[source]
export(classes, formatted=True)[source]

Exports the translation table as JSON based on the given set of classes.

generateId(relpath, package)[source]

Generates the fileId of this item as being used by other modules.

getLanguage()[source]

Returns the language of the translation file.

getTable()[source]

Returns the translation table.

kind = 'jasy.Translation'
setId(id)[source]
jasy.item.Translation.generateMessageId(basic, plural=None, context=None)[source]

Returns a unique message ID based on info typically stored in the code: id, plural, context

Module contents