Commit 58125ae6 authored by Antoine Martin's avatar Antoine Martin
Browse files

Move file operations to another file

parent 32006bb3
(in-package :quickref)
(defun clean-directory (path)
(dolist (dir (directory (merge-pathnames "*/" (truename path))))
(clean-directory dir)
(sb-ext:delete-directory dir))
(dolist (file (directory (merge-pathnames "*.*" (truename path))))
(delete-file file)))
(defun remove-directory (path)
(clean-directory path)
(sb-ext:delete-directory (truename path)))
(defun all-directories (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 all-texis (path)
(merge-pathnames "*/*.texi" (truename path)))
(defun get-texi-pathnames (path)
(loop for texi in (directory (all-texis path))
collect texi))
......@@ -3,4 +3,5 @@
:depends-on (:quicklisp :alexandria :split-sequence :qlmapper)
:serial t
:components ((:file "quickref")
(:file "website")))
(:file "website")
(:file "file")))
......@@ -33,19 +33,6 @@
(build-cell (car s))
(build-cell (car th))))))))
(defun all-directories (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 all-texis (path)
(merge-pathnames "*/*.texi" (truename path)))
(defun get-texi-pathnames (path)
(loop for texi in (directory (all-texis path))
collect texi))
(defun get-first-letter (sequence)
(subseq (remove-cl-prefix sequence) 0 1))
......@@ -126,17 +113,6 @@
(print-columns dir-list length file))
(format file "</body>~%")))
(defun clean-directory (path)
(dolist (dir (directory (merge-pathnames "*/" (truename path))))
(clean-directory dir)
(sb-ext:delete-directory dir))
(dolist (file (directory (merge-pathnames "*.*" (truename path))))
(delete-file file)))
(defun remove-directory (path)
(clean-directory path)
(sb-ext:delete-directory (truename path)))
(defun build-texis (path-to-texis texinfo-path)
(remove-directory "quickref")
(let ((texis (get-texi-pathnames path-to-texis)))
......
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