Mercurial > hg > amuse
comparison implementations/midi-db/methods.lisp @ 241:2138ea478adb
Improve printing of list-collections.
Ignore-this: 3073e6c1462cf98ca5752179ab6ecb1d
darcs-hash:20100414191443-16a00-e2f9962b0cea652890be18297fdbd4bf7d533c84.gz
committer: Jamie Forth <j.forth@gold.ac.uk>
author | j.forth <j.forth@gold.ac.uk> |
---|---|
date | Thu, 24 Feb 2011 11:23:18 +0000 |
parents | c454b4fc9aad |
children |
comparison
equal
deleted
inserted
replaced
240:c454b4fc9aad | 241:2138ea478adb |
---|---|
16 | 16 |
17 (defmethod list-collections ((package (eql *package*)) &key | 17 (defmethod list-collections ((package (eql *package*)) &key |
18 compositions (stream *standard-output*)) | 18 compositions (stream *standard-output*)) |
19 "FIXME: better formatting." | 19 "FIXME: better formatting." |
20 (let ((collection-rows (%get-all-collection-headers))) | 20 (let ((collection-rows (%get-all-collection-headers))) |
21 (flet ((print-separator (&optional (columns 77)) | 21 (flet ((print-separator (&optional (columns 70)) |
22 (format stream "~% ~A" | 22 (format stream "~%~A~%" |
23 (make-sequence 'string columns :initial-element #\-)))) | 23 (make-sequence 'string columns :initial-element #\-)))) |
24 (loop for collection-row in collection-rows | 24 (loop for collection-row in collection-rows |
25 do (destructuring-bind (collection-id collection-name description) | 25 do (destructuring-bind (collection-id collection-name description) |
26 collection-row | 26 collection-row |
27 (format stream "~%Collection-id: ~A~% Name: ~A~% Description: ~A~%" | 27 (format stream "~%Collection-id: ~A~% Name: ~A~% Description: ~A~%" |
40 (if collection-identifier | 40 (if collection-identifier |
41 (%get-all-collection-composition-headers | 41 (%get-all-collection-composition-headers |
42 collection-identifier) | 42 collection-identifier) |
43 (%get-all-composition-headers)))) | 43 (%get-all-composition-headers)))) |
44 (loop for composition-header in composition-headers | 44 (loop for composition-header in composition-headers |
45 do (destructuring-bind (collection-id filename timebase start | 45 do (destructuring-bind (collection-id composition-id filename |
46 duration owner version | 46 timebase start duration owner version creation-timestamp |
47 creation-timestamp | 47 deletion-timestamp) composition-header |
48 deletion-timestamp) | 48 (format stream "~%Collection-id: ~A Composition-id: ~A filename: ~A timebase: ~A start: ~A duration: ~A owner: ~A version: ~A created: ~A deleted: ~A~%" |
49 composition-header | 49 collection-id composition-id filename timebase |
50 (format stream "~%Collection-id: ~A filename: ~A timebase: ~A start: ~A duration: ~A owner: ~A version: ~A created: ~A deleted: ~A~%" | 50 start duration owner version creation-timestamp |
51 collection-id filename timebase start duration owner | 51 deletion-timestamp))))) |
52 version creation-timestamp deletion-timestamp))))) |