Skip to content
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.
/ dtk Public archive

Read the Bible or other diatheke-accessible material in emacs

License

Notifications You must be signed in to change notification settings

dtk01/dtk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dtk.el

<2024-02-11> Archived & moved to codeberg.org. https://codeberg.org/thomp/dtk

Read Biblical texts in Emacs

image


diatheke is a front-end to the SWORD library. dtk facilitates reading a Biblical text, or other diatheke-accessible material, in Emacs.

Getting started

  1. Ensure that diatheke is installed. In Debian, it is available as the diatheke package.

  2. Ensure that at least one text accessible as a diatheke module is installed. One way to do this is by using the 'module manager' of Xiphos. A number of texts are also available in Debian as packages (e.g., sword-text-kjv).

Usage

Prerequisites: Define the variables dtk-module-category (default: "Biblical Texts") and dtk-module (default: the first module returned by diatheke). These may be set interactively by calling dtk-select-module-category and dtk-select-module, respectively.

M-x dtk will create a dedicated buffer *dtk* and prompt for completion of book, chapter and verse. The corresponding text will be inserted into *dtk* upon completion.

The *dtk* buffer enables dtk-mode and provides the following keybindings:

Key Commands Description
g dtk-go-to Prompt and insert new text
f dtk-forward-verse Forward verse
b dtk-backward-verse Backward verse
c dtk-clear-dtk-buffer Clear dtk buffer
M dtk-select-module-category Select type of text (Bible text, Commentaries, Dictionaries..)
m dtk-select-module Select module (Bible versions)
s dtk-search Search text
d dtk-dict Show dictionary data for word at point
q dtk-quit Quit buffer
x dtk-follow Insert the corresponding verse into dtk buffer if point is under full citation
C-M-b dtk-backward-chapter Move point to previous chapter
C-M-f dtk-forward-chapter Move point to next chapter

To insert Biblical text directly in any buffer, use M-x dtk-bible. Call with prefix argument (C-u) to temporarily change module when inserting text.

An example use-package configuration:

(use-package dtk
  :bind (("C-c B" . dtk-bible))
  :custom
  (dtk-module "KJV")
  (dtk-module-category "Biblical Texts")
  (dtk-word-wrap t)
  )

Using in a Windows environment

In a Windows environment, diatheke may not be in the search path for executables. If this is the case, you can explicitly provide the path to the executable by setting dtk-program. For example, if Xiphos is installed, one might specify the diatheke executable location as follows:

> (setf dtk-program "C:/Program Files (x86)/CrossWire/Xiphos/bin/diatheke.exe")
"C:/Program Files (x86)/CrossWire/Xiphos/bin/diatheke.exe"

Performing a dictionary lookup

Some texts have dictionary references embedded in the texts. For these texts, dictionary lookups may be available. By default, d will, by invoking dtk-dict, display the related dictionary entry, if that entry is available.

Searching within a text

Search the selected text with M-x dtk-search.

Selecting a module

Modules fall into a number of categories. Select the category of module which is under consideration with M-x dtk-select-module-category. By default, this functionality is bound to M.

Select the module of interest (e.g., KJV, ESV, or RNKJV) with M-x dtk-select-module. By default, this functionality is bound to m.

dtk-modules

dtk-modules is intended as a repository for retriever-parser-inserter sets for additional diatheke-accessible content. daily-light.el provides these for the Daily Light. Peruse the day's readings with M-x dtk-daily.

See also

bible-mode is another effort to facilitate browsing SWORD module content using the diatheke interface.

diatheke.el is another interface to diatheke.

sword-converter converts SWORD module content to JSON and SQLite. Provides search functionality.

sword-to-org converts SWORD modules content to org outlines.

About

Read the Bible or other diatheke-accessible material in emacs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published