2 print "(defvar *categories* (make-hash-table :test 'equal))"
3 print "(defvar *filenamebase*)"
6 print "(defun foo (lst)"
7 print " (loop :for x :in lst"
8 print " :collect (list *filenamebase* x)))"
14 print "(loop :for key :being :the :hash-keys of *categories* :using (hash-value value) :do"
15 print " (setq fn (concatenate 'string \"Category-\" key \".texi\"))"
16 print " (with-open-file (out-stream fn :direction :output :if-exists :overwrite :if-does-not-exist :create)"
17 print " (format out-stream \"~&@anchor{Category: ~A}\" key)"
18 print " (format out-stream \"~&@opencatbox\")"
19 print " (format out-stream \"~&@b{Category: ~A}~%~%\" key
)"
20 print " (setq items value
)"
21 print " (cond
((> (length items
) 0)"
22 print " (setq items
(sort items
#'string< :key #'third))"
23 print " (loop :for x :in items"
24 print " :for y :from 1"
25 print " :when (> y 1)"
26 print " :do (format out-stream \"~&@html~%·~%@end html\")"
27 print " :do (format out-stream \"~&@ref{Item: ~A/~A/~A, ~A}\" (first x) (first (second x)) (second (second x)) (second (second x))))))"
28 print " (format out-stream \"~&@closecatbox\")))"