[Tutor] Need Python script

Tim & Brenda Morton morton1611@citynet.net
Fri Feb 14 10:46:16 2003


This is a multi-part message in MIME format.

------=_NextPart_000_003E_01C2D415.D3AFA2E0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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.=20

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?=20

Tim Morton
------=_NextPart_000_003E_01C2D415.D3AFA2E0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>
<DIV>
<DIV>Greetings,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I am new to programming and recently became interested because of a =

software idea I have. I write&nbsp;books and html files&nbsp;that often =
have=20
Bible references in them [such as, Genesis 3:15; Matthew 4:5; etc.]. =
What I=20
would like to do is have the entire verse popup in an html file [or =
compiled=20
html file (.chm)] during a "mouseover" of the reference. I have found a=20
Javascript that will do the mouseover/popup part and using a search and =
replace=20
with regular expressions I am able to wrap the Javascript around the =
references=20
in the text. The problem is I have to manually copy and paste the verse =
contents=20
into the javascript for the link for each reference. I have to look at =
the=20
reference in the html, find the reference in a Bible database using =
another=20
program, copy the entire verse or verses, and then paste them into the=20
Javascript and do a little formating. This is very tedious and time=20
consuming.&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>I was advised that a scripting program like Python could automate =
this=20
process for me, so I downloaded Python 2.2.2 for Windows. The problem is =
I=20
really don't know where to start. I have a Bible database with one verse =
per=20
line and can adapt it so each verse will&nbsp;begin with&nbsp;the same =
reference=20
as found in the html files. This&nbsp;should make&nbsp;it easy to find =
the=20
corresponding verse from the reference, but&nbsp;I&nbsp;don't know how =
to load=20
the files into Python&nbsp;and tell it how to do what I want. Can any of =
you=20
help me get started? </DIV>
<DIV>&nbsp;</DIV>
<DIV>Tim Morton</DIV></DIV></DIV></BODY></HTML>

------=_NextPart_000_003E_01C2D415.D3AFA2E0--