The quickapp Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The quickapp Reference Manual

This is the quickapp Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Thu Sep 15 05:58:46 2022 GMT+0.

Table of Contents


1 Introduction

quickapp

Quicklisp

A common lisp project for generating template projects that use sbcl and buildapp

See https://github.com/triclops200/quickapp-cli for the command line standalone utility.

Example usage

(ql:quickload :quickapp)
(quickapp:quickapp
          "src/lisp/test-project"
          :project-name "test-project" 
          :executable-name "test.out" 
          :project-description "This is a sample test project" 
          :project-author "YOUR NAME HERE" 
          :dependencies '(:sdl2 :cl-openal))

This creates the needed files and Makefile as well as a template project.

For easy interactive development in slime, just do (assuming one is in their generated project directory):

(load "slime.lisp")
(in-package :<YOUR PACKAGE NAME>)

Arg parsing utilities

This library also contains two functions for dealing with argument handling for the generated application: (quickapp:parse-args) and (quickapp:generate-flag-string).

An example usage is shown below

(defun -main (&optional args)
  "Entry point"
  (let* ((arg-defs '(("h" "help" "Display this help menu")
	          ("d" "dependencies" "(:dep1 [:dep2 ...])" "The dependencies")
	          ("p" "project-name" "NAME" "The project name")
	          ("a" "project-author" "NAME" "The name of the author")
	          ("s" "project-description" "DESCRIPTION" "The project description")
	          ("e" "executable-name" "NAME" "The executable name")))
         (parsed-args (quickapp:parse-args arg-defs (cdr args))))
	  (if (or (/= (length (first parsed-args)) 1)
	          (assoc "help" (second parsed-args) :test #'string=))
		  (progn (format t "Usage: ~a PROJECT-PATH [OPTIONS]~%OPTIONS:~%~a~%~a~%~a~a~%~a~%~a~%"
			       (first args)
			       (quickapp:generate-flag-string arg-defs)
			       "Example Usage: " (first args) " test-project \\"
			       "  -d\"(:sdl2 :cl-opengl)\" \\"
			       "  --project-author=cluser"))
		  (format t "~a~%" parsed-args))))

Running that application with the --help flag results in:

Usage: ./quickapp PROJECT-PATH [OPTIONS]
OPTIONS:
  -h  --help                              Display this help menu
  -d  --dependencies=(:dep1 [:dep2 ...])  The dependencies
  -p  --project-name=NAME                 The project name
  -a  --project-author=NAME               The name of the author
  -s  --project-description=DESCRIPTION   The project description
  -e  --executable-name=NAME              The executable name

Example Usage: 
./quickapp test-project \
  -d"(:sdl2 :cl-opengl)" \
  --project-author=cluser

Running this command: ./quickapp test-project -d"(:sdl2 :cl-opengl)" --project-author=cluser results in this list returned as parsed-args

(("test-project")
 (("project-author" . "cluser") ("dependencies" . "(:sdl2 :cl-opengl)")))

#License Licensed under Modified BSD License.

See License.txt for more details.


2 Systems

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


Previous: , Up: Systems   [Contents][Index]

2.1 quickapp

A utility library to automate much of the app creation process

Author

Bryan Hoyle

License

Modified BSD License

Source

quickapp.asd.

Child Components

3 Files

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


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp   [Contents][Index]

3.1.1 quickapp/quickapp.asd

Source

quickapp.asd.

Parent Component

quickapp (system).

ASDF Systems

quickapp.


3.1.2 quickapp/package.lisp

Source

quickapp.asd.

Parent Component

quickapp (system).

Packages

quickapp.


3.1.3 quickapp/quickapp.lisp

Dependency

package.lisp (file).

Source

quickapp.asd.

Parent Component

quickapp (system).

Public Interface
Internals

Previous: , Up: Lisp   [Contents][Index]

3.1.4 quickapp/argument-parsing.lisp

Dependency

quickapp.lisp (file).

Source

quickapp.asd.

Parent Component

quickapp (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 quickapp

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.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Public Interface


5.1.1 Ordinary functions

Function: generate-flag-string (arg-defs)

Generate the part of the help string that documents the options from the arg definition

Package

quickapp.

Source

argument-parsing.lisp.

Function: get-dependencies ()
Package

quickapp.

Source

quickapp.lisp.

Function: get-executable ()
Package

quickapp.

Source

quickapp.lisp.

Function: get-project ()
Package

quickapp.

Source

quickapp.lisp.

Function: get-project-author ()
Package

quickapp.

Source

quickapp.lisp.

Function: get-project-description ()
Package

quickapp.

Source

quickapp.lisp.

Function: get-utils ()
Package

quickapp.

Source

quickapp.lisp.

Function: parse-args (arg-defs args)

Actually calls all the functions to parse the args into the correct form.

Package

quickapp.

Source

argument-parsing.lisp.

Function: quickapp (project-path &key project-name executable-name project-description project-author dependencies)

Create the project from the templates

Package

quickapp.

Source

quickapp.lisp.


5.2 Internals


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.1 Special variables

Special Variable: *executable-name*
Package

quickapp.

Source

quickapp.lisp.

Special Variable: *my-directory*
Package

quickapp.

Source

quickapp.lisp.

Special Variable: *project-author*
Package

quickapp.

Source

quickapp.lisp.

Special Variable: *project-dependencies*
Package

quickapp.

Source

quickapp.lisp.

Special Variable: *project-description*
Package

quickapp.

Source

quickapp.lisp.

Special Variable: *project-name*
Package

quickapp.

Source

quickapp.lisp.


5.2.2 Macros

Macro: loop-rec (bindings &body body)

Similar to the clojure loop macro

Package

quickapp.

Source

argument-parsing.lisp.

Macro: with-string-stream (stream &body body)

A macro to allow one to write to a variable string stream and get the body result out

Package

quickapp.

Source

argument-parsing.lisp.


Previous: , Up: Internals   [Contents][Index]

5.2.3 Ordinary functions

Function: dispatch-stream-rewrite (c1 c2 input-string dispatch-function)
Package

quickapp.

Source

quickapp.lisp.

Function: do-template (project-path file &optional name)
Package

quickapp.

Source

quickapp.lisp.

Function: do-templates (project-path templates)
Package

quickapp.

Source

quickapp.lisp.

Function: eval-template-file (file)
Package

quickapp.

Source

quickapp.lisp.

Function: eval-template-string (string)
Package

quickapp.

Source

quickapp.lisp.

Function: fill-string (str fill-char n)

Fill a string with a character until it is at least as long as n specifies

Package

quickapp.

Source

argument-parsing.lisp.

Function: fix-argdef (argdef)

This is a formatter for an argdef to display properly

Package

quickapp.

Source

argument-parsing.lisp.

Function: fix-named-arg (arg-names arg)

This unifies the named arguments to use the long form.

Package

quickapp.

Source

argument-parsing.lisp.

Function: fix-named-args (arg-names args)

Fix all of the named args to use the long form

Package

quickapp.

Source

argument-parsing.lisp.

Function: from-my-path (filename)
Package

quickapp.

Source

quickapp.lisp.

Function: parse-arg (acc arg-list)

Parses one argument/argument pair into the named/unnamed lists appropriately

Package

quickapp.

Source

argument-parsing.lisp.

Function: parse-unfixed-args (args)

Parse an argument list into the appropriate list

Package

quickapp.

Source

argument-parsing.lisp.

Function: reduce-full (f &rest args)

A reducer that allows f to control the iteration as well as the accumulator

Package

quickapp.

Source

argument-parsing.lisp.

Function: slurp-file (filename)
Package

quickapp.

Source

quickapp.lisp.

Function: spit-file (filename string)
Package

quickapp.

Source

quickapp.lisp.

Function: split-string (seperator str)

Fully split a string by seperator.

Package

quickapp.

Source

argument-parsing.lisp.

Function: split-string-first (seperator str &optional default-value)

Returns a value pair representing the first split in the string matching the seperator string

Package

quickapp.

Source

argument-parsing.lisp.

Function: subseq-rel (seq fst &optional l)

A relative subsequence function

Package

quickapp.

Source

argument-parsing.lisp.


Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   D   E   F   G   L   M   P   Q   R   S   W  
Index Entry  Section

D
dispatch-stream-rewrite: Private ordinary functions
do-template: Private ordinary functions
do-templates: Private ordinary functions

E
eval-template-file: Private ordinary functions
eval-template-string: Private ordinary functions

F
fill-string: Private ordinary functions
fix-argdef: Private ordinary functions
fix-named-arg: Private ordinary functions
fix-named-args: Private ordinary functions
from-my-path: Private ordinary functions
Function, dispatch-stream-rewrite: Private ordinary functions
Function, do-template: Private ordinary functions
Function, do-templates: Private ordinary functions
Function, eval-template-file: Private ordinary functions
Function, eval-template-string: Private ordinary functions
Function, fill-string: Private ordinary functions
Function, fix-argdef: Private ordinary functions
Function, fix-named-arg: Private ordinary functions
Function, fix-named-args: Private ordinary functions
Function, from-my-path: Private ordinary functions
Function, generate-flag-string: Public ordinary functions
Function, get-dependencies: Public ordinary functions
Function, get-executable: Public ordinary functions
Function, get-project: Public ordinary functions
Function, get-project-author: Public ordinary functions
Function, get-project-description: Public ordinary functions
Function, get-utils: Public ordinary functions
Function, parse-arg: Private ordinary functions
Function, parse-args: Public ordinary functions
Function, parse-unfixed-args: Private ordinary functions
Function, quickapp: Public ordinary functions
Function, reduce-full: Private ordinary functions
Function, slurp-file: Private ordinary functions
Function, spit-file: Private ordinary functions
Function, split-string: Private ordinary functions
Function, split-string-first: Private ordinary functions
Function, subseq-rel: Private ordinary functions

G
generate-flag-string: Public ordinary functions
get-dependencies: Public ordinary functions
get-executable: Public ordinary functions
get-project: Public ordinary functions
get-project-author: Public ordinary functions
get-project-description: Public ordinary functions
get-utils: Public ordinary functions

L
loop-rec: Private macros

M
Macro, loop-rec: Private macros
Macro, with-string-stream: Private macros

P
parse-arg: Private ordinary functions
parse-args: Public ordinary functions
parse-unfixed-args: Private ordinary functions

Q
quickapp: Public ordinary functions

R
reduce-full: Private ordinary functions

S
slurp-file: Private ordinary functions
spit-file: Private ordinary functions
split-string: Private ordinary functions
split-string-first: Private ordinary functions
subseq-rel: Private ordinary functions

W
with-string-stream: Private macros

Jump to:   D   E   F   G   L   M   P   Q   R   S   W