diff options
author | Colin Okay <okay@toyful.space> | 2022-03-12 19:07:19 -0600 |
---|---|---|
committer | Colin Okay <okay@toyful.space> | 2022-03-12 19:07:19 -0600 |
commit | 50df94fd2a0fce7a2499a8ceafd6034adc69779e (patch) | |
tree | bf9a19a2edf9f2eecf33b9177f99b8e20e73e880 /lib/oneliner.lisp | |
parent | b053af5357bdbcc556e0a54723feceed5091f535 (diff) |
bugfix: s/defstruct/defplist. made defplist
Diffstat (limited to 'lib/oneliner.lisp')
-rw-r--r-- | lib/oneliner.lisp | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/lib/oneliner.lisp b/lib/oneliner.lisp index 39aad0d..4828b2d 100644 --- a/lib/oneliner.lisp +++ b/lib/oneliner.lisp @@ -18,7 +18,7 @@ (in-package :oneliners.cli) -(defstruct oneliner +(defplist oneliner id name oneliner @@ -78,22 +78,19 @@ (concatenate 'string "~" (prin1-to-string *term-width*) "<~a~;by ~a~>~%"))) (loop repeat *term-width* do (princ #\_)) (terpri) - (with-slots - (id name isflagged islocked runstyle tags createdby brief oneliner) ol - - (format t title-line-format-str - id - (or name " ") - (format nil "~:[ ~;⚠~]~:[ ~;🔒~]~:[ ~;📋~]" - isflagged - islocked - (equalp "manual" runstyle))) - (format t tags-line-format-string - (format nil "tags: ~{~a~^ ~}" tags) - createdby) - (loop - for x from 0 to (length brief) by *term-width* - do (format t "~a~%" - (string-trim '(#\space) - (alexandria-2:subseq* brief x (+ x *term-width*))))) - (format t "~%~a~%~%" oneliner)))) + (format t title-line-format-str + (oneliner-id ol) + (or (oneliner-name ol) " ") + (format nil "~:[ ~;⚠~]~:[ ~;🔒~]~:[ ~;📋~]" + (oneliner-isflagged ol) + (oneliner-islocked ol) + (equalp "manual" (oneliner-runstyle ol)))) + (format t tags-line-format-string + (format nil "tags: ~{~a~^ ~}" (oneliner-tags ol)) + (oneliner-createdby ol)) + (loop + for x from 0 to (length (oneliner-brief ol)) by *term-width* + do (format t "~a~%" + (string-trim '(#\space) + (alexandria-2:subseq* (oneliner-brief ol) x (+ x *term-width*))))) + (format t "~%~a~%~%" (oneliner-oneliner ol)))) |