mirror of github:amycatgirl/amycatgirl.github.io
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: get-in-plist macro

Convenience macro that automatically creates getf chains for accessing
deep nested plists.

Signed-off-by: Amy <amy+git@amogus.cloud>

Amy eef20c61 4a291943

+7 -1
+7 -1
fallback.lisp
··· 14 14 (defun keywordize (name) 15 15 (intern (string-upcase name) "KEYWORD")) 16 16 17 + (defmacro get-in-plist (place indicators) 18 + (let ((rev-indicators (reverse indicators))) 19 + (labels ((construct (y ys) (cond 20 + ((null ys) (list 'getf place y)) 21 + (t (list 'getf (construct (car ys) (cdr ys)) y))))) 22 + (construct (car rev-indicators) (cdr rev-indicators))))) 23 + 17 24 ;; Git 18 25 (defun git-add (&rest files) 19 26 (run-command `("git" "add" ,@files))) 20 27 21 28 (defun git-commit (message) 22 29 (run-command `("git" "commit" "-m" ,(concatenate 'string "[fallback-gen] " message)))) 23 - 24 30 ;; HTTP 25 31 (defun build-query-params-from-plist (parameters) 26 32 "Build a string of URL-encoded query parameters from a plist."