Commit 35703c36 authored by Liam M. Healy's avatar Liam M. Healy
Browse files

Dataflow with plists

parent 8a78a9a1
;; Antik system definition
;; Liam Healy 2010-12-24 09:43:28EST antik.asd
;; Time-stamp: <2014-01-07 23:22:41EST antik-base.asd>
;; Time-stamp: <2014-07-16 11:45:49EDT antik-base.asd>
;; Copyright 2011, 2012, 2013, 2014 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -27,7 +27,7 @@
:license "GPL v3"
:serial t
:defsystem-depends-on (#:asdf-system-connections)
:depends-on (#:iterate #:alexandria)
:depends-on (#:iterate #:alexandria #:metabang-bind)
:components
((:module init
:serial t
......@@ -47,7 +47,8 @@
(:file "float")
(:file "matlab")
(:file "org-mode")
(:file "write")))))
(:file "write")
(:file "plist")))))
(asdf:defsystem-connection #:antik-ppcre
:serial t
......
;; Dataflow with plists
;; Liam Healy 2014-07-16 11:39:11EDT plist.lisp
;; Time-stamp: <2014-07-16 11:53:38EDT plist.lisp>
;; Copyright 2014 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :antik)
(export '(plist-variables table-plist))
;;; This will need a special rebinding in inca:satfun
(defmacro plist-variables (&rest items)
"Make a plist of all the named variables with keyword keys for the variable names."
(cons 'list
(loop for item in items
appending (list (alexandria:make-keyword item) item))))
(defun table-plist (plist)
"Format the plist into an org-mode table."
(alexandria:doplist
(key val plist)
(format t "| ~(~a~) | ~a |~&" key val)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment