Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/triclops200/quickapp
A common lisp project for generating template projects that use sbcl and buildapp
https://github.com/triclops200/quickapp
Last synced: 3 months ago
JSON representation
A common lisp project for generating template projects that use sbcl and buildapp
- Host: GitHub
- URL: https://github.com/triclops200/quickapp
- Owner: triclops200
- License: bsd-3-clause
- Created: 2015-06-27T17:18:43.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-07-13T20:08:35.000Z (over 8 years ago)
- Last Synced: 2024-05-13T22:50:02.748Z (6 months ago)
- Language: Common Lisp
- Size: 26.4 KB
- Stars: 49
- Watchers: 5
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: License.txt
Awesome Lists containing this project
README
# quickapp
[![Quicklisp](http://quickdocs.org/badge/quickapp.svg)](http://quickdocs.org/quickapp/)
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
```lisp
(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):
```lisp
(load "slime.lisp")
(in-package :)
```# 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
```lisp
(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 nameExample 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```lisp
(("test-project")
(("project-author" . "cluser") ("dependencies" . "(:sdl2 :cl-opengl)")))
```#License
Licensed under Modified BSD License.See License.txt for more details.