X-Git-Url: http://git.hcoop.net/clinton/website/site-support.git/blobdiff_plain/e2d17eef6dabca19bcfc534d81fa3ede57163b1e..1dcca7dfa381dd77e60efabf8dcc86c82f14900a:/books.lisp diff --git a/books.lisp b/books.lisp index 383baea..40d0b53 100644 --- a/books.lisp +++ b/books.lisp @@ -61,9 +61,16 @@ :element-type 'extended-char :if-exists :supersede :if-does-not-exist :create) - (html-template:fill-and-print-template - template-path - (book-database-vars - (with-open-file (book-stream book-path :element-type 'extended-char) - (read book-stream))) - :stream muse-stream)))) + (let ((html-template:*string-modifier* #'identity)) + (html-template:fill-and-print-template + template-path + (book-database-vars + (sort (copy-list (with-open-file + (book-stream book-path :element-type 'extended-char) + (read book-stream))) + (lambda (e1 e2) + (let ((se1 (string-upcase (symbol-name (car (last e1))))) + (se2 (string-upcase (symbol-name (car (last e2)))))) + (string< se1 se2))) + :key #'car)) + :stream muse-stream)))))