Skip to content

Instantly share code, notes, and snippets.

@snmsts
Created January 17, 2014 17:15
Show Gist options
  • Save snmsts/8477364 to your computer and use it in GitHub Desktop.
Save snmsts/8477364 to your computer and use it in GitHub Desktop.
test
;; -*- lisp -*-
(defvar *current-dir* (make-pathname :type nil :name nil :defaults *load-pathname*))
(push (merge-pathnames "quickdocs/" *current-dir*)
asdf:*central-registry*)
(defvar *output-dir* (merge-pathnames "out/1st/" *current-dir*))
(ql:quickload '(:quickdocs :iolib.syscalls))
(defun doc (a)
(let ((child-pid (iolib.syscalls:fork)))
(if (zerop child-pid)
(let ((str (string a)))
(ensure-directories-exist *output-dir*)
;(ql:quickload str)
(unwind-protect
(with-open-file (out (merge-pathnames str *output-dir*)
:direction :output
:if-exists :supersede)
(format out "~S"
(quickdocs.parser.util:with-retrying 5
(quickdocs.parser:parse-documentation (asdf:find-system str)))))
(progn
#+sbcl(sb-ext:exit :abort t))))
(progn
(iolib.syscalls:waitpid child-pid 0)))))
(defun all ()
(loop :for i :in (mapcar 'ql-dist:name (ql:system-list))
:do (print i)
(doc i)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment