VerseScrape 0.2

Got a comment from Matt Irvine over at regarding VerseScrape 0.1 that read "uh oh! when the verse has parenthesis in it the verse scrape acts up! i guess there’s no real way around that."
For those of you unaware, I’ve combine a small screen-scraping Perl program with crontab to update my site with the International Bible Society’s Verse of the Day.

Yo Matt, good catch! Unfortuantely, I didn’t have time until 2am last night to work in a fix. Part of the problem was that after stripping away the Javascript, that is everything outside of parenthesis used to encapsulate the IBS Scripture of the Day using the document.write() function, I then used the remaining opening parenthesis character "(" to split the scripture reference away from the verse. This works great if there are no parenthetical remarks within the verse itself. Only, in dealing with the NIV, there are.

That smug snickering you hear are the "King James onlyists" knodding their heads right about now saying "see … told you so!"

Theological arguments aside, there are two approaches. One would be to implement Sermonizer::Scripturizer. And when I convert this into a module, I think I will. Or I can split the verse of the day up using the left parenthesis character "(", then peel off the last array member as my Bible reference, concatenting the rest into the Scripture verse. Sounds like a lot of work, but it’s actually only modifying one line of code, and adding two more lines of code.

The line we change is the one we use to split up the reference from the verse:

($verse, $reference) = split(/\(/, $content);

Instead of reading the results into 2 variables, we read the results of the split function into an array. We then then we use the pop function to remove the last array alement from the array, and use the join function to put the other array members back together:

@verses = split(/\(/, $content);
$reference = pop(@verses);
$verse = join(“(“, @verses);

A bit kludgy, I’ll admit. But it gives me a chance to show you how many different ways there are to solve a problem. In fact, I suspect that some of you are thinking that very same thing as you read this. If you’re one of those, don’t be shy, throw down some code in the comment section so we can compare notes. There are no wrong answers, just so long as the verse of the day gets parsed correctly.

In the meantime, here’s your new version:

Posted in Uncategorized

Thanksgiving Praise!

Sorry I’ve been remiss the past few days. But I’m truly enjoying some time with my wife and daughter. I’ll get back to the grind towards the end of the weekend. In the meantime, the following sums up my expressions of gratitude:

  1. O LORD, our Lord,
    How majestic is Your name in all the earth,
    Who have displayed Your splendor above the heavens!
  2. From the mouth of infants and nursing babes You have established strength
    Because of Your adversaries,
    To make the enemy and the revengeful cease.
  3. When I consider Your heavens, the work of Your fingers,
    The moon and the stars, which You have ordained;
  4. What is man that You take thought of him,
    And the son of man that You care for him?
  5. Yet You have made him a little lower than God,
    And You crown him with glory and majesty!
  6. You make him to rule over the works of Your hands;
    You have put all things under his feet,
  7. All sheep and oxen,
    And also the beasts of the field,
  8. The birds of the heavens and the fish of the sea,
    Whatever passes through the paths of the seas.
  9. O LORD, our Lord,
    How majestic is Your name in all the earth!

Psalm 8

Posted in Uncategorized

Strong Bad’s Website Design Tips

UPDATE 22-Jan-03 – HEY YO! Their system is back up! Check out this cool little animation they put together to explain things — just make sure you wait a few seconds for the joke to load. Oh and thanks for the fun comments — I’m going to foward them along.

UPDATE 20-Jan-03 – CRAP! I appreciate all the visits, but I like you, have no clue what has happened to the — you’re welcome to try and contact them — let me know if you’re successful or not. Meanwhile, enjoy the rest of my site. I mean, what would Strong Bad do?

* UPDATE 21-Jan-03 – HOLY CRAP!* I just heard back from the HomeStar Gang — they’re down but not out. They’re suffering some bandwidth crap from all the heavy traffic sites like mine generate. Well, actually its because their content is so killer that we all rush out to see the latest and greatest they have to offer. Then you hit that refresh button about five or six times to show your co-workers and friends. So really, it’s YOUR fault they’re temporarily down. So hang in there! They’ll be up shortly. Meanwhile, leave comments. I’ll ignore them like the rest!-)

Now quit messing around and visit the rest of my site.

*** !?! ***

original article from 27-Nov-02:

Andrew Careaga over at bloggedy blog sent me this one – blame him – after you read his new book:


(requires Macromedia Flash, Void Where Prohibited. Offer expires 11/31/02. Not valid at all locations. View at your own risk. HealYourChurchWebSite not responsible for any mental or emotional damage the featured link may induce. Any resemblance to a real site that sucks is purely coincidental, though not regretted. For more good examples of bad design, please consult Vincent Flanders’ latest book. See stores for details. Buy in Quantity unlimited.)

Posted in Uncategorized

Tinkering With the Virtual Community

I’d like to bring to your attention an article entitled Tinkering With the Virtual Community by Staci D. Kramer, a contributing editor for the Online Journalism Review. She writes on a topic I personally like to file under the category of “Don’t mess with success!

Ms. Kramer details how a business merger gave need to a web site re-write, in which the authors of the site torqued-off the user base by making a variety of mistakes. For example, “The most visible change was the switch from the original domain name to the more staid I can understand the name change, but what I can’t understand is why simple (and not so simple) server-based or programatic re-directs weren’t employed? In their defense, does indeed redirect – though it’d only cost them $8.95 a year to do the same for

However, its not the technological oversights that should concern us. Instead, I’d like you to peruse this article as it brings to light what I consider one of the more egregious sins of site design/redesign – not taking the time to thoroughly engage in a discovery phase. From what I can glean from the article and associated links, it would appear that the redesign effort in question may not have taken full advantage of, or at least didn’t correctly analyzed, the qualitative and quantitative data available to them. Or as Ms. Kramer skillfully details:

The sweeping redesign changed all that – and a lot more. Users lamented the loss of the left-hand column or rail, wailed about the colors and fonts, cringed at the new registration process and, in some cases, hurled epithets at the whole shebang. Some were as cranky as the aforementioned two-year-old when she needs a nap. Others seemed to realize that Bill Mitchell, Online Editor and Marketing Director, and his team at Poynter didn’t set out to make their life hell, that, in fact, they might be on the right track in more ways than not.

Now no one likes change, especially when it comes to software. Still, the entire issue of the removal left-bar navigation does make me wonder whether or not Poynter ponied up the big bucks to observe what users did – versus what they say. Or were the results of such studies overshadowed by their very real and very big technical/database requirements? For more on this point, I would suggest to’s own write-up on the re-write.

Also understand that my intent here is not to publically excoriate Poynter, because to me, at this point in time, the site looks good and navigates well. Instead, I want warn you of a very common pitfall I often find with redeployed church web sites. If nothing else, to help keep your congregation from yelling at you if it ain’t broke, don’t fix it!”

  • Step number one, put down the mouse.
  • Step number two, create four or five user profiles that generally cover the demographic expanse of your user base.
  • Three, find five people who fit the profiles, and sit them down in front of your current site. Give them a series of tasks, things to find, etc. Have one person aside to see the keystrokes and body language. Another stand behind the monitor to observe the eye and head movement of your test subject.

    I know, I know, terribly unscientific here, but unless your church can afford some quality time at the University of Maryland’s Human Computer Interaction Lab… you know where I’m going with this.

  • Finally, pour over your user logs. Give special attention to 404’s and other error responses. If you’re awake, the answers should become obvious.

Believe me, I know just how tempting not to take the pains of profiling and testing, especially during a re-write. But if you don’t, you can expect some late nights after the deployment rushing in fixes – which because they’re hurried, may create other problems. Trust me, I’ve been there, I’ve done that, and I don’t ever want to go there again.

Suppose one of you wants to build a tower. Will he not first sit down and estimate the cost to see if he has enough money to complete it? – Luke 14:28
Posted in Uncategorized

PureMessage 3.0 == PermMX

As many of you know, I prefer to do my church web work on the Linux/Apache server platform. That said, my gainful employer prefer I do my work on the Microsoft/IIS server platform because that’s the way the client likes it. And after much begging and pleading, they gave me one non-ASP language of my choosing. I went with Perl because of my ability to update the libraries without too many sacrifices at the alter (don’t worry BG, I’m still doing alot of .NET). Much of this is because of the solid implementation of Perl provided by the good folks at ActiveState.

I’ll talk more about their Programmer’s Toolkit and other cool stuff, but for now, I want to bring your attention to a product of their named PureMessage; formerly known as PerlMX. Essentially through a combination of heuristics, spam directories, and spam signatures they claim they can knock down 98% of your spam. It also has anti-virus protection from McAfee built in along with interfaces and an API to make it fit like a glove to your enterprise.

Who would use this? Those of you running a large IT operation out of your mega-church are probably the only one’s who could budget for such a server-side spam slaying product. For the rest of us, there are less expensive tools such as SpamAssassin available – and for those who can’t put tools on their server, there is MailWasher.

Posted in Uncategorized

U.S. Navy full of Pirates?

Or as the Register reports “RIAA orders US Navy to surrender“.

Honestly folks, with the U.S. involved in a tricky war on terrorism, one has to wonder about the Naval Academy’s motives and priorities. NOT that people should steal intellectual property, but I rather, is such a heavy-handed and well publicized attack necessary? In other words, who in the Naval Acadamy is sucking up to the RIAA’s publicity machine? Because I suspect it would have been just as easy on everyone involved had the Naval Acadamy merely sent a warning down the ranks that there will be inspections coming up next week and you’d better get your PC squared away …

Instead, we have this unfortunate public spectacle.

So what does this have to do with Healing Your Church Web Site? Everything. In the late ’70s, churches became targets of various copyright police for illegal photocopies of music performed on Sundays. I’m predicting that it won’t be long before the RIAA gestapo storms a congregation near you – probably during a communion celebration with cameras in tow just for maximum effect. Nothing plays to the media than marching a minister of music down the aisle in cuffs.

That said, and living here near D.C., I do have to wonder if the RIAA isn’t shooting themselves in the foot in this case. A number of Naval Acadamy Midshipmen have parents in powerful political places, especially some just an hour or so away down RT.50/95/395. Moreover, it is not uncommon for a Naval Acadamy graduate to find themselves in politics after a distinguished military career. One wonders some year downline if such acts won’t cause some grudges to be paid out to the RIAA in spades.

I’m all for abiding by the law. I mean if some Naval Acadamy Midshipmen, or for that matter, some church, is distributing and/or brokering illegal MP3s en masse, then they need to be stopped. But I do wonder in some of these cases, such as the one here near D.C., if sometimes the RIAA isn’t just trying to compensate for really crappy product over the past 10 or 15 years.

Then again, we might not have to wait so long if the RIAA gets cocky and goes after illegal media files on various Congressional computers. One can only hope.

* UPDATE *Kevin Hartwig, an Annapolis Alumn, reminds me that the Honor Code is a large part of the Naval Acadamy. Good point. That said, I guess my beef is over a public keel-hauling that plays into the political hands of th RIAA, versus a quieter but just as stern approach.

Posted in Uncategorized


UPDATE * 30-mar-03,  UPDATE2 * 14-Feb-04 this code has been modified and updated (twice). Please refer to the article entitled “Scripturizer 1.2, now with MT Plugin-ability” for a new and improved version that also includes a MovableType plugin.

I’ve been working on a tool that will take sermons from my pastor and format and post them to my church web site. The first and biggest step was “scripturizing” – that is, hyperlinking Scripture References to the BibleGateway. Which we did in my article entitled “Scripturizer – core engine.”

One of the excellent comments I recieved (from Jonathan Fox) mentioned that my original implementation was a bit too “greedy” … meaning that phrases such as “my new job will start if john acts up” would have “Scripturized” job, john and acts even though they were not scripture references. Moreover, the BibleGateway link would not validate due to not encoding the & sign. So I wrote a subroutine that would make sure we were dealing with verse/references and would encode properly.

Once this was done, the next step was to convert it into a Perl module so it could be reused in any variety of situations. Please to not breeze past this point. Regardless of the language you prefer, abtracting your work into modules and classes is an important time saver downline as are common practices in the world of software resuability and reliability. If you don’t believe me, just check out the CPAN – which is the primary reason I still prefer Perl for many projects.

You can find some pretty good how-to information regarding Perl Modules over at the Perl Circus for as long as that site lasts. The end product is something that looks like this (sans comments):

 package Sermonizer::Scripturizer;
 # Sermonizer::Scripturizer             (c) 2002 Dean Peters #
 #             #
 #   This package hyperlinks Scripture references in text    #
 require Exporter;
 @ISA = qw(Exporter);
 @EXPORT = qw(addLinks encodePassage);

sub addLinks {
    my @data = @_;
    my @output;

   my $volumes = "I+|1st|2nd|3rd|First|Second|Third|1|2|3";
    my $books = "Genesis|Exodus|Leviticus|Numbers|Deuteronomy|Joshua|Judges|Ruth|Samuel|Kings|Chronicles|Ezra|Nehemiah|Esther|Job|Psalm|Proverbs|Ecclesiastes|Song of Solomon|Isaiah|Jeremiah|Lamentations|Ezekiel|Daniel|Hosea|Joel|Amos|Obadiah|Jonah|Micah|Nahum|Habakkuk|Zephaniah|Haggai|Zechariah|Malachi|Matthew|Mark|Luke|John|Acts|Romans|Corinthians|Galatians|Ephesians|Philippians|Colossians|Thessalonians|Timothy|Titus|Philemon|Hebrews|James|Peter|Jude|Revelation";
    my $link  = "";

   foreach (@data) {
       # include instances of James 2:1-13, 14 - 16, 17 & 18
       my $verses = qr{ \d+ (: \d+)* \s* (?: [-&] \s* \d+)*    }x;
       my $passage;

      # don't just match, replace
          (?:($volumes)\s*)*         # any number of vols.
          ($books)                               # the book
          ( $verses (?: \s* , \s* $verses)* )
       /$passage = ($1 ? "$1 ":"").($2 ? $2:"").($3 ? " $3":"");

      push (@output, $_);
    return @output;


sub encodePassage {

   my ($vol, $bk, $ver) = @_;
    $ver =~ s/:/%3A/gi;          # convert to encoded colon
    $ver =~ s/[,&;]/%2C/gi;       # convert to encoded comma
    $ver =~ s/\s*//gi;
    my $passage = ($vol ? "$vol+":"").($bk ? "$bk+":"").($ver ? "$ver":"");
    return $passage;


=head1 NAME

Sermonizer::Scripturizer - hyperlink Scripture references in text


use Sermonizer::Scripturizer;
 foreach (addLinks()) { print $_; }; 


Sermonizer::Scripturizer searches a text stream and replaces any
 instances of a Scripture reference with a hyperlink to the to the
 Bible Gateway online Bible.

=head1 BUGS

Need to allow user to define which online Bible to use
 Need to not link up Scripture already linked
 It's probably make sense to create instance variables global to the scope of the module to contain the book volumes, etc.

=head1 AUTHOR

Copyright Dean Peters 2002, 

=head1 EXAMPLE

BEGIN { push(@INC, "C:/Inetpub/wwwroot/perl/lib/"); }
 use Sermonizer::Scripturizer;

my $filename = "sermon01.txt";
 open(FILE, $filename ) or die "Couldn't open the file '$filename'. \n$!";

foreach (addLinks()) {
    print $_;
 close FILE;


Installation and Use

I suspect a number of you will have some problems with your scripts not finding “Sermonizer::Scripturizer” … an error that reads “Can’t locate Sermonizer/ in @INC (@INC contains: /perl/lib /perl/sit
e/lib .)
“. This is because the @INC array contains a list of directories that are use to search for all external files/modules that are used by the perl script – and ain’t in that path. Since the @INC array tells the Perl interpreter where to look for the files/modules/external scripts you need to create as subdirectory named “Sermonizer.” Then you copy into that directory. Then atop perl program that needs ‘Scripturizing’, you write ‘BEGIN { push(@INC, “C:/Inetpub/wwwroot/lib/”); }‘. In the end, your test script may look like this:

BEGIN { push(@INC, “C:/Inetpub/wwwroot/perl/lib/”); }
use Sermonizer::Scripturizer;

my $filename = “sermon01.txt”;
open(FILE, $filename ) or die “Couldn’t open the file ‘$filename’. \n$!”;

foreach (addLinks(<FILE>)) {
print $_;
close FILE;

As always, your mileage may vary

Posted in Uncategorized

The International Children’s Digital Library

We’ve talked alot about compelling content for adults. Well here’s something for the kiddies. It would have to be off-site from your church web site, but it might be a link worth noting.

The International Children’s Digital Library (ICDL) is a 5-year research project to develop innovative software and a collection of books that specifically address the needs of children as readers. Interdisciplinary researchers from computer science, library studies, education, art, and psychology are working together with children to design this new library.

With participants from around the world, the ICDL is building an international collection that reflects both the diversity and quality of children’s literature. Currently, the collection includes materials donated from 27 cultures in 15 languages.

As the second part of their 3 phase plan, ICDL recently (November 2002) launched a prototype using the interface designed by the University of Maryland. This prototype will include over 200 books in total: books selected and digitized by The Library of Congress, books selected by international librarians as well as new material from publishers and authors.

Be aware, the ICDL is a Java program. In order to run ICDL, you will need to have the Java Virtual Machine installed on your computer. Moreover, some books are only available in the Acrobate eBook Reader format.

You can visit the site’s FAQ page for more gory details. PLEASE NOTE – By summer of 2003 the ICDL plans to offer a version of ICDL with minimal technical requirements that will run on any Internet-enabled computer.

My daughter turns three in 9 days. Just about enough time to get the Java Runtime installed on my wife’s machine. Besides, I’m getting tired of her always wanting to visit the BBC Teletubbies Site. She likes that better than the PBS offering … both drive me crazy … but not nearly as crazy as that evil Wiggles video we checked out from the library.

Posted in Uncategorized

Death by Spam

Kevin Werbach of The Slate writes “The e-mail you know and love is about to vanish.” He goes on to say “One-third of the 30 billion e-mails sent worldwide each day are spam. That’s 10 billion daily pitches for herbal Viagra, Nigerian scams, and genital-enlarging creams piling up in our inboxes. Neither legislation nor litigation against spammers has stemmed the tide, and they’re not going to have much of an effect in the future, either. It’s time to give up: Despite the best efforts of legislators, lawyers, and computer programmers, spam has won. Spam is killing e-mail.

I agree and disagree. spam is a problem. Its not like we haven’t talked about it ad nauseum on this site; in fact to the point of obfuscation. That said, I seriously doubt that Instant Messaging (IM) will subsume the ability to asynchronously exchange information. That is, email means that I can convey a thought, a document, a picture of my daughter and not have to worry that the individual is running a compatible IM app. on the other end at the same time I’m trying to IM’ them.

That said, the current volume spam is costing us all dearly. It costs us in bandwidth, it costs us in privacy. It costs us when one of our kids gets a hold of a tempting message hooks them into the bitter trap that that is pornography. Even more so for those of us running church web sites – who are in the business of trying to run a charity while maintaining a higher moral standard at a much lower cost than those who practice indiscriminate unsolicited bulk emailing. So what to do?

I think the answer here is to use a combination of programs that filter and/or mark-up incoming crud using a variety of clever algorithms and methods. For example, I’m about to couple MailWasher with SpamAssassin on our server, where the former wacks spam, the later which marks-up spam (so it can be later filtered). I’ll then instruct the staff and volunteers at RBC how to use filtering rules on their applications. For Outlook, I’ll suggest an ingenious p2p approach, CloudMark’s SpamNet. Similarly, I’ll encourage Mozilla users to employ its spam filtering capabilities.

Call it a suspenders, belt and glue approach to keeping our pants up, but unfortunately, so long as Spam Queens who will do anything for a buck are allowed to “rain” unabated, such measures … and perhaps some countermeasures … are necessary.

All this hand-waiving is also proof that many of us are not yet ready to give up the fight. Whatta you think? What are you doing to stem the flood? Or are you ready to throw in the towel?

Posted in Uncategorized

Speaking of Spam .v2 …

Look everyone, Donna sent me spam again. Perhaps I need to take this to her upstream provider at

I discovered in Yahoo, my favorite directory. I am requesting that you create a link from to my client’s web site if you feel that their content is in some way related or complements your site. In exchange, I’ll post a link from their site to yours

Exchanging links will help bring in more business for both your web site and my client’s. An added benefit is increased search engine traffic because the search engines rank sites higher that have a good number of relevant links.

This is not a free-for-all link exchange, I don’t waste my time with them and you shouldn’t either. I am only linking to related web sites so that all my links are relevant to my site.

I would like to send you my client’s web address, so that you can review their site. My client offers web site promotion and and optimization services for search engines.

Please let me know if you are interested in exchanging links. I’ll send you more details once I hear back from you.

Looking forward to your reply.

Donna Martos

P.S. If for any reason you don’t want me to contact again, just email me and let me know.

Actually, considering this site gets hit by harvesters nightly, I think I’ll just let your friends to the work for me.

Posted in Uncategorized