Browse Source

Corrections.

master
Silas Vedder 3 years ago
parent
commit
80fc69a8ec
  1. 12
      clog.lisp
  2. 3
      lift-search.lisp
  3. 16
      package.lisp
  4. 4
      search.lisp
  5. 4
      verse.lisp

12
clog.lisp

@ -24,7 +24,7 @@
(create-p div :content (ergebnis/se
(length results)))
(mapc (lambda (verse)
(v:verse-to-clog verse div :translation d::*translation*))
(v:verse-to-clog verse div :translation d:*translation*))
results)))
(defun searcher (window)
@ -64,25 +64,27 @@
(defun load-book (canvas book)
(let* ((win (window-content
(create-gui-window canvas :title (format nil "~A"
(create-gui-window canvas :title (format nil "~A: ~A"
d:*translation*
book)
:height 400
:width 650)))
(div (create-div win)))
(mapc (lambda (verse)
(v:verse-to-clog verse div :translation d::*translation*))
(v:verse-to-clog verse div :translation d:*translation*))
(s:find-book d:*bible* book))))
(defun load-chapter (canvas book chapter)
(let* ((win (window-content
(create-gui-window canvas :title (format nil "~A ~A"
(create-gui-window canvas :title (format nil "~A: ~A ~A"
d:*translation*
book
chapter)
:height 400
:width 650)))
(div (create-div win)))
(mapc (lambda (verse)
(v:verse-to-clog verse div :translation d::*translation*))
(v:verse-to-clog verse div :translation d:*translation*))
(s:find-chapter (s:find-book d:*bible* book) chapter))))
(defun get-chapter (window body)

3
lift-search.lisp

@ -5,8 +5,7 @@
(defun frequent-words () (str:words "der die das dir mir wir ihr sie sein mein dein euer unser dem den in zu und"))
(defun lift-search (search-result)
(comb (diff-verses (mapcar #'v:text
search-result))
(comb (diff-verses (mapcar #'v:get-text search-result))
(length search-result)))
(defun count-words (words)

16
package.lisp

@ -12,7 +12,8 @@
vnumber
text
notes
translations))
translations
get-text))
(defpackage #:cl-bible.search
(:use #:cl)
@ -21,12 +22,6 @@
find-book
find-chapter))
(defpackage #:cl-bible.lift-search
(:use #:cl)
(:local-nicknames (#:s #:cl-bible.search)
(#:v #:cl-bible.verse))
(:export lift-search))
(defpackage #:cl-bible.data
(:use #:cl)
(:local-nicknames (#:s #:cl-bible.search)
@ -37,6 +32,13 @@
persist
load-bibles))
(defpackage #:cl-bible.lift-search
(:use #:cl)
(:local-nicknames (#:s #:cl-bible.search)
(#:v #:cl-bible.verse)
(#:d #:cl-bible.data))
(:export lift-search))
(defpackage #:cl-bible.clog
(:use #:cl #:clog #:clog-gui)
(:local-nicknames (#:l #:cl-bible.lift-search)

4
search.lisp

@ -4,9 +4,7 @@
(defun find-in-bible (bible phrase)
(remove-if-not (lambda (verse) (search phrase
(cdr
(assoc cl-bible.data:*translation*
(v:translations verse)))))
(v:get-text verse)))
bible))
(defun find-book (bible book)

4
verse.lisp

@ -49,6 +49,10 @@
separator
(cdr (assoc translation (translations verse)))))
(defgeneric get-text (verse))
(defmethod get-text ((verse verse))
(cdr (assoc cl-bible.data:*translation* (translations verse))))
(defmethod show-notes ((verse verse) (parent clog:clog-obj))
(let* ((win (clog-gui:create-gui-window parent
:title "Notes"

Loading…
Cancel
Save