This is the mystic Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:07:54 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
mystic
A project skeleton generator.
Fernando Borretti <eudoxiahp@gmail.com>
Fernando Borretti <eudoxiahp@gmail.com>
(GIT )
MIT
# Mystic
[![Build Status](https://travis-ci.org/roswell/mystic.svg?branch=master)](https://travis-ci.org/roswell/mystic)
A modular project skeleton generator.
# Overview
Some features:
* **Declarative:** Options are specified in a declarative interface, so you have
have multiple front-ends (command line, web, etc.) to the project generator.
* **Modular:** Most of the functionality common to different templates
(e.g. Travis support, the ‘.gitignore‘ file) is implemented as mixins.
# Usage
“‘lisp
(mystic:render (make-instance ’mystic.template.library:library-template)
(list :name "your-project"
:author "You"
:email "you@gmail.com"
:license "MIT"
:description "A one-line description of your project."
:dependencies "clack, postmodern")
#p"/home/you/code/your-project/")
“‘
I’ll get around to writing an actual interface at some point.
# License
Copyright (c) 2016 Fernando Borretti (eudoxiahp@gmail.com)
Licensed under the MIT License.
0.1
cl-mustache
(system).
split-sequence
(system).
anaphora
(system).
alexandria
(system).
ubiquitous
(system).
local-time
(system).
src
(module).
Modules are listed depth-first from the system components tree.
mystic/src
mystic
(system).
util.lisp
(file).
mystic.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
mystic/src/util.lisp
src
(module).
parse-comma-separated-list
(function).
parse-systems-list
(function).
read-template-file
(function).
render-string
(function).
strip-whitespace
(function).
write-file
(function).
mystic/src/mystic.lisp
util.lisp
(file).
src
(module).
ask-about-defaults
(condition).
ask-about-option-without-default
(condition).
ask-about-value-from-config
(condition).
bad-option-value
(condition).
base-option-condition
(condition).
boolean-option
(class).
list-templates
(function).
make-option
(function).
missing-required-option
(condition).
multiple-choice-option
(class).
option
(class).
option-default
(reader method).
option-default
(reader method).
option-docstring
(reader method).
option-docstring
(reader method).
option-name
(reader method).
option-name
(reader method).
option-required-p
(reader method).
option-title
(reader method).
print-object
(method).
prompt-option
(class).
register-template
(function).
render
(function).
render-template
(generic function).
template
(class).
template-docstring
(reader method).
template-name
(reader method).
template-options
(reader method).
validate-options
(generic function).
*templates*
(special variable).
config-path
(reader method).
config-pathname
(function).
option-choices
(reader method).
option-processor
(reader method).
option-value
(reader method).
option-value
(reader method).
option-value
(reader method).
option-value-problem
(reader method).
read-new-value
(function).
Packages are listed by definition order.
mystic
common-lisp
.
ask-about-defaults
(condition).
ask-about-option-without-default
(condition).
ask-about-value-from-config
(condition).
bad-option-value
(condition).
base-option-condition
(condition).
boolean-option
(class).
list-templates
(function).
make-option
(function).
missing-required-option
(condition).
multiple-choice-option
(class).
option
(class).
option-default
(generic reader).
option-docstring
(generic reader).
option-name
(generic reader).
option-required-p
(generic reader).
option-title
(generic reader).
prompt-option
(class).
register-template
(function).
render
(function).
render-template
(generic function).
template
(class).
template-docstring
(generic reader).
template-name
(generic reader).
template-options
(generic reader).
validate-options
(generic function).
*templates*
(special variable).
config-path
(generic reader).
config-pathname
(function).
option-choices
(generic reader).
option-processor
(generic reader).
option-value
(generic reader).
option-value-problem
(generic reader).
read-new-value
(function).
mystic.util
Utilities for Mystic.
common-lisp
.
parse-comma-separated-list
(function).
parse-systems-list
(function).
read-template-file
(function).
render-string
(function).
strip-whitespace
(function).
write-file
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Return a list of project templates.
Read a pathname relative to the templates/ directory into a string.
Register a template.
Render a @cl:param(template) to a @cl:param(directory). The
@cl:param(options) are a plist of option names to their supplied values.
This is the user-level entrypoint, and performs option validation and anything that needs to be done before handing over the task of rendering to the actual @c(render-template) method.
Render a Mustache template string to a string.
Write a string to a file (absolute path), creating it if necessary, and creating its parent directories as well.
ask-about-defaults
)) ¶base-option-condition
)) ¶base-option-condition
)) ¶Render a @cl:param(template) to a @cl:param(directory). The @cl:param(options) are a plist of option names to their supplied values.
progn
.
:most-specific-first
Validates templates and returns a plist where keys are option names. This plist will be used to render templates.
A template or mixin might define a method for this generic function either to
apply some additional validation or to add calculated variables to the plist. For example,
if some option contains a system name, you might want to uppercase it or to replace
dashes with underscores and store results to a separate variable.
template
) (options list
) &key request-all-options-p) ¶Take a plist of options, and validate it against the options in the template.
When ASK-ABOUT-DEFAULTS-P is T, Mystic will ask user about all options missing from OPTIONS list
but used in TEMPLATE. Asking is performed as condition signaling and a user can choose one of
available restarts:
- USE-DEFAULT - use default specified in the option’s code.
- USE-VALUE-FROM-CONFIG - use value from config.
- USE-VALUE - enter a value interactively.
- STORE-VALUE - enter a value and store it in the config for future calls.
Signalled when user passed REQUEST-ALL-OPTIONS-P argument to RENDER method and didn’t supply some option value which has a default.
The default value of the option.
:option-default
This slot is read-only.
Signalled when user passed REQUEST-ALL-OPTIONS-P argument to RENDER method, didn’t supply an option value and we don’t have a default or saved value for it.
The value from config.
:value
This slot is read-only.
Signalled when user passed REQUEST-ALL-OPTIONS-P argument to RENDER method, didn’t supply some option value but a value for this option was found in a config file.
Signalled when a some value is in wrong format or type.
Wrong value of an option.
(quote (error "argument :value is required."))
:value
This slot is read-only.
What is wrong with value.
(quote (error "argument :problem is required."))
:problem
This slot is read-only.
condition
.
The name of the option.
:option-name
This slot is read-only.
Documentation of the option.
:docstring
This slot is read-only.
Signalled when a required option is not supplied.
A yes or no option.
An option that gives the user a choice from a list.
A list of strings.
list
:choices
This slot is read-only.
An option to a template.
The name of the option, a keyword, e.g. @c(:project-name).
keyword
:name
This slot is read-only.
The human-readable option name, e.g. @c("Project Name").
string
:title
This slot is read-only.
The option’s documentation string.
string
:docstring
This slot is read-only.
Whether the option is required. False by default.
boolean
:requiredp
This slot is read-only.
A function used to process the value given to the option.
function
(function identity)
:processor
This slot is read-only.
The option’s default value. This value will not be passed through an option processor.
:default
This slot is read-only.
An option that prompts the user for a value.
Represents a template.
The template’s human-readable name.
string
:name
This slot is read-only.
The template’s documentation string.
string
:docstring
This slot is read-only.
A list of template options.
list
:options
This slot is read-only.
ask-about-value-from-config
)) ¶multiple-choice-option
)) ¶A list of strings.
bad-option-value
)) ¶ask-about-option-without-default
)) ¶ask-about-value-from-config
)) ¶bad-option-value
)) ¶Jump to: | C F G L M O P R S T V W |
---|
Jump to: | C F G L M O P R S T V W |
---|
Jump to: | *
C D N O P R S T V |
---|
Jump to: | *
C D N O P R S T V |
---|
Jump to: | A B C F M O P S T U |
---|
Jump to: | A B C F M O P S T U |
---|