The mystic Reference Manual

This is the mystic Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed Mar 15 07:04:39 2023 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 mystic

A project skeleton generator.

Maintainer

Fernando Borretti <>

Author

Fernando Borretti <>

Home Page
Source Control

(GIT )

Bug Tracker
License

MIT

Long Description

# 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.

Version

0.1

Dependencies
  • cl-mustache (system).
  • split-sequence (system).
  • anaphora (system).
  • local-time (system).
Source

mystic.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 mystic/src

Source

mystic.asd.

Parent Component

mystic (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 mystic/mystic.asd

Source

mystic.asd.

Parent Component

mystic (system).

ASDF Systems

mystic.


4.1.2 mystic/src/util.lisp

Source

mystic.asd.

Parent Component

src (module).

Packages

mystic.util.

Public Interface

4.1.3 mystic/src/mystic.lisp

Dependency

util.lisp (file).

Source

mystic.asd.

Parent Component

src (module).

Packages

mystic.

Public Interface
Internals

5 Packages

Packages are listed by definition order.


5.1 mystic

Source

mystic.lisp.

Use List

common-lisp.

Public Interface
Internals

5.2 mystic.util

Utilities for Mystic.

Source

util.lisp.

Use List

common-lisp.

Public Interface

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Ordinary functions

Function: list-templates ()

Return a list of project templates.

Package

mystic.

Source

mystic.lisp.

Function: parse-systems-list (systems-list)
Package

mystic.util.

Source

util.lisp.

Function: read-template-file (pathname)

Read a pathname relative to the templates/ directory into a string.

Package

mystic.util.

Source

util.lisp.

Function: register-template (template)

Register a template.

Package

mystic.

Source

mystic.lisp.

Function: render (template options directory)

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.

Package

mystic.

Source

mystic.lisp.

Function: render-string (template-string data)

Render a Mustache template string to a string.

Package

mystic.util.

Source

util.lisp.

Function: strip-whitespace (string)
Package

mystic.util.

Source

util.lisp.

Function: write-file (string pathname)

Write a string to a file (absolute path), creating it if necessary, and creating its parent directories as well.

Package

mystic.util.

Source

util.lisp.


6.1.2 Generic functions

Generic Reader: option-default (object)
Package

mystic.

Methods
Reader Method: option-default ((option option))

The option’s default value.

Source

mystic.lisp.

Target Slot

default.

Generic Reader: option-docstring (object)
Package

mystic.

Methods
Reader Method: option-docstring ((option option))

The option’s documentation string.

Source

mystic.lisp.

Target Slot

docstring.

Generic Reader: option-name (object)
Package

mystic.

Methods
Reader Method: option-name ((condition missing-required-option))
Source

mystic.lisp.

Target Slot

option-name.

Reader Method: option-name ((option option))

The name of the option, a keyword, e.g. @c(:project-name).

Source

mystic.lisp.

Target Slot

name.

Generic Reader: option-required-p (object)
Package

mystic.

Methods
Reader Method: option-required-p ((option option))

Whether the option is required. False by default.

Source

mystic.lisp.

Target Slot

requiredp.

Generic Reader: option-title (object)
Package

mystic.

Methods
Reader Method: option-title ((option option))

The human-readable option name, e.g. @c("Project Name").

Source

mystic.lisp.

Target Slot

title.

Generic Function: render-template (template options directory)

Render a @cl:param(template) to a @cl:param(directory). The @cl:param(options) are a plist of option names to their supplied values.

Package

mystic.

Source

mystic.lisp.

Method Combination

progn.

Options

:most-specific-first

Generic Reader: template-docstring (object)
Package

mystic.

Methods
Reader Method: template-docstring ((template template))

The template’s documentation string.

Source

mystic.lisp.

Target Slot

docstring.

Generic Reader: template-name (object)
Package

mystic.

Methods
Reader Method: template-name ((template template))

The template’s human-readable name.

Source

mystic.lisp.

Target Slot

name.

Generic Reader: template-options (object)
Package

mystic.

Methods
Reader Method: template-options ((template template))

A list of template options.

Source

mystic.lisp.

Target Slot

options.

Generic Function: validate-options (template options)
Package

mystic.

Methods
Method: validate-options ((template template) (options list))

Take a plist of options, and validate it against the options in the template.

Source

mystic.lisp.


6.1.3 Conditions

Condition: missing-required-option

Signalled when a required option is not supplied.

Package

mystic.

Source

mystic.lisp.

Direct superclasses

simple-error.

Direct methods

option-name.

Direct slots
Slot: option-name

The name of the required option.

Initargs

:option-name

Readers

option-name.

Writers

This slot is read-only.


6.1.4 Classes

Class: boolean-option

A yes or no option.

Package

mystic.

Source

mystic.lisp.

Direct superclasses

option.

Class: multiple-choice-option

An option that gives the user a choice from a list.

Package

mystic.

Source

mystic.lisp.

Direct superclasses

option.

Direct methods

option-choices.

Direct slots
Slot: choices

A list of strings.

Type

list

Initargs

:choices

Readers

option-choices.

Writers

This slot is read-only.

Class: option

An option to a template.

Package

mystic.

Source

mystic.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: name

The name of the option, a keyword, e.g. @c(:project-name).

Type

keyword

Initargs

:name

Readers

option-name.

Writers

This slot is read-only.

Slot: title

The human-readable option name, e.g. @c("Project Name").

Type

string

Initargs

:title

Readers

option-title.

Writers

This slot is read-only.

Slot: docstring

The option’s documentation string.

Type

string

Initargs

:docstring

Readers

option-docstring.

Writers

This slot is read-only.

Slot: requiredp

Whether the option is required. False by default.

Type

boolean

Initargs

:requiredp

Readers

option-required-p.

Writers

This slot is read-only.

Slot: processor

A function used to process the value given to the option.

Type

function

Initform

(function identity)

Initargs

:processor

Readers

option-processor.

Writers

This slot is read-only.

Slot: default

The option’s default value.

Initargs

:default

Readers

option-default.

Writers

This slot is read-only.

Class: prompt-option

An option that prompts the user for a value.

Package

mystic.

Source

mystic.lisp.

Direct superclasses

option.

Class: template

Represents a template.

Package

mystic.

Source

mystic.lisp.

Direct methods
Direct slots
Slot: name

The template’s human-readable name.

Type

string

Initargs

:name

Readers

template-name.

Writers

This slot is read-only.

Slot: docstring

The template’s documentation string.

Type

string

Initargs

:docstring

Readers

template-docstring.

Writers

This slot is read-only.

Slot: options

A list of template options.

Type

list

Initargs

:options

Readers

template-options.

Writers

This slot is read-only.


6.2 Internals


6.2.1 Special variables

Special Variable: *templates*

The list of templates.

Package

mystic.

Source

mystic.lisp.


6.2.2 Generic functions

Generic Reader: option-choices (object)
Package

mystic.

Methods
Reader Method: option-choices ((multiple-choice-option multiple-choice-option))

A list of strings.

Source

mystic.lisp.

Target Slot

choices.

Generic Reader: option-processor (object)
Package

mystic.

Methods
Reader Method: option-processor ((option option))

A function used to process the value given to the option.

Source

mystic.lisp.

Target Slot

processor.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   F   G   L   M   O   P   R   S   T   V   W  
Index Entry  Section

F
Function, list-templates: Public ordinary functions
Function, parse-systems-list: Public ordinary functions
Function, read-template-file: Public ordinary functions
Function, register-template: Public ordinary functions
Function, render: Public ordinary functions
Function, render-string: Public ordinary functions
Function, strip-whitespace: Public ordinary functions
Function, write-file: Public ordinary functions

G
Generic Function, option-choices: Private generic functions
Generic Function, option-default: Public generic functions
Generic Function, option-docstring: Public generic functions
Generic Function, option-name: Public generic functions
Generic Function, option-processor: Private generic functions
Generic Function, option-required-p: Public generic functions
Generic Function, option-title: Public generic functions
Generic Function, render-template: Public generic functions
Generic Function, template-docstring: Public generic functions
Generic Function, template-name: Public generic functions
Generic Function, template-options: Public generic functions
Generic Function, validate-options: Public generic functions

L
list-templates: Public ordinary functions

M
Method, option-choices: Private generic functions
Method, option-default: Public generic functions
Method, option-docstring: Public generic functions
Method, option-name: Public generic functions
Method, option-name: Public generic functions
Method, option-processor: Private generic functions
Method, option-required-p: Public generic functions
Method, option-title: Public generic functions
Method, template-docstring: Public generic functions
Method, template-name: Public generic functions
Method, template-options: Public generic functions
Method, validate-options: Public generic functions

O
option-choices: Private generic functions
option-choices: Private generic functions
option-default: Public generic functions
option-default: Public generic functions
option-docstring: Public generic functions
option-docstring: Public generic functions
option-name: Public generic functions
option-name: Public generic functions
option-name: Public generic functions
option-processor: Private generic functions
option-processor: Private generic functions
option-required-p: Public generic functions
option-required-p: Public generic functions
option-title: Public generic functions
option-title: Public generic functions

P
parse-systems-list: Public ordinary functions

R
read-template-file: Public ordinary functions
register-template: Public ordinary functions
render: Public ordinary functions
render-string: Public ordinary functions
render-template: Public generic functions

S
strip-whitespace: Public ordinary functions

T
template-docstring: Public generic functions
template-docstring: Public generic functions
template-name: Public generic functions
template-name: Public generic functions
template-options: Public generic functions
template-options: Public generic functions

V
validate-options: Public generic functions
validate-options: Public generic functions

W
write-file: Public ordinary functions