main/absolute-path [ Functions ]
[ Top ] [ main ] [ Functions ]
Name
absolute-path
File
output.lsp
Description
Return an absolute path to a given relative path in the current project directory.
Arguments
relative-path (string)
Return Value
absolute path (string)
Synopsis
(defun absolute-path (relative-path)
main/add-output-type [ Functions ]
[ Top ] [ main ] [ Functions ]
Name
add-output-type
File
write.lsp
Description
Add an output-type to the list of available output types. Choose the default file format.
Arguments
name: Name of output-type. A keyword format: file extension as symbol
Return Value
(cons name format)
Synopsis
(defun add-output-type (name)
Example
(add-output-type :sound wav)
main/cp-to-project-dir [ Functions ]
[ Top ] [ main ] [ Functions ]
Name
cp-to-project-dir
File
output.lsp
Description
Copies a file to the current project-directory. This is usually done when copying a file generated in tmp-dir to the project.
Arguments
file (path to an existing file to copy)
Optional Arguments
overwrite (default: t), indicates whether an existing file in project-dir should be overwritten. If set to nil, Comic will signal a warning and ask, whether the file should be overwritten if it already exists. sub-dir (string): when set, the file is copied to a subdirectory in the project directory.
Return Value
t if file was copied, else nil.
Synopsis
(defun cp-to-project-dir (file &optional (overwrite t) sub-dir)
main/delete-temporary-files [ Functions ]
[ Top ] [ main ] [ Functions ]
Name
delete-temporary-files
File
output.lsp
Description
Files written to the temporary directory using make-tmp-file or output-tmp-file will be remembered (in +cc-data+ -> :temporary- files) and can all be deleted at once using this function. This will usually be done automatically after each render (When :tidy-up is t), but may in some cases be usefull to do manually. (E.g. when tidy-up is set to nil in order to look at the output of a render-mode after render.)
Arguments
None
Return Value
t
Synopsis
(defun delete-temporary-files ()
main/make-tmp-file [ Functions ]
[ Top ] [ main ] [ Functions ]
Name
make-tmp-file
File
output.lsp
Description
Output a file to the current tmp-directory. All necassary directories will be created. The filename will be auto-generated if no name is supplied. Files written to the temporary directory using this function will be remembered (in +cc-data+ -> :temporary-files) and can all be deleted at once using delete-temporary-files. This will usually be done automatically after each render. When no contents is given, this function can be used to only create a unique filename in the tmp-dir, writing the actual file in a different process, e.g. by an external program.
Optional Arguments
contents (string): May be supplied, but is optional. type: The suffix of the file. Defaults to "tmp". name: Can be used to bypass the functions ability to create a name automatically
Return Value
the absolute path to the file
Synopsis
(defun make-tmp-file (&optional contents (type "tmp") name) "Output a file to temp directory and return its auto-generated name. If a name is supplied and the file exists, it will be overwritten."
main/output-file [ Functions ]
[ Top ] [ main ] [ Functions ]
Name
output-file
File
output.lsp
Description
Output a file to the current project-directory. If the file already exists, it will be overwritten. All necassary directories will be created.
Arguments
relative-path (string or pathname) contents (string)
Return Value
t
Synopsis
(defun output-file (relative-path contents)
main/output-tmp-file [ Functions ]
[ Top ] [ main ] [ Functions ]
Name
output-tmp-file
File
output.lsp
Description
Output a file to the current tmp-directory. If the file already exists, it will be overwritten. All necassary directories will be created. Files written to the temporary directory using this function will be remembered (in +cc-data+ -> :temporary-files) and can all be deleted at once using delete-temporary-files. This will usually be done automatically after each render.
Arguments
relative-path (string or pathname) contents (string)
Return Value
absolute path to file
Synopsis
(defun output-tmp-file (relative-path contents)
main/run [ Functions ]
[ Top ] [ main ] [ Functions ]
Name
run
File
output.lsp
Description
Run an external software using the implementation-dependend function that is stored in +cc-data+ by :external-program-call. The default function name is sb-ext:run-program, for sbcl.
Arguments
software-name: A key stored in +cc-data+ / :external-software. args (&rest): All arguments the call needs. Must be strings without spaces, where a space in the argument list is indicated by a new string.
Return Value
nil
Synopsis
(defun run (software-name &rest args)
main/tmp-path [ Functions ]
[ Top ] [ main ] [ Functions ]
Name
tmp-path
File
output.lsp
Description
Return an absolute path to a given relative path in the set tmp-directory. The tmp-dir is stored in +cc-data+, defaults to "/tmp" and can be changed using (cc-set :tmp-dir "new-tmp-dir"). The tmp-dir is used in render-modes to store temporary files. All files written by Comic to the tmp-dir will usually be removed after render (when key-arg :tidy-up is t). The tmp-dir can also be cleaned manually using delete-temporary-files. Files not created using
Arguments
relative-path (string)
Return Value
absolute path (string)
Synopsis
(defun tmp-path (relative-path)