Anonymous user
Simple database: Difference between revisions
→{{header|Common Lisp}}: improve file handling
(→{{header|Common Lisp}}: add function to list all episodes, implement some suggestions from the friendly people in #lisp) |
(→{{header|Common Lisp}}: improve file handling) |
||
Line 125:
:tags (parse-tags (prompt-read "Tags"))))
(defun save-db (
(let ((file (probe-file
(rename-file file (concatenate 'string (file-namestring file) ",1"))
(with-open-file (out file
Line 135:
(pprint database out))))))
(defun watch-save (dbfile)
(save-db
(defun load-db (
(with-open-file (in
(with-standard-io-syntax
(read in))))
(defun get-series (name database)
(
(defun get-episode-list (series database)
Line 212:
(defun main (argv)
(
((
((
((equal (cadr argv) "
(T (watch-series (cadr argv))))))
(main (argv))</lang>
|