-
Notifications
You must be signed in to change notification settings - Fork 0
/
apparence.asd
118 lines (106 loc) · 3.74 KB
/
apparence.asd
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ****h* system
;;; NAME
;;; system
;;;
;;; AUTHOR
;;; Ruben Philipp <[email protected]>
;;;
;;; CREATED
;;; 2024-02-23
;;;
;;; PURPOSE
;;; System definition for apparence.
;;;
;;;
;;; $$ Last modified: 23:12:26 Fri Apr 26 2024 CEST
;;; ****
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package :asdf-user)
(defmethod perform :after ((op load-op) apparence)
(pushnew :apparence cl-user::*features*))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defsystem "apparence"
:description "Common Lisp library for working with (moving) images."
:version "0.1.1"
:author "Ruben Philipp <[email protected]>"
:license "GPL Version 2.0 or later"
:serial t
:in-order-to ((test-op (test-op "apparence/tests")))
:depends-on ("alexandria"
"cl-ppcre"
;; this is necessary, as re-loading the cm-version that
;; comes with slippery-chicken might lead to naming conflicts
;; RP Tue Mar 12 16:17:06 2024
(:feature (:not :slippery-chicken) "cm")
"parse-float"
"serapeum"
"cl-svg"
"lparallel"
"vgplot"
"frugal-uuid/non-frugal"
"cl-pcg"
"imago"
"imago/pngload"
"imago/jpeg-turbo"
"easing")
:pathname "src/"
:components ((:file "package")
(:file "named-object")
(:file "parallel")
(:file "utilities")
(:file "globals")
(:file "random")
(:file "timeline")
(:file "seq")
(:file "image-file-seq")
(:file "slippery-chicken" :if-feature :slippery-chicken)
(:file "svg")
(:file "compositing")
(:file "imago")
(:file "image")
(:file "canvas")
(:file "projection")
(:file "projection-surface")
(:file "cylinder-mantle")
;; these need to be done lastly
(:file "init")
(:file "export-symbols")))
;;; regression tests
(defsystem "apparence/tests"
:description "Test suite for apparence."
:author "Ruben Philipp <[email protected]>"
:license "GPL Version 2.0 or later"
:depends-on ("apparence"
"fiveam")
:pathname "tests/"
:perform (test-op (o c) (symbol-call :apparence.tests :run-tests))
:components ((:file "tests")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Export all symbols
;;; RP Mon Feb 26 17:56:11 2024
;; (let ((package (find-package :apparence)))
;; (do-all-symbols (symb package)
;; (when (and (or (find-class symb nil)
;; (fboundp symb))
;; (eql (symbol-package symb) package))
;; (export symb package))))
(in-package :cl-user)
(defun apr (&optional (logo t))
(declare (special +apparence-src-path+))
(setf *package* (find-package :apparence))
(when logo
(let* (;;thanks to https://www.asciiart.eu/image-to-ascii for the logos
(apr-logos (uiop:directory-files
(concatenate 'string +apparence-src-path+
"txt/logo/")
"*.txt"))
(apr-logo (nth (random (length apr-logos)) apr-logos))
(in (open apr-logo :if-does-not-exist nil)))
(when in
(loop for line = (read-line in nil)
while line do (format t "~&~a" line))
(close in))))
t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; EOF apparence.asd