File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change
1
+ (defvar *paip-pdf-uri* " https://github.com/norvig/paip-lisp/raw/master/" )
2
+
3
+ (defun open-pdf (&optional (part 1 ))
4
+ (let* ((name (format nil " PAIP-part~A .pdf" part))
5
+ (path (namestring
6
+ (merge-pathnames
7
+ name
8
+ (asdf :system-source-directory (asdf :find-system :paip ))))))
9
+ (when (<= 1 part 2 )
10
+ (unless (probe-file path)
11
+ #+ quicklisp(ql :quickload :dexador )
12
+ (uiop :symbol-call :dex :fetch (format nil " ~A~A " *paip-pdf-uri* name) path))
13
+ #+ quicklisp(ql :quickload :trivial-open-browser )
14
+ (uiop :symbol-call :trivial-open-browser :open-browser path)
15
+ path)))
Original file line number Diff line number Diff line change 1
1
(defpackage paip
2
2
(:use :cl )
3
3
(:shadow :defconstant )
4
- (:export :requires :*paip-files* :do-examples ))
4
+ (:export :requires :*paip-files* :do-examples :open-pdf ))
5
5
6
6
(in-package :paip )
7
7
28
28
:components
29
29
((:file " auxfns" )
30
30
(:file " tutor" )
31
- (:file " examples" ))))
31
+ (:file " examples" )
32
+ (:file " open-pdf" ))))
32
33
:description " Lisp code for the textbook \" Paradigms of Artificial Intelligence Programming\" " )
You can’t perform that action at this time.
0 commit comments