forked from vydd/sketch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.lisp
More file actions
58 lines (57 loc) · 1.46 KB
/
test.lisp
File metadata and controls
58 lines (57 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
(defparameter *dir*
;;(merge-pathnames "src/" (asdf:system-source-directory :sketch))
(merge-pathnames "examples/" (asdf:system-source-directory :sketch)))
(defparameter *files*
#+nil
'((:file "package")
(:file "math")
(:file "utils")
(:file "environment")
(:file "resources")
(:file "color")
(:file "channels")
(:file "shaders")
(:file "pen")
(:file "image")
(:file "font")
(:file "geometry")
(:file "drawing")
(:file "shapes")
(:file "transforms")
(:file "sketch")
(:file "figures")
(:file "controllers"))
'((:file "package")
(:file "sinewave")
(:file "life")
(:file "brownian")
(:file "hello-world")
(:file "lenna")
))
(defparameter *newline* (format nil "~%"))
(defun concatenate-files ()
(apply 'concatenate 'string
(apply 'append
(mapcar (lambda (x)
(let ((name (second x)))
(list
;;*newline*
;;";;;;"
*newline*
";;----------------------------------------------------------------------"
*newline*
";"
name
;;";;;;"
*newline*
*newline*
(alexandria:read-file-into-string
(merge-pathnames (concatenate 'string name ".lisp")
*dir*))
*newline*
)))
*files*))))
(defun dump (&optional (x (concatenate-files)))
(with-open-file
(stream (merge-pathnames "dump.lisp" *dir*) :direction :output :if-does-not-exist :create)
(princ x stream)))