-
Notifications
You must be signed in to change notification settings - Fork 3
/
doc.lisp
32 lines (29 loc) · 924 Bytes
/
doc.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(defpackage :cl-influxdb.doc
(:use :cl))
(in-package :cl-influxdb.doc)
(annot:enable-annot-syntax)
(defun slurp-spit (pth file)
(with-open-file (f-stream (make-pathname :directory pth :name file) :direction :input)
(let ((seq (make-string (file-length f-stream))))
(read-sequence seq f-stream)
(write-sequence seq o-stream))
)
)
@export
(defun make-doc (pth)
(with-open-file (*standard-output*
(make-pathname :directory pth :name "README.md")
:direction :output
:if-exists :supersede)
(flet ((slurp-spit (pth file)
(with-open-file (f-stream (make-pathname :directory pth :name file)
:direction :input)
(let ((seq (make-string (file-length f-stream))))
(read-sequence seq f-stream)
(write-sequence seq *standard-output*))
)
))
(slurp-spit pth "README.txt")
(cl-influxdb.examples:exercise)
)
))