Skip to main content

Hyperlinking on TruthUnity

screenshot of hypernode import form
Click for detailed image of importing

Mark Hicks

Here is the story about how nearly a half million hyperlinks were created in the biblical text of the American Standard Version to the Metaphysical Bible Dictionary.

In 2009 I was sitting in the student union of the University of Texas at Austin when the idea came to me that the text of the Bible might be easily be hyperlinked to the text of terms in the Dictionary. I had left IBM and was planning to leave IT and go into the ministry. But it seemed like a cool project. The hyperlinking would give metaphysical Bible scholars a quick way to see which Bible terms had been placed in the Dictionary, which would provide insights into how the text might be read. I got really excited.

I knew that both the Dictionary and the ASV Bible were in the public domain. So began to look for text files that I could download and analyze. Then and there in the student union, I found both of them, freely available on the Internet. That same afternoon I began to work out the logic of how a "wiki" could be automatically created if the text of the hyperlinking could be done.

The next day I began to parse the Dictionary using a programmer's editor and Regular Expressions. Over the next few days I was able to come up with a Dictionary that could be easily searched by a software program. I began to write PHP scripts to crawl the twelve thousand word text of the Bible, word for word, looking for any of the three thousand entries in the Dictionary. When a match was found, I inserted a hyperlink to the Dictionary term. The result was nearly a half million matches, each representing a hyperlink. The script took about 20 minutes to run.

The text of the Bible and the Dictionary were originally placed in a wiki website. A year later I incorporated the scripts into Drupal as a module and then was able to do hyperlinking from an array of Bible nodes to the URLs of an array of Dictionary nodes. A sample of that is shown below.

screenshot of hypernode hyperlinking form
Click for detailed image of hyperlinking

Genesis 1 (asv) 1:1In the beginning God created the heavens and the earth. 1:2And the earth was waste and void; and darkness was upon the face of the deep: and the Spirit of God moved upon the face of the waters1:3And God said, Let there be light: and there was light. 1:4And God saw the light, that it was good: and God divided the light from the darkness. 1:5And God called the light Day, and the darkness he called Night. And there was evening and there was morning, one day.

1:6And God said, Let there be a firmament in the midst of the waters, and let it divide the waters from the waters. 1:7And God made the firmament, and divided the waters which were under the firmament from the waters which were above the firmament: and it was so. 1:8And God called the firmament Heaven. And there was evening and there was morning, a second day.

1:9And God said, Let the waters under the heavens be gathered together unto one place, and let the dry land appear: and it was so. 1:10And God called the dry land Earth; and the gathering together of the waters called he Seas: and God saw that it was good. 1:11And God said, Let the earth put forth grass, herbs yielding seed, and fruit-trees bearing fruit after their kind, wherein is the seed thereof, upon the earth: and it was so. 1:12And the earth brought forth grass, herbs yielding seed after their kind, and trees bearing fruit, wherein is the seed thereof, after their kind: and God saw that it was good. 1:13And there was evening and there was morning, a third day.

The "hypernode" module has two functions:

  1. importing text files that are in DokuWiki format
  2. hyperlinking the imported content

By importing and hyperlinking, the module also functions as a module for porting DokuWiki website into Drupal. You can see detailed screenshots of the Drupal module forms by clicking on the images to the right.

I've named the module "Hypernode." Hypernode will eventually get contributed to drupal.org as a project. Until then, I'm available to provide software development support to anyone who needs such hyperlinking in Drupal.