Commit 52d1dd95 authored by Antoine Martin's avatar Antoine Martin
Browse files

Generate single files from texis.

Fixes #57
parent ffc52c68
......@@ -12,10 +12,19 @@
(defun all-directories (path)
(merge-pathnames "*/" (truename path)))
(defun all-files (path)
(merge-pathnames "*.*" (truename path)))
(defun get-directory-list (path)
(loop for dir in (directory (all-directories path))
collect (car (last (pathname-directory dir)))))
(defun get-file-list (path)
(loop for file in (directory (all-files path))
nconc (if (string= (pathname-name file) "index")
nil
(list (pathname-name file)))))
(defun all-texis ()
(merge-pathnames "*/*.texi" (quicklisp-software)))
......
......@@ -9,7 +9,7 @@
(2 (values (+ split 1) (+ split 1) split))))))
(defun build-cell (s)
(format nil "<td></td><td><a href=\"~A\">~A</a></td>" s s))
(format nil "<td></td><td><a href=\"~A.html\">~A</a></td>" s s))
(defun print-columns (l size file)
(multiple-value-bind (lfirst lsecond lthird)
......@@ -102,7 +102,7 @@
:if-exists :supersede
:if-does-not-exist :create)
(print-index-header file)
(let* ((dir-list (sort (get-directory-list quickref-dir) #'string<
(let* ((dir-list (sort (get-file-list quickref-dir) #'string<
:key #'remove-cl-prefix))
(current-letter (get-first-letter (first dir-list)))
(length 0)
......@@ -125,15 +125,14 @@
(defun build-texi (texi makeinfo-path &key (log-errors t))
(let ((out (with-output-to-string (out)
(sb-ext:run-program
;; #### FIXME: generate only one HTML file per library
;; (Cf. --no-split).
makeinfo-path
(list "--html" (namestring texi)
"-o" (namestring
(from-homedir
(format nil "quickref/~A" (pathname-name texi))))
(format nil "quickref/~A.html" (pathname-name texi))))
"--css-ref" "/document.css"
"-c" "TOP_NODE_UP_URL=/"
"--no-split"
;; #### FIXME: consider forcing only when logs are
;; enabled (see NCONC for example).
"--force")
......
Supports Markdown
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