Bases: builtins.object
A cache class based on shelve feature of Python. Supports transient in-memory storage, too. Uses memory storage for caching requests to DB as well for improved performance. Uses keys for identification of entries like a normal hash table / dictionary.
Reads the given value from cache. Optionally support to check wether the value was stored after the given time to be valid (useful for comparing with file modification times).
Bases: builtins.object
Wrapper around YAML/JSON with easy to use import tools for using question files, command line arguments, etc.
Asks the user for value for the given configuration field:
Parameters: |
|
---|
Executes the given script for configuration proposes and deletes the file afterwards (by default). Returns True when the file was found and processed.
Injects a list of arguments into the configuration file, typically used for injecting command line arguments
Imports the values of the given config file Returns True when the file was found and processed.
Note: Supports dotted names to store into sub trees Note: This method overrides keys when they are already defined!
Returns the name of a config file based on the given base file name (without extension). Returns either a filename which endswith .yaml, .json or None when no file was found.
Centralized logging for complete Jasy environment.
Uses to colorize the given text for output on Unix terminals
Outputs an info message (visible by default, disable via –quiet option)
Output a debug message (hidden by default, enable via –verbose option)
Creates a new project from a defined skeleton or an existing project’s root directory (only if there is a jasycreate config file).
Parameters: |
|
---|
A module consisting of some often used file system actions in easy to use unix tradition.
Read the given file. Returns None when file could not be found/opended
Returns a SHA 1 checksum (as hex digest) of the given file (handle)
Bases: builtins.object
Summarizes utility methods for operations in filesystem.
Copies a directory to a destination directory. Merges the existing directory structure with the folder to copy.
Bases: builtins.object
Data structure to hold all meta information.
A instance of this class is typically created by processing all meta data relevant tags of all doc comments in the given node structure.
Hint: Must be a clean data class without links to other systems for optiomal cachability using Pickle
Bases: builtins.object
Configuration object for the build profile of the current task
Registers the given function as a new command
Replaces placeholders inside the given filename and returns the result. The placeholders are based on the current state of the session.
These are the currently supported placeholders:
Name of the folder inside the destination folder for storing used assets
Name of the folder inside the destination folder for storing generated style sheets
Returns a locale project for the currently configured locale. Returns None if locale is not set to a valid value.
Returns current permutation object (useful during looping through permutations via permutate()).
Name of the folder inside the destination folder for storing generated script files
Returns all currently registered projects. Injects locale project when current permutation has configured a locale.
Returns a list of (virtual) classes which are relevant for initial setup.
Name of the folder inside the destination folder for storing compiled templates
Adds the given key/value pair to the session for permutation usage.
It supports an optional test. A test is required as soon as there is more than one value available. The detection method and values are typically already defined by the project declaring the key/value pair.
Statically configure the value of the given field.
This field is just injected into Permutation data and used for permutations, but as it only holds a single value all alternatives paths are removed/ignored.
Store locales as a special built-in field with optional default value
Bases: builtins.object
Return the project requirements as project instances
Returns all project style styles. Requires all files to have a “sht” extension.
Bases: builtins.object
Manages all projects.
Registers the given function as a new command
Adds the given project to the list of known projects. Projects should be added in order of their priority. This adds the field configuration of each project to the session fields. Fields must not conflict between different projects (same name).
Parameters: | project (object) – Instance of Project to append to the list |
---|
Returns a set of all available translations
This is the sum of all projects so even if only one project supports “fr_FR” then it will be included here.
Returns the main project which is the first project added to the session and the one with the highest priority.
Queries all currently registered projects for the given class and returns the class item. Returns None when no matching class item was found.
Parameters: | className (str) – Any valid classname from any of the projects. |
---|
Queries all currently registered projects for the given style and returns the style item. Returns None when no matching style item was found.
Parameters: | styleName (str) – Any valid styleName from any of the projects. |
---|
Returns a translation object for the given language containing all relevant translation files for the current project set.
Returns a valid virtual path for the given file item ID. Supports adding an optional extension for files where the extension is not part of the idea (effectively this are most of them, but not assets)
Returns the virtual project for this application. The project offers storage for dynamically created JavaScript classes and other files. Storage is kept intact between different Jasy sessions.
Initialize the actual session with projects
Parameters: |
|
---|
Loads new commands into the session wide command registry.
Creates a new object inside the user API (jasyscript.py) with the given name containing all @share’d functions and fields loaded from the given file.
Returns a camelized version of the incoming string: foo-bar-baz => fooBarBaz
Parameters: | str – Input string |
---|
Executes the given process and outputs failMessage when errors happen.
Parameters: |
|
---|---|
Raises Exception: | |
Raises an exception whenever the shell command fails in execution |
Generates a unique SHA1 based hash/checksum encoded as Base62 or Hex depending on the given parameters.
Parameters: |
|
---|