Friday, June 16, 2006

HTML-RTF: Another Web-Related Program

HTML-RTF is a program I wrote for a friend who is the Web manager of a church denominational Web site. It make use of data retrieved at http://www.biblegateway.com/.

OK. Here's what the program does (as I described it to him)....

"You indicate Testament (O.T. or N.T.), Book, Chapter, Verses, and Translation (choice of five for now, KJV, NASB, NIV, NKJV, and ESV). You click on 'Make HTML.'

"The program makes the HTML and displays the result in two panes in the window. The bottom pane displays the HTML code, and the top pane displays what the HTML code will look like in a standard Web browser. In addition, the program will put the HTML code into the Windows clipboard. ready to paste, say, into a field in the admin editing area for "Devotional" or whatever.

"Next you use File --> Save as RTF to save the equivalent in RTF format (so that the RTF file can be later Inserted into a WPWin or WinWord document).

"The program at this point preserves (for both HTML and RTF) the Scripture text, superscripted verse numbers, italics, and "curly quotes" (single and double). It is also specifically set NOT to show notes or cross-references. In addtion, for KJV each verse is put on a separate line, while for other translations the verses are divided into multi-verse paragraphs (with a blank line between paragraphs). Section headings within the passages are automatically removed.

"You have to be on the Internet (preferably broadband) to use this program. Also, the first time you run it, if you're running a firewall give your firewall a few moments to ask you if you want to allow my program to access the Internet. (Say, 'Yes.')"

My coding is a bit sloppy (I hope to post a cleaned-up version sometime in the future), but you should be able to figure out basically what's going on. (As usual, you'll find thte source code, HTML-RTF.zip, at http://traver.org/traverrb/.)

The program has been tested on Windows, but not on the Mac or Linux. (I hope to have some comments on the coding for you in the next blog entry.)

Enjoy!

Barry Traver

P.S. Please send bug reports and other commments to me at rblog@ix.netcom.com. Thanks!

0 Comments:

Post a Comment

<< Home