Browse Source

Changes.

master
Silas Vedder 3 years ago
parent
commit
7b2d72eaf2
  1. 19
      cl-bible.lisp

19
cl-bible.lisp

@ -2,14 +2,18 @@
(in-package #:cl-bible)
(defvar *bible* '())
(defun init-bible (&optional (bible "mng"))
(setf *bible*
(mapcar #'string->verse
(uiop:read-file-lines
(format nil "resources/~A.tsv" bible)))))
(defvar *bible*)
(defvar *mng* (init-bible))
(defvar *vul* (init-bible "vul"))
(defvar *grb* (init-bible "grb"))
(defvar *kjv* (init-bible "kjv"))
(defun lift-search-window (body search)
(lambda (obj)
(declare (ignore obj))
@ -40,6 +44,13 @@
(lambda (phrase)
(search-in-bible phrase window)))))
(defun update-bible (str)
(let ((bibles `(("mng" . ,*mng*)
("kjv" . ,*kjv*)
("vul" . ,*vul*)
("grb" . ,*grb*))))
(setf *bible* (cdr (assoc str bibles :test #'string=)))))
(defun reload (window)
(lambda (obj)
(declare (ignore obj))
@ -49,8 +60,8 @@
("Vulgata" "vul")
("Greek Bible" "grb"))))
(lambda (results)
(init-bible (cadar results)))
:title "Load a Bible")))
(update-bible (cadar results))
:title "Load a Bible"))))
(defun load-chapter (canvas)
(lambda (data)

Loading…
Cancel
Save