Thursday, September 10, 2015

Installing Diatheke

Diatheke is a front end for using the free Sword Project modules. It is an incredibly powerful interface, but it does require a bit of bash scripting. The following post will break down how to install diatheke on a Mac OS X computer as well as one program that you will find very helpful. For example, Aaron—over at phospheron—developed a set of bash commands to return some brilliant results. Even some of the most expensive bible software can't produce results as simple and helpful as this, and he did it for free using diatheke.

First, this tutorial assumes you have homebrew installed. Homebrew is a fantastic ports manager for Mac OSX and you should get it. Also, you should install eloquent, which is the Mac OSX gui frontend for the Sword Project. Eloquent makes it much easier to install modules for diatheke. The two modules we will use for this tutorial are OSHB and 2TGreek. Many of the other modules are fantastic as well, but these are the two I would recommend.

Second, find out some information about Sword, via Homebrew's brew info command.

Next, you can install sword, with the appropriate brew command.

Once sword has finished installing, you can check it by just entering the command diatheke. This should pull up the following help menu.

After sword is installed,  you need to link the diatheke command to the Sword Library. To do this you need to enter the following command into your .profile file. Be very careful when dealing with .profile! Make sure you enter this exactly.
# Setting PATH for sword
 SWORD_PATH="/Users/NAME/Library/Application Support/Sword"
 export SWORD_PATH

Of course your name will be different from mine, but still it should look something like this:

Now, to save the file in vim you need to prese <esc> and then type :wq. Also, to make the profile active you'll need to quit terminal and restart it. Now, you can try taking diatheke for a spin. You can try by typing diatheke -b OSHB -o v -k Gen 1:1-3. And it should look like this:


Copying and pasting Greek and Hebrew text can be a pain. Diatheke can save you some time and effort, by automatically copying any biblical passage you need into the clipboard. First, make sure you have a ~/bin file. And have the following Path added to your .profile. (once again assuming that you change the user name to suit the computer you are working on).




Now, using vim make a file in the ~/bin folder called gtext. (or gbib would also work).


In the file write the following code:
#!/bin/bash

verse="$(diatheke -b 2TGreek -o a -k $*)" #displays the output in the stdout

echo "$verse"

pbcopy <<< "$verse"


 Also do the same thing for htext/hbib (which ever title you are going for).

Although, the code for this is somewhat more complicated, as SBL style dictates that you copy plain text rather than vocalized text, but most people would rather read vocalized text, there are options for both in this code.
#!/bin/bash

verse="$(diatheke -b OSHB -k $2 $3)"
versev="$(diatheke -b OSHB -o v -k $*)"

while getopts "p" opt; do
    case $opt in
        p)
            echo "$verse";
            pbcopy <<< "$verse"
            exit 0 ;;
        \?)
            echo "invalid option"
            break ;;
    esac
done


echo "$versev"

pbcopy <<< "$versev"
Now after saving both of those files, you need to enter the command chmod 755 gtext and chmod 755 htext in order for both of those files to become executable as commands.

Once you get them up and running, you can type the command plus a bible reference/range of texts, and the text will both display in your terminal screen as well as being copied to your clipboard to be pasted in the word processor of your choice.

The option in the Hebrew text could be called up as htext -p Gen 1:1-5.  This would bring up plain text, or with out the -p, it brings up vocalized text.



Saturday, April 5, 2014

Overview of Israel's Geography

Here is a Prezi on the Geography of Israel. I taught a Sunday School Class on Geography of Israel. The first lesson just covers the general topographical features of the land. The outline below just hits the highlights of the areas. With such a broad sweep, it is hard to go into great detail. However, just getting a sense of the different places and geological features can be helpful for putting the Old Testament in Context.



I. Coastal Plain
A. Plain of Akko
B. Plain of Sharon
C. Philistia Plain
II. Sh'phela
A. Azeka
B. Lachish
III. Negev
A. B'er Sheva
B. Arad
IV. Jezreel Valley
A. Megiddo
V. Ephraim, Israel's Hill Country
A. Shiloh
VI. Upper Galillee
A. Dan
B. Hazor
C. Arbel
VII. Wilderness of Judea
A. Jerusalem
B. Hebron
VIII. Jordan Valley
A. Galillee
B. Jericho
C. Ein Gedi