The Project Isidore Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The Project Isidore Reference Manual

This is the Project Isidore Reference Manual, version 1.2.1, generated automatically by Declt version 4.0b2.


Next: , Previous: , Up: Top   [Contents][Index]

1 Systems

The main system appears first, followed by any subsystem dependency.


Next: , Previous: , Up: Systems   [Contents][Index]

1.1 project-isidore

Personal Web Application

Maintainer

Benedict Hanshen Wang <foss@bhw.name>

Author

Benedict Hanshen Wang <foss@bhw.name>

Home Page

https://www.benedicthanshenwang.com/blog/project-isidore-doc.html

Source Control

(GIT https://gitlab.com/bhw/project-isidore.git)

Bug Tracker

https://gitlab.com/bhw/project-isidore/issues

License

GNU Affero General Public License 3.0 or later

Long Description

Project Isidore is currently a blog as well as a modern reproduction of the 1859 Haydock Bible.

Version

1.2.1

Defsystem Dependency

deploy (system).

Dependencies
Source

project-isidore.asd.


Next: , Previous: , Up: Systems   [Contents][Index]

1.2 project-isidore/packages

Maintainer

Benedict Hanshen Wang <foss@bhw.name>

Author

Benedict Hanshen Wang <foss@bhw.name>

Home Page

https://www.benedicthanshenwang.com/blog/project-isidore-doc.html

Source Control

(GIT https://gitlab.com/bhw/project-isidore.git)

Bug Tracker

https://gitlab.com/bhw/project-isidore/issues

License

GNU Affero General Public License 3.0 or later

Dependencies
Source

project-isidore.asd.


Next: , Previous: , Up: Systems   [Contents][Index]

1.3 project-isidore/model

Maintainer

Benedict Hanshen Wang <foss@bhw.name>

Author

Benedict Hanshen Wang <foss@bhw.name>

Home Page

https://www.benedicthanshenwang.com/blog/project-isidore-doc.html

Source Control

(GIT https://gitlab.com/bhw/project-isidore.git)

Bug Tracker

https://gitlab.com/bhw/project-isidore/issues

License

GNU Affero General Public License 3.0 or later

Dependencies
Source

project-isidore.asd.


Next: , Previous: , Up: Systems   [Contents][Index]

1.4 project-isidore/theophilus

Maintainer

Benedict Hanshen Wang <foss@bhw.name>

Author

Benedict Hanshen Wang <foss@bhw.name>

Home Page

https://www.benedicthanshenwang.com/blog/project-isidore-doc.html

Source Control

(GIT https://gitlab.com/bhw/project-isidore.git)

Bug Tracker

https://gitlab.com/bhw/project-isidore/issues

License

GNU Affero General Public License 3.0 or later

Dependencies
Source

project-isidore.asd.


Next: , Previous: , Up: Systems   [Contents][Index]

1.5 project-isidore/data

Maintainer

Benedict Hanshen Wang <foss@bhw.name>

Author

Benedict Hanshen Wang <foss@bhw.name>

Home Page

https://www.benedicthanshenwang.com/blog/project-isidore-doc.html

Source Control

(GIT https://gitlab.com/bhw/project-isidore.git)

Bug Tracker

https://gitlab.com/bhw/project-isidore/issues

License

GNU Affero General Public License 3.0 or later

Source

project-isidore.asd.


Next: , Previous: , Up: Systems   [Contents][Index]

1.6 project-isidore/views

Maintainer

Benedict Hanshen Wang <foss@bhw.name>

Author

Benedict Hanshen Wang <foss@bhw.name>

Home Page

https://www.benedicthanshenwang.com/blog/project-isidore-doc.html

Source Control

(GIT https://gitlab.com/bhw/project-isidore.git)

Bug Tracker

https://gitlab.com/bhw/project-isidore/issues

License

GNU Affero General Public License 3.0 or later

Dependencies
Source

project-isidore.asd.


Next: , Previous: , Up: Systems   [Contents][Index]

1.7 project-isidore/styles

Maintainer

Benedict Hanshen Wang <foss@bhw.name>

Author

Benedict Hanshen Wang <foss@bhw.name>

Home Page

https://www.benedicthanshenwang.com/blog/project-isidore-doc.html

Source Control

(GIT https://gitlab.com/bhw/project-isidore.git)

Bug Tracker

https://gitlab.com/bhw/project-isidore/issues

License

GNU Affero General Public License 3.0 or later

Dependency

cl-css (system).

Source

project-isidore.asd.


Next: , Previous: , Up: Systems   [Contents][Index]

1.8 project-isidore/controller

Maintainer

Benedict Hanshen Wang <foss@bhw.name>

Author

Benedict Hanshen Wang <foss@bhw.name>

Home Page

https://www.benedicthanshenwang.com/blog/project-isidore-doc.html

Source Control

(GIT https://gitlab.com/bhw/project-isidore.git)

Bug Tracker

https://gitlab.com/bhw/project-isidore/issues

License

GNU Affero General Public License 3.0 or later

Dependencies
Source

project-isidore.asd.


Previous: , Up: Systems   [Contents][Index]

1.9 project-isidore/webserver

Maintainer

Benedict Hanshen Wang <foss@bhw.name>

Author

Benedict Hanshen Wang <foss@bhw.name>

Home Page

https://www.benedicthanshenwang.com/blog/project-isidore-doc.html

Source Control

(GIT https://gitlab.com/bhw/project-isidore.git)

Bug Tracker

https://gitlab.com/bhw/project-isidore/issues

License

GNU Affero General Public License 3.0 or later

Dependencies
Source

project-isidore.asd.


Next: , Previous: , Up: Top   [Contents][Index]

2 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

2.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

2.1.1 project-isidore/project-isidore.asd

Source

project-isidore.asd.

Parent Component

project-isidore (system).

ASDF Systems

Next: , Previous: , Up: Lisp files   [Contents][Index]

2.1.2 project-isidore/packages/file-type.lisp

Source

project-isidore.asd.

Parent Component

project-isidore/packages (system).

Packages

project-isidore/packages.

Public Interface

list-project-isidore-dependencies (function).

Internals

package-dependencies (function).


Next: , Previous: , Up: Lisp files   [Contents][Index]

2.1.3 project-isidore/model/file-type.lisp

Source

project-isidore.asd.

Parent Component

project-isidore/model (system).

Packages

project-isidore/model.

Public Interface
Internals

Next: , Previous: , Up: Lisp files   [Contents][Index]

2.1.4 project-isidore/theophilus/file-type.lisp

Source

project-isidore.asd.

Parent Component

project-isidore/theophilus (system).

Packages

project-isidore/theophilus.


Next: , Previous: , Up: Lisp files   [Contents][Index]

2.1.5 project-isidore/data/file-type.lisp

Source

project-isidore.asd.

Parent Component

project-isidore/data (system).

Packages

project-isidore/data.

Public Interface

Next: , Previous: , Up: Lisp files   [Contents][Index]

2.1.6 project-isidore/views/file-type.lisp

Source

project-isidore.asd.

Parent Component

project-isidore/views (system).

Packages

project-isidore/views.

Public Interface
Internals

Next: , Previous: , Up: Lisp files   [Contents][Index]

2.1.7 project-isidore/styles/file-type.lisp

Source

project-isidore.asd.

Parent Component

project-isidore/styles (system).

Packages

project-isidore/styles.

Public Interface
Internals

Next: , Previous: , Up: Lisp files   [Contents][Index]

2.1.8 project-isidore/controller/file-type.lisp

Source

project-isidore.asd.

Parent Component

project-isidore/controller (system).

Packages

project-isidore/controller.

Public Interface
Internals

Previous: , Up: Lisp files   [Contents][Index]

2.1.9 project-isidore/webserver/file-type.lisp

Source

project-isidore.asd.

Parent Component

project-isidore/webserver (system).

Packages

project-isidore/webserver.


Next: , Previous: , Up: Top   [Contents][Index]

3 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

3.1 project-isidore/views

Project Isidore Web Page View Generation.

Uses the CL-WHO and PARENSCRIPT libraries to generate both HTML and Javascript respectively.

CSS is generated in STYLES.LISP.

When developing with both the =view= and =style= files, it is useful to view the generated HTML, CSS or JS. However SLIME or SLY will cut off long streams in the REPL and insert =[sly-elided string of length x]=. To disable this behavior,

#+begin_src lisp
;; https://github.com/joaotavora/sly/issues/334
;; Consider putting this in your .sbclrc or lisp configuration file.
(setf (cdr (assoc ’slynk:*string-elision-length* slynk:*slynk-pprint-bindings*)) nil) #+end_src

https://idlewords.com/talks/website_obesity.htm

Source

file-type.lisp.

Use List

common-lisp.

Used By List

project-isidore/packages.

Public Interface
Internals

Next: , Previous: , Up: Packages   [Contents][Index]

3.2 project-isidore/styles

Project Isidore Cascading Styles Sheets.

Generate GLOBAL.CSS from sexp notation. Provide static styling.

See VIEWS.LISP for HTML generation.

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

Next: , Previous: , Up: Packages   [Contents][Index]

3.3 project-isidore/controller

Project Isidore Web Interface.

Starting the Web server for the application is defined by ‘initialize-application’. The Project Isidore web interface has a rough mapping onto the Model View Controller (MVC) design pattern.

Project Isidore Controller.

This package contains URI handler and routing logic.

1. Serve static assets via HTTP.

This includes the HTML blog articles, reference manual, code coverage report, external CSS files, JS files, webp photos and png photos all located under "project-isidore/assets/". See the ‘hunchentoot:create-folder-dispatcher-and-handler’ form.

‘hunchentoot:define-easy-handler’ links an uri with a function postfixed with ’-page’. It is said function which will generate the "view", or output HTML.

2. Serve dynamically generated HTML via HTTP.

See ‘index-page’ (inline CSS + JS example), ‘about-page’, ‘work-page’ and ‘contact-page’.

3. Serve dynamically generated HTML from persistent CLOS object state via HTTP.

Persistent CLOS object state equals our datastore in this use case. ‘create-datastore’ as defined in MODEL.LISP deserializes data found in the "project-isidore/data/" See ‘bible-page’.

4. Serve Websocket resources.

Work-in-progress.

Source

file-type.lisp.

Use List
Used By List

project-isidore/packages.

Public Interface
Internals

Next: , Previous: , Up: Packages   [Contents][Index]

3.4 project-isidore/webserver

Added features to the Hunchentoot web server

1. URL routing library in Snooze.

2. Websocket protocol, RFC 6455, with Clog (transitive dependency on websocket-driver).

3. A thread-pooling taskmaster for better performance with quux-hunchentoot.

Reexport symbols in these three packages under one unified namespace: webserver.

"New features also include :mix and :reexport. :mix mixes imported symbols from several packages: when multiple packages export symbols with the same name, the conflict is automatically resolved in favor of the package named earliest, whereas an error condition is raised when using the standard :use clause. :reexport reexports the same symbols as imported from given packages, and/or exports instead the same-named symbols that shadow them. ASDF 3.1 adds :mix-reexport and :use-reexport, which combine :reexport with :mix or :use in a single statement, which is more maintainable than repeating a list of packages."

– http://fare.tunes.org/files/asdf3/asdf3-2014.html

Source

file-type.lisp.

Use List

Next: , Previous: , Up: Packages   [Contents][Index]

3.5 project-isidore/packages

Project Isidore Meta Package.

Export a single package PROJECT-ISIDORE with all the external symbols from all inferred packages. Inferred here is taken to signify the ASDF Package Inferred System.

For the web application entry point, see INITIALIZE-APPLICATION. This symbol is located in APPLICATION.LISP. For a comprehensive index of exported symbols and definitions, see the Reference Manual at /project-isidore/assets/reference/manual.html

Source

file-type.lisp.

Nickname

project-isidore

Use List
Public Interface

list-project-isidore-dependencies (function).

Internals

package-dependencies (function).


Next: , Previous: , Up: Packages   [Contents][Index]

3.6 project-isidore/theophilus

If the Aristotelian tradition so loved and integrated by the Angelic Doctor shares heritage with the Greek culture within the great Library of Alexandria, and its so-called daughter of the great Library, the temple of Serapeum, then let Saint Theophilus of Alexandria be the discerning flame that took what is good and true from said traditions – while fighting idolotrous aspects – and handed it down to Western Civilization (nee Christendom).

https://en.wikipedia.org/wiki/Serapeum_of_Alexandria

It’s a personal utility package. Clearly I have nothing better to do than to come up with fanciful names.

Symbol Conflicts:

1. SCAN, SERIES, SERAPEUM

Reexport symbols in these utility packages under one unified namespace.

Source

file-type.lisp.

Use List

Next: , Previous: , Up: Packages   [Contents][Index]

3.7 project-isidore/data

Project Isidore Data.

I have tried putting these in their own class and slot in BKNR.DATASTORE, however this results in a 100% percent increase in performance cost.

Source

file-type.lisp.

Use List

common-lisp.

Public Interface

Previous: , Up: Packages   [Contents][Index]

3.8 project-isidore/model

Project Isidore Object Schema.

Data serialization & interchange.
How to represent tree structure? XML, JSON or SEXP? https://unthought.net/2016/08/16-xml-json-trees-and-lisp/ https://eli.thegreenplace.net/2012/03/04/some-thoughts-on-json-vs-s-expressions

Microsoft Word uses compressed XML. Web browsers render (X)HTML. Jupyter notebooks use JSON. I see no benefits to inserting an extra layer. CLOS Object > JSON > (X)HTML.

Source

file-type.lisp.

Use List
Used By List

project-isidore/packages.

Public Interface
Internals

Next: , Previous: , Up: Top   [Contents][Index]

4 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

4.1 Public Interface


Next: , Previous: , Up: Public Interface   [Contents][Index]

4.1.1 Special variables

Special Variable: *bhw-vhost*

To be used in ‘initialize-application’ to create an instance of class ‘vhost’ to listen to a PORT

Package

project-isidore/controller.

Source

file-type.lisp.

Special Variable: *gt-vhost*

To be used in ‘initialize-application’ to create an instance of class ‘vhost’ to listen to a PORT

Package

project-isidore/controller.

Source

file-type.lisp.

Special Variable: *reference-regex*

Regex explanation.
[1-4]? 4 K. is the highest for 4 Kings. ? signifies the number may or may not be there.
s whitespace.
[a-zA-Z]{1,15} Paralipomenon is the longest book name I have found thus far. . optional period.
s whitespace.
[0-9]{1,3} 3 digits that make up a chapter number.
: colon.
[0-9]{1,3} 3 digits that make up a verse number.
An extra backslash is need to escape the backslash itself.

Package

project-isidore/model.

Source

file-type.lisp.

Special Variable: +bible-book-numbers-alist+
Package

project-isidore/data.

Source

file-type.lisp.

Special Variable: +bible-book-url-alist+

Associative list of bible books with their respective links for easy conversion into HTML links.

Package

project-isidore/data.

Source

file-type.lisp.

Special Variable: +bible-chapter-url-alist+

Associative list of bible chapters with their respective links for easy conversion into HTML links.

Package

project-isidore/data.

Source

file-type.lisp.


Next: , Previous: , Up: Public Interface   [Contents][Index]

4.1.2 Ordinary functions

Function: 400-condition-page ()

See the appropriate ‘rip:explain-condition’ method.

Package

project-isidore/views.

Source

file-type.lisp.

Function: 404-condition-page (wanted-dead-or-alive)

See the appropriate ‘rip:explain-condition’ method.

Package

project-isidore/views.

Source

file-type.lisp.

Function: about-page ()
Package

project-isidore/views.

Source

file-type.lisp.

Function: application-toplevel ()

Application entry point. Emulate a "main" function. Used in SAVE-LISP-AND-DIE to save Application as a Lisp image. Note PORT is a keyword argument that defaults to 8080. Heroku dynamically sets the PORT variable to be binded.

Package

project-isidore/controller.

Source

file-type.lisp.

Function: bible-book-convert-dwim (book)

Given a Bible book string name or integer, convert to the opposite format.

Example:
(bible-book-convert-dwim "Matthew") => 47
(bible-book-convert-dwim 47) => "Matthew"

Package

project-isidore/model.

Source

file-type.lisp.

Function: bible-obj-with-id (bible-uid)

Returns the instance of object class ‘bible’ when BIBLE-UID matches UNIQUE-ID. If BIBLE-UID is invalid return NIL. The BIBLE-UID can be found by calling ‘get-bible-uid’.

Package

project-isidore/model.

Source

file-type.lisp.

Function: bible-page (uid-list)

Serializes into HTML view all objects of class ‘bible’ apropos each ‘unique-id-of’ in UID-LIST. UID-LIST validation is done by the URL route handler ‘bible’

CL-USER> (bible-page ’(1 2 3 37198))

Package

project-isidore/views.

Source

file-type.lisp.

Function: bible-search-page (query)

127.0.0.1:8080/bible?query=chicken where QUERY "chicken" is a string.

DIV ID’s
——–
query-syntax
query-tutorial
query-form

Package

project-isidore/views.

Source

file-type.lisp.

Function: contact-page ()
Package

project-isidore/views.

Source

file-type.lisp.

Function: generate-global-css ()

Generates global.css file in the #P/project-isidore/assets/global.css

Package

project-isidore/styles.

Source

file-type.lisp.

Function: get-bible-text (bible-uid)

Returns the text slot of object class ‘bible’ in a string. If BIBLE-UID is invalid return NIL. The BIBLE-UID can be found by calling ‘get-bible-uid’.

Package

project-isidore/model.

Source

file-type.lisp.

Function: get-bible-uid (book chapter verse)

Return a unique identifier assigned to each instance of class ‘bible’.
As class ‘bible’ is of CLOS metaclass ‘db:persistent-class’, this
returns the aforementioned unique identifier as an integer value bound to slot ID. BOOK CHAPTER and VERSE must be an integer with the range 1 - 35817.

Example:
(get-bible-uid 47 3 6) => 27917
(get-bible-uid 12983 29394 2938498) => NIL

Package

project-isidore/model.

Source

file-type.lisp.

Function: get-cross-references-text (bible-uid)

Returns a string if bible-uid is valid else return NIL.
Only get text if commentary exists for given BIBLE-UID.
The bible-uid can be found by calling ‘get-bible-uid’ with valid arguments.

Package

project-isidore/model.

Source

file-type.lisp.

Unlike ‘get-cross-references-text’, the ’with-links’ variation will take the cross references in the verse itself (if any exist) and ‘encode-cross-references-to-html-links’. Return NIL otherwise.

Example:

(get-cross-references-text-with-links
(get-bible-uid (bible-book-convert-dwim "Leviticus") 2 3))

=> "<a href="/bible/26-7-34">Ecclesiasticus 7:34</a>.", T

Package

project-isidore/model.

Source

file-type.lisp.

Function: get-footnotes-text (bible-uid)

Returns a string if bible-uid is valid else return NIL.
Only get text if commentary exists for given BIBLE-UID.
The bible-uid can be found by calling ‘get-bible-uid’ with valid arguments.

Example:

(get-footnotes-text (get-bible-uid (bible-book-convert-dwim "Leviticus") 2 3))

=> "Holy of holies. That is, most holy; as being dedicated to God, and set aside by his ordinance for the use of his priests. (Challoner) — All was to be eaten or consumed in the tabernacle. The high priest offered a gomor full of flour and oil, rather baked, every day, Leviticus 6:20. (Calmet)"

(get-footnotes-text (get-bible-uid (bible-book-convert-dwim "Leviticus") 999 999))

=> The value
NIL
is not of type
REAL
[Condition of type TYPE-ERROR]

Package

project-isidore/model.

Source

file-type.lisp.

Unlike ‘get-footnotes-text’, the ’with-links’ variation will take the cross references in the footnote text (if any exist) and ‘encode-cross-references-to-html-links’. Return NIL otherwise.

Example:

(get-footnotes-text-with-links
(get-bible-uid (bible-book-convert-dwim "Leviticus") 2 3))

=> "Holy of holies. That is, most holy; as being dedicated to God, and set aside by his ordinance for the use of his priests. (Challoner) — All was to be eaten or consumed in the tabernacle. The high priest offered a gomor full of flour and oil, rather baked, every day,<a href="/bible/3-6-20"> Leviticus 6:20</a>. (Calmet)", T

Package

project-isidore/model.

Source

file-type.lisp.

Function: get-heading-text (bible-uid)

Returns the title slot of object class ‘bible’ in a string. If BIBLE-UID is invalid return NIL. The BIBLE-UID can be found by calling ‘get-bible-uid’.

Package

project-isidore/model.

Source

file-type.lisp.

Function: index-css ()
Package

project-isidore/styles.

Source

file-type.lisp.

Function: index-page ()
Package

project-isidore/views.

Source

file-type.lisp.

Function: initialize-application (&key bhw-port gt-port)

Start a web server at PORT. Takes a PORT parameter as Heroku assigns a different PORT per dyno/environment. CMD-USER-INTERFACE when set to true will determine cause C-c (control+c) to exit.

Slynk server is used to connect to a running production LISP image.

See APPLICATION-TOPLEVEL for the main function or entry point in MAKE.LISP.

Package

project-isidore/controller.

Source

file-type.lisp.

Function: list-project-isidore-dependencies ()

Returns a list of all third party libraries needed to load Project Isidore. Example:
(in-package :cl-user)
(list-project-isidore-dependencies) =>

Package

project-isidore/packages.

Source

file-type.lisp.

Function: make-bible-chapter-url-list (uid-list)

Selects the right links from ‘data:+bible-chapter-url-alist+’ based on the interval created from the first and last elements of list UID-LIST. Note that for an interval that is within a single book or single chapter, the function is recursed to cover all chapters within the book. If this is not done during the former case of a single book, then the last chapter will be cut off as a result of an off by one error.

Example:

(project-isidore/model:make-bible-chapter-url-list ’(10 91)) =>

(("/bible/1-1-1/1-1-31" . "Genesis 1")
("/bible/1-2-1/1-2-25" . "Genesis 2")
("/bible/1-3-1/1-3-24" . "Genesis 3"))

Package

project-isidore/model.

Source

file-type.lisp.

Function: negative-range-condition-page (invalid-range)

See the appropriate ‘rip:explain-condition’ method. INVALID-RANGE is a list of two numbers representing the first and last BIBLE-UID present in invalid GET request. In the interest of adhering to the principle of least surprise, a condition is thrown instead of silently swapping the two numbers.

Package

project-isidore/views.

Source

file-type.lisp.

Function: reopen-fd-streams ()

To create an executable binary, MAKE.LISP calls ‘sb-ext:save-lisp-and-die’, which closes all open file streams. We open ‘*search-index*’ and ‘*database*’ again upon application start.

Package

project-isidore/model.

Source

file-type.lisp.

Function: search-bible (query &optional options)

Searches the Bible and Haydock’s commentary. Returns an association list of Bible unique ID’s and a relevance score

Package

project-isidore/model.

Source

file-type.lisp.

Function: subscribe-page ()
Package

project-isidore/views.

Source

file-type.lisp.

Function: terminate-application (&optional sigint-poll)

Stop the web server started by ‘initialize-application’, if it exists. When called with a non NIL value for SIGINT-POLL, it will listen for SIGINT (Catch a user’s Control-c in the terminal) and gracefully shut down the web server and exit the lisp process. ‘lparallel:kill-tasks’ is called to ensure termination of blocking threads.

Package

project-isidore/controller.

Source

file-type.lisp.

Function: valid-bible-uid-p (test-uid)

If instance of object class ‘bible’ has slot ‘unique-id-of’ that matches with provided TEST-UID return TRUE, else return NIL. TEST-UID must be of type INTEGER.

> (valid-bible-uid-p 1234)
T
> (valid-bible-uid-p 23898389)
NIL
> (valid-bible-uid-p ’98fj)
SIMPLE-TYPE-ERROR

Package

project-isidore/model.

Source

file-type.lisp.

Function: work-page ()
Package

project-isidore/views.

Source

file-type.lisp.


Next: , Previous: , Up: Public Interface   [Contents][Index]

4.1.3 Generic functions

Generic Reader: cross-references-of (object)
Package

project-isidore/model.

Methods
Reader Method: cross-references-of ((bible bible))

Cross references of object instance.

Source

file-type.lisp.

Target Slot

cross-references.

Generic Reader: footnotes-of (object)
Package

project-isidore/model.

Methods
Reader Method: footnotes-of ((bible bible))

Haydock text of the object instance.

Source

file-type.lisp.

Target Slot

footnotes.

Generic Reader: heading-of (object)
Package

project-isidore/model.

Methods
Reader Method: heading-of ((bible bible))

The reference verse includes the book, chapter and line number. Ex. "((BOOK . 1) (CHAPTER . 2) (VERSE . 3))"

Source

file-type.lisp.

Target Slot

heading.

Generic Reader: text-of (object)
Package

project-isidore/model.

Methods
Reader Method: text-of ((bible bible))

Text of the object instance.

Source

file-type.lisp.

Target Slot

text.

Generic Reader: unique-id-of (object)
Package

project-isidore/model.

Methods
Reader Method: unique-id-of ((bible bible))

automatically generated reader method

Source

file-type.lisp.

Target Slot

unique-id.


Next: , Previous: , Up: Public Interface   [Contents][Index]

4.1.4 Standalone methods

Method: acceptor-dispatch-request ((vhost vhost) request)
Package

hunchentoot.

Source

file-type.lisp.

Method: explain-condition ((condition negative-range) (resource (eql #<snooze-common:resource-generic-function project-isidore/controller::bible (2)>)) (ct text/html))
Package

snooze.

Source

file-type.lisp.


Previous: , Up: Public Interface   [Contents][Index]

4.1.5 Classes

Class: bible

Each verse of the Bible is created as an object instance of class ‘bible’, each with appropriate text in it’s slot. FOOTNOTES however, may be unbound.

Package

project-isidore/model.

Source

file-type.lisp.

Direct superclasses

persistent-object.

Direct methods
Direct slots
Slot: unique-id
Type

fixnum

Initargs

:unique-id

Readers

unique-id-of.

Writers

This slot is read-only.

Slot: heading

The reference verse includes the book, chapter and line number. Ex. "((BOOK . 1) (CHAPTER . 2) (VERSE . 3))"

Type

cons

Initargs

:heading

Readers

heading-of.

Writers

This slot is read-only.

Slot: text

Text of the object instance.

Type

string

Initargs

:text

Readers

text-of.

Writers

This slot is read-only.

Slot: cross-references

Cross references of object instance.

Type

string

Initargs

:cross-references

Readers

cross-references-of.

Writers

This slot is read-only.

Slot: footnotes

Haydock text of the object instance.

Type

string

Initargs

:footnotes

Readers

footnotes-of.

Writers

This slot is read-only.


Previous: , Up: Definitions   [Contents][Index]

4.2 Internals


Next: , Previous: , Up: Internals   [Contents][Index]

4.2.1 Special variables

Special Variable: *database*

Project Isidore uses an OODBMS (Object-Oriented Database Management System) to store persistent state in the form of conses, vectors and CLOS objects.

Package

project-isidore/model.

Source

file-type.lisp.

Special Variable: *search-index*

Used in ‘search-bible’ to query Bible data. Since ‘sb-ext:save-lisp-and-die’ closes all open streams, this parameter is set during ‘initialize-application’.

Package

project-isidore/model.

Source

file-type.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

4.2.2 Macros

Macro: bible-page-template ((&key title) &body body)

Template HTML for bible webpages. It removes the top banner navigation located in the ‘web-page-template’ macro and the copyright footer. The work is in the public domain and frankly I think it’s tacky to plaster the top navbar with my name.

Package

project-isidore/views.

Source

file-type.lisp.

Macro: web-page-template ((&key title) &body body)

Template HTML for application webpages. Other than the landing page (aka ’index.html’), the static blog post HTML files and other generated HTML files, all other web app pages uses this boilerplate.

Package

project-isidore/views.

Source

file-type.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

4.2.3 Ordinary functions

Function: bg-slideshow-div (delay)

Boilerplate function to specify duration DELAY in seconds

Package

project-isidore/styles.

Source

file-type.lisp.

Function: bg-slideshow-span (image delay)

Boilerplate function to specify background IMAGE and duration DELAY in seconds

Package

project-isidore/styles.

Source

file-type.lisp.

Function: bhw-resource-filter (resource)
Package

project-isidore/controller.

Source

file-type.lisp.

Function: bible-path (beginning-verse &optional ending-verse &key)
Package

project-isidore/controller.

Source

file-type.lisp.

Function: bible-ref-to-url (string bible-uid)

Haydock commentary cross references are in the form BOOK, CHAPTER, VERSE. Ex. "Psalm 12:9.". BIBLE-UID is to handle the special abbreviated case where the commentary cross references are in the anaphoric form "C. xxiii. 3." where C. is short form for (same) chapter. INTERNAL-CHAPTER depends on BIBLE-UID.

Example:

(bible-ref-to-url "Leviticus 6:20"
(get-bible-uid (bible-book-convert-dwim "Leviticus") 2 3))

=> "/bible/3-6-20"

Package

project-isidore/model.

Source

file-type.lisp.

Function: bible-search-path (&optional &key query)
Package

project-isidore/controller.

Source

file-type.lisp.

Where STRING can be any footnote or cross-reference text and BIBLE-UID must be corresponding.

Example:

(encode-cross-references-to-html-links
(get-cross-references-text (get-bible-uid (bible-book-convert-dwim "Amos") 5 18)) (get-bible-uid (bible-book-convert-dwim "Amos") 5 18))

=> "<a href="/bible/28-30-7">Jeremias 30:7</a>.;<a href="/bible/34-2-11">
Joel 2:11</a>.;<a href="/bible/41-1-15"> Sophonias 1:15</a>.", T

Package

project-isidore/model.

Source

file-type.lisp.

Function: gt-resource-filter (resource)
Package

project-isidore/controller.

Source

file-type.lisp.

Function: package-dependencies (pkg-name)

Collect explicit dependencies of an ASDF system.

Package

project-isidore/packages.

Source

file-type.lisp.

Function: parse-uid-sym (uid-sym)

Human readable call to ‘view:bible-page’. UID-SYM must be of the following format, BOOK-delimiter-CHAPTER-delimiter-VERSE, where delimiters are the SAME single NON-alphanumeric unreserved character. CHAPTER and VERSE must be numeric, whereas BOOK must be alphanumeric. Unreserved characters are defined as uppercase and lowercase letters, decimal digits, hyphen, period, underscore, and tilde. See RFC3986 2.3. Unreserved Characters https://www.ietf.org/rfc/rfc3986.txt

Ex. /bible/genesis-2-10,/bible/47~4~2 etc.

> (parse-uid-sym ’genesis-2-10)
51
> (parse-uid-sym ’1.2.10)
51
> (parse-uid-sym ’1.2-10)
ARG-COUNT-ERROR

Package

project-isidore/controller.

Source

file-type.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

4.2.4 Generic functions

Generic Function: about (http-verb type)
Package

project-isidore/controller.

Source

file-type.lisp.

Methods
Method: about ((http-verb get) (type text/html))
Generic Function: bhw-homepage (http-verb type)
Package

project-isidore/controller.

Source

file-type.lisp.

Methods
Method: bhw-homepage ((http-verb get) (type text/html))
Generic Function: bible (verb content-type beginning-verse &optional ending-verse)

Provide ‘bible-page’ with a list of BIBLE-UIDs. Lists are defined by a BEGINNING-VERSE and an optional ENDING-VERSE

Package

project-isidore/controller.

Source

file-type.lisp.

Methods
Method: bible ((http-verb get) (type text/html) (beginning-sym symbol) &optional ending-sym)
Method: bible ((http-verb get) (type text/html) (beginning-uid integer) &optional ending-uid)
Generic Function: bible-search (verb content-type &key query)

This resource defines a read-only GET request of ‘project-isidore:*search-index*’. In the GET request, a QUERY parameter (of type STRING) is passed to ‘project-isidore:bible-search-page’.

Package

project-isidore/controller.

Source

file-type.lisp.

Methods
Method: bible-search ((http-verb get) (type text/html) &key query)

Calls the view ‘project-isidore:bible-search-page’ with STRING QUERY.

Generic Function: contact (http-verb type)
Package

project-isidore/controller.

Source

file-type.lisp.

Methods
Method: contact ((http-verb get) (type text/html))
Generic Reader: dispatch-table (object)
Generic Writer: (setf dispatch-table) (object)
Package

project-isidore/controller.

Methods
Reader Method: dispatch-table ((vhost vhost))
Writer Method: (setf dispatch-table) ((vhost vhost))

List of dispatch functions

Source

file-type.lisp.

Target Slot

dispatch-table.

Generic Reader: endpoints-of (condition)
Generic Writer: (setf endpoints-of) (condition)
Package

project-isidore/controller.

Methods
Reader Method: endpoints-of ((condition negative-range))
Writer Method: (setf endpoints-of) ((condition negative-range))
Source

file-type.lisp.

Target Slot

endpoints.

Generic Function: gt-homepage (http-verb type)
Package

project-isidore/controller.

Source

file-type.lisp.

Methods
Method: gt-homepage ((http-verb get) (type text/html))
Generic Function: subscribe (http-verb type)
Package

project-isidore/controller.

Source

file-type.lisp.

Methods
Method: subscribe ((http-verb get) (type text/html))
Generic Function: work (http-verb type)
Package

project-isidore/controller.

Source

file-type.lisp.

Methods
Method: work ((http-verb get) (type text/html))

Next: , Previous: , Up: Internals   [Contents][Index]

4.2.5 Conditions

Condition: negative-range
Package

project-isidore/controller.

Source

file-type.lisp.

Direct superclasses

http-condition.

Direct methods
Direct Default Initargs
InitargValue
:status-code416
Direct slots
Slot: endpoints
Initargs

:endpoints

Readers

endpoints-of.

Writers

(setf endpoints-of).


Previous: , Up: Internals   [Contents][Index]

4.2.6 Classes

Class: vhost
Package

project-isidore/controller.

Source

file-type.lisp.

Direct superclasses

acceptor.

Direct methods
Direct Default Initargs
InitargValue
:address127.0.0.1
Direct slots
Slot: dispatch-table

List of dispatch functions

Initform

(quote nil)

Readers

dispatch-table.

Writers

(setf dispatch-table).


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (   4  
A   B   C   D   E   F   G   H   I   L   M   N   P   R   S   T   U   V   W  
Index Entry  Section

(
(setf dispatch-table): Private generic functions
(setf dispatch-table): Private generic functions
(setf endpoints-of): Private generic functions
(setf endpoints-of): Private generic functions

4
400-condition-page: Public ordinary functions
404-condition-page: Public ordinary functions

A
about: Private generic functions
about: Private generic functions
about-page: Public ordinary functions
acceptor-dispatch-request: Public standalone methods
application-toplevel: Public ordinary functions

B
bg-slideshow-div: Private ordinary functions
bg-slideshow-span: Private ordinary functions
bhw-homepage: Private generic functions
bhw-homepage: Private generic functions
bhw-resource-filter: Private ordinary functions
bible: Private generic functions
bible: Private generic functions
bible: Private generic functions
bible-book-convert-dwim: Public ordinary functions
bible-obj-with-id: Public ordinary functions
bible-page: Public ordinary functions
bible-page-template: Private macros
bible-path: Private ordinary functions
bible-ref-to-url: Private ordinary functions
bible-search: Private generic functions
bible-search: Private generic functions
bible-search-page: Public ordinary functions
bible-search-path: Private ordinary functions

C
contact: Private generic functions
contact: Private generic functions
contact-page: Public ordinary functions
cross-references-of: Public generic functions
cross-references-of: Public generic functions

D
dispatch-table: Private generic functions
dispatch-table: Private generic functions

E
encode-cross-references-to-html-links: Private ordinary functions
endpoints-of: Private generic functions
endpoints-of: Private generic functions
explain-condition: Public standalone methods

F
footnotes-of: Public generic functions
footnotes-of: Public generic functions
Function, 400-condition-page: Public ordinary functions
Function, 404-condition-page: Public ordinary functions
Function, about-page: Public ordinary functions
Function, application-toplevel: Public ordinary functions
Function, bg-slideshow-div: Private ordinary functions
Function, bg-slideshow-span: Private ordinary functions
Function, bhw-resource-filter: Private ordinary functions
Function, bible-book-convert-dwim: Public ordinary functions
Function, bible-obj-with-id: Public ordinary functions
Function, bible-page: Public ordinary functions
Function, bible-path: Private ordinary functions
Function, bible-ref-to-url: Private ordinary functions
Function, bible-search-page: Public ordinary functions
Function, bible-search-path: Private ordinary functions
Function, contact-page: Public ordinary functions
Function, encode-cross-references-to-html-links: Private ordinary functions
Function, generate-global-css: Public ordinary functions
Function, get-bible-text: Public ordinary functions
Function, get-bible-uid: Public ordinary functions
Function, get-cross-references-text: Public ordinary functions
Function, get-cross-references-text-with-links: Public ordinary functions
Function, get-footnotes-text: Public ordinary functions
Function, get-footnotes-text-with-links: Public ordinary functions
Function, get-heading-text: Public ordinary functions
Function, gt-resource-filter: Private ordinary functions
Function, index-css: Public ordinary functions
Function, index-page: Public ordinary functions
Function, initialize-application: Public ordinary functions
Function, list-project-isidore-dependencies: Public ordinary functions
Function, make-bible-chapter-url-list: Public ordinary functions
Function, negative-range-condition-page: Public ordinary functions
Function, package-dependencies: Private ordinary functions
Function, parse-uid-sym: Private ordinary functions
Function, reopen-fd-streams: Public ordinary functions
Function, search-bible: Public ordinary functions
Function, subscribe-page: Public ordinary functions
Function, terminate-application: Public ordinary functions
Function, valid-bible-uid-p: Public ordinary functions
Function, work-page: Public ordinary functions

G
generate-global-css: Public ordinary functions
Generic Function, (setf dispatch-table): Private generic functions
Generic Function, (setf endpoints-of): Private generic functions
Generic Function, about: Private generic functions
Generic Function, bhw-homepage: Private generic functions
Generic Function, bible: Private generic functions
Generic Function, bible-search: Private generic functions
Generic Function, contact: Private generic functions
Generic Function, cross-references-of: Public generic functions
Generic Function, dispatch-table: Private generic functions
Generic Function, endpoints-of: Private generic functions
Generic Function, footnotes-of: Public generic functions
Generic Function, gt-homepage: Private generic functions
Generic Function, heading-of: Public generic functions
Generic Function, subscribe: Private generic functions
Generic Function, text-of: Public generic functions
Generic Function, unique-id-of: Public generic functions
Generic Function, work: Private generic functions
get-bible-text: Public ordinary functions
get-bible-uid: Public ordinary functions
get-cross-references-text: Public ordinary functions
get-cross-references-text-with-links: Public ordinary functions
get-footnotes-text: Public ordinary functions
get-footnotes-text-with-links: Public ordinary functions
get-heading-text: Public ordinary functions
gt-homepage: Private generic functions
gt-homepage: Private generic functions
gt-resource-filter: Private ordinary functions

H
heading-of: Public generic functions
heading-of: Public generic functions

I
index-css: Public ordinary functions
index-page: Public ordinary functions
initialize-application: Public ordinary functions

L
list-project-isidore-dependencies: Public ordinary functions

M
Macro, bible-page-template: Private macros
Macro, web-page-template: Private macros
make-bible-chapter-url-list: Public ordinary functions
Method, (setf dispatch-table): Private generic functions
Method, (setf endpoints-of): Private generic functions
Method, about: Private generic functions
Method, acceptor-dispatch-request: Public standalone methods
Method, bhw-homepage: Private generic functions
Method, bible: Private generic functions
Method, bible: Private generic functions
Method, bible-search: Private generic functions
Method, contact: Private generic functions
Method, cross-references-of: Public generic functions
Method, dispatch-table: Private generic functions
Method, endpoints-of: Private generic functions
Method, explain-condition: Public standalone methods
Method, footnotes-of: Public generic functions
Method, gt-homepage: Private generic functions
Method, heading-of: Public generic functions
Method, subscribe: Private generic functions
Method, text-of: Public generic functions
Method, unique-id-of: Public generic functions
Method, work: Private generic functions

N
negative-range-condition-page: Public ordinary functions

P
package-dependencies: Private ordinary functions
parse-uid-sym: Private ordinary functions

R
reopen-fd-streams: Public ordinary functions

S
search-bible: Public ordinary functions
subscribe: Private generic functions
subscribe: Private generic functions
subscribe-page: Public ordinary functions

T
terminate-application: Public ordinary functions
text-of: Public generic functions
text-of: Public generic functions

U
unique-id-of: Public generic functions
unique-id-of: Public generic functions

V
valid-bible-uid-p: Public ordinary functions

W
web-page-template: Private macros
work: Private generic functions
work: Private generic functions
work-page: Public ordinary functions

Jump to:   (   4  
A   B   C   D   E   F   G   H   I   L   M   N   P   R   S   T   U   V   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *   +  
C   D   E   F   H   S   T   U  
Index Entry  Section

*
*bhw-vhost*: Public special variables
*database*: Private special variables
*gt-vhost*: Public special variables
*reference-regex*: Public special variables
*search-index*: Private special variables

+
+bible-book-numbers-alist+: Public special variables
+bible-book-url-alist+: Public special variables
+bible-chapter-url-alist+: Public special variables

C
cross-references: Public classes

D
dispatch-table: Private classes

E
endpoints: Private conditions

F
footnotes: Public classes

H
heading: Public classes

S
Slot, cross-references: Public classes
Slot, dispatch-table: Private classes
Slot, endpoints: Private conditions
Slot, footnotes: Public classes
Slot, heading: Public classes
Slot, text: Public classes
Slot, unique-id: Public classes
Special Variable, *bhw-vhost*: Public special variables
Special Variable, *database*: Private special variables
Special Variable, *gt-vhost*: Public special variables
Special Variable, *reference-regex*: Public special variables
Special Variable, *search-index*: Private special variables
Special Variable, +bible-book-numbers-alist+: Public special variables
Special Variable, +bible-book-url-alist+: Public special variables
Special Variable, +bible-chapter-url-alist+: Public special variables

T
text: Public classes

U
unique-id: Public classes

Jump to:   *   +  
C   D   E   F   H   S   T   U  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   B   C   F   N   P   S   V  
Index Entry  Section

B
bible: Public classes

C
Class, bible: Public classes
Class, vhost: Private classes
Condition, negative-range: Private conditions

F
File, file-type.lisp: The project-isidore/packages/file-type․lisp file
File, file-type.lisp: The project-isidore/model/file-type․lisp file
File, file-type.lisp: The project-isidore/theophilus/file-type․lisp file
File, file-type.lisp: The project-isidore/data/file-type․lisp file
File, file-type.lisp: The project-isidore/views/file-type․lisp file
File, file-type.lisp: The project-isidore/styles/file-type․lisp file
File, file-type.lisp: The project-isidore/controller/file-type․lisp file
File, file-type.lisp: The project-isidore/webserver/file-type․lisp file
File, project-isidore.asd: The project-isidore/project-isidore․asd file
file-type.lisp: The project-isidore/packages/file-type․lisp file
file-type.lisp: The project-isidore/model/file-type․lisp file
file-type.lisp: The project-isidore/theophilus/file-type․lisp file
file-type.lisp: The project-isidore/data/file-type․lisp file
file-type.lisp: The project-isidore/views/file-type․lisp file
file-type.lisp: The project-isidore/styles/file-type․lisp file
file-type.lisp: The project-isidore/controller/file-type․lisp file
file-type.lisp: The project-isidore/webserver/file-type․lisp file

N
negative-range: Private conditions

P
Package, project-isidore/controller: The project-isidore/controller package
Package, project-isidore/data: The project-isidore/data package
Package, project-isidore/model: The project-isidore/model package
Package, project-isidore/packages: The project-isidore/packages package
Package, project-isidore/styles: The project-isidore/styles package
Package, project-isidore/theophilus: The project-isidore/theophilus package
Package, project-isidore/views: The project-isidore/views package
Package, project-isidore/webserver: The project-isidore/webserver package
project-isidore: The project-isidore system
project-isidore.asd: The project-isidore/project-isidore․asd file
project-isidore/controller: The project-isidore/controller system
project-isidore/controller: The project-isidore/controller package
project-isidore/data: The project-isidore/data system
project-isidore/data: The project-isidore/data package
project-isidore/model: The project-isidore/model system
project-isidore/model: The project-isidore/model package
project-isidore/packages: The project-isidore/packages system
project-isidore/packages: The project-isidore/packages package
project-isidore/styles: The project-isidore/styles system
project-isidore/styles: The project-isidore/styles package
project-isidore/theophilus: The project-isidore/theophilus system
project-isidore/theophilus: The project-isidore/theophilus package
project-isidore/views: The project-isidore/views system
project-isidore/views: The project-isidore/views package
project-isidore/webserver: The project-isidore/webserver system
project-isidore/webserver: The project-isidore/webserver package

S
System, project-isidore: The project-isidore system
System, project-isidore/controller: The project-isidore/controller system
System, project-isidore/data: The project-isidore/data system
System, project-isidore/model: The project-isidore/model system
System, project-isidore/packages: The project-isidore/packages system
System, project-isidore/styles: The project-isidore/styles system
System, project-isidore/theophilus: The project-isidore/theophilus system
System, project-isidore/views: The project-isidore/views system
System, project-isidore/webserver: The project-isidore/webserver system

V
vhost: Private classes

Jump to:   B   C   F   N   P   S   V