The textery Reference Manual

This is the textery Reference Manual, version 0.2, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sat Dec 03 23:29:05 2022 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 textery

tracery lisp implementation

Author

ava fox

License

BSD 3-Clause

Version

0.2

Dependencies
  • str (system).
  • cl-json (system).
  • uiop (system).
  • cl-ppcre (system).
Source

textery.asd.

Child Components

3 Files

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


3.1 Lisp


3.1.1 textery/textery.asd

Source

textery.asd.

Parent Component

textery (system).

ASDF Systems

textery.


3.1.2 textery/package.lisp

Source

textery.asd.

Parent Component

textery (system).

Packages

textery.


3.1.3 textery/util.lisp

Dependency

package.lisp (file).

Source

textery.asd.

Parent Component

textery (system).

Internals

3.1.4 textery/eng-modifiers.lisp

Dependency

util.lisp (file).

Source

textery.asd.

Parent Component

textery (system).

Internals
  • a (function).
  • ed (function).
  • possesive (function).
  • s (function).

3.1.5 textery/textery.lisp

Dependency

eng-modifiers.lisp (file).

Source

textery.asd.

Parent Component

textery (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 textery

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

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


5.1 Public Interface


5.1.1 Macros

Macro: with-grammar (grammar &body body)

executes BODY with current-grammar set to GRAMMAR

Package

textery.

Source

textery.lisp.


5.1.2 Ordinary functions

Function: create-grammar (name grammar)

creates a grammar from a string

NAME is a string that denotes what the grammar is to be called GRAMMAR is a string that contains tracery formatted json

Package

textery.

Source

textery.lisp.

Function: expand (text)

expands TEXT

Package

textery.

Source

textery.lisp.

Function: load-grammar (file)

loads the json grammar referred to by FILE

Package

textery.

Source

textery.lisp.

Function: load-grammar-directory (dir)

loads all grammars from directory DIR

Package

textery.

Source

textery.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *action-rules*

rules added by actions
very volatile, only used during evaluations

Package

textery.

Source

textery.lisp.

Special Variable: *current-grammar*

current grammar being used

Package

textery.

Source

textery.lisp.

Special Variable: *grammars*

all currently loaded grammar files

Package

textery.

Source

textery.lisp.


5.2.2 Ordinary functions

Function: a (word)

puts ’a’ or ’an’ in front of WORD

Package

textery.

Source

eng-modifiers.lisp.

Function: agetf (place indicator &optional default)

getf but for alists

Package

textery.

Source

util.lisp.

Function: apply-arguments (text arguments)

applies all ARGUMENTS to TEXT

ARGUMENTS is a list of strings that refer to lisp functions

Package

textery.

Source

util.lisp.

Function: c= (char &rest compare)

returns non-nil if CHAR is one of COMPARE characters

Package

textery.

Source

util.lisp.

Function: ed (word)

naively applies ’ed’ to the end of WORD

Package

textery.

Source

eng-modifiers.lisp.

Function: get-all-actions (text)

retrieves all actions from TEXT

Package

textery.

Source

util.lisp.

Function: get-all-symbols (text)

retrieves all symbols from TEXT

Package

textery.

Source

util.lisp.

Function: grammar-value (key)

returns a value from the current grammar using KEY

Package

textery.

Source

textery.lisp.

Function: json-string-to-symbol (json-string &key as-string as-keyword)

converts camelCase JSON-STRING to a symbol

if AS-STRING is non-nil, returns a string instead of a symbol if AS-KEYWORD is non-nil, returns a keyword

Package

textery.

Source

util.lisp.

Function: last-letter (word)

gets last letter of WORD

Package

textery.

Source

util.lisp.

Function: list-grammars ()

returns a list of loaded grammars

Package

textery.

Source

textery.lisp.

Function: parse-func-arguments (funcname funcall)

parses arguments passed into FUNCALL

returns a list of arguments, or nil

Package

textery.

Source

util.lisp.

Function: parse-function (name)

returns a function of name NAME

Package

textery.

Source

util.lisp.

Function: possesive (word)

naively converts WORD into its possesive form

Package

textery.

Source

eng-modifiers.lisp.

Function: process-actions (actions text)

processes all ACTIONS, removing them from TEXT

Package

textery.

Source

textery.lisp.

Function: process-symbols (symbols text)

processes all SYMBOLS, evaluating and replacing them in TEXT

Package

textery.

Source

textery.lisp.

Function: random-from-list (lst)

returns a random element from LST

Package

textery.

Source

util.lisp.

Function: replace-first (old new s)

replaces the first occurance of OLD with NEW in S

if OLD isn’t found in S, returns S as-is

Package

textery.

Source

util.lisp.

Function: s (word)

naively pluralizes WORD

Package

textery.

Source

eng-modifiers.lisp.

Function: vowel-p (char)

returns non-nil is CHAR is a vowel

Package

textery.

Source

util.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   A   C   E   F   G   J   L   M   P   R   S   V   W  
Index Entry  Section

A
a: Private ordinary functions
agetf: Private ordinary functions
apply-arguments: Private ordinary functions

C
c=: Private ordinary functions
create-grammar: Public ordinary functions

E
ed: Private ordinary functions
expand: Public ordinary functions

F
Function, a: Private ordinary functions
Function, agetf: Private ordinary functions
Function, apply-arguments: Private ordinary functions
Function, c=: Private ordinary functions
Function, create-grammar: Public ordinary functions
Function, ed: Private ordinary functions
Function, expand: Public ordinary functions
Function, get-all-actions: Private ordinary functions
Function, get-all-symbols: Private ordinary functions
Function, grammar-value: Private ordinary functions
Function, json-string-to-symbol: Private ordinary functions
Function, last-letter: Private ordinary functions
Function, list-grammars: Private ordinary functions
Function, load-grammar: Public ordinary functions
Function, load-grammar-directory: Public ordinary functions
Function, parse-func-arguments: Private ordinary functions
Function, parse-function: Private ordinary functions
Function, possesive: Private ordinary functions
Function, process-actions: Private ordinary functions
Function, process-symbols: Private ordinary functions
Function, random-from-list: Private ordinary functions
Function, replace-first: Private ordinary functions
Function, s: Private ordinary functions
Function, vowel-p: Private ordinary functions

G
get-all-actions: Private ordinary functions
get-all-symbols: Private ordinary functions
grammar-value: Private ordinary functions

J
json-string-to-symbol: Private ordinary functions

L
last-letter: Private ordinary functions
list-grammars: Private ordinary functions
load-grammar: Public ordinary functions
load-grammar-directory: Public ordinary functions

M
Macro, with-grammar: Public macros

P
parse-func-arguments: Private ordinary functions
parse-function: Private ordinary functions
possesive: Private ordinary functions
process-actions: Private ordinary functions
process-symbols: Private ordinary functions

R
random-from-list: Private ordinary functions
replace-first: Private ordinary functions

S
s: Private ordinary functions

V
vowel-p: Private ordinary functions

W
with-grammar: Public macros