[Tutor] Text script (fwd)

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Fri Feb 14 10:39:30 2003


Hi Tim,

You accidently sent your question to the administrative address
"tutor-admin@python.org", so it only reached the list admins.  Since you
probably meant to send this to the list at "tutor@python.org", I'll
forward it there for your convenience.

I hope this helps!

---------- Forwarded message ----------
Date: Fri, 14 Feb 2003 10:17:26 -0500
From: Tim & Brenda Morton <morton1611@citynet.net>
To: tutor-admin@python.org
Subject: Text script

Greetings,

I am new to programming and recently became interested because of a
software idea I have. I write books and html files that often have Bible
references in them [such as, Genesis 3:15; Matthew 4:5; etc.]. What I
would like to do is have the entire verse popup in an html file [or
compiled html file (.chm)] during a "mouseover" of the reference. I have
found a Javascript that will do the mouseover/popup part and using a
search and replace with regular expressions I am able to wrap the
Javascript around the references in the text. The problem is I have to
manually copy and paste the verse contents into the javascript for the
link for each reference. I have to look at the reference in the html, find
the reference in a Bible database using another program, copy the entire
verse or verses, and then paste them into the Javascript and do a little
formating. This is very tedious and time consuming.

I was advised that a scripting program like Python could automate this
process for me, so I downloaded Python 2.2.2 for Windows. The problem is I
really don't know where to start. I have a Bible database with one verse
per line and can adapt it so each verse will begin with the same reference
as found in the html files. This should make it easy to find the
corresponding verse from the reference, but I don't know how to load the
files into Python and tell it how to do what I want. Can any of you help
me get started?

Tim Morton