[sword-devel] The Message
Chris Little
sword-devel@crosswire.org
Sat, 3 May 2003 13:47:10 -0700 (MST)
The following Perl script should work, based on your sample data (or
require minimal tweaking). Run it with your data file as the argument,
then run the resulting .vpl file through vpl2mod. Please forgive any
silly syntax errors; I haven't tested this script.
#!/usr/bin/perl
@osisbook = ("", "Gen", "Exod", "Lev", "Num", "Deut", "Josh", "Judg",
"Ruth", "1Sam", "2Sam", "1Kgs", "2Kgs", "1Chr", "2Chr", "Ezra", "Neh",
"Esth", "Job", "Ps", "Prov", "Eccl", "Song", "Isa", "Jer", "Lam", "Ezek",
"Dan", "Hos", "Joel", "Amos", "Obad", "Jonah", "Mic", "Nah", "Hab",
"Zeph", "Hag", "Zech", "Mal", "Matt", "Mark", "Luke", "John", "Acts",
"Rom", "1Cor", "2Cor", "Gal", "Eph", "Phil", "Col", "1Thess", "2Thess",
"1Tim", "2Tim", "Titus", "Phlm", "Heb", "Jas", "1Pet", "2Pet", "1John",
"2John", "3John", "Jude", "Rev");
open (INF, $ARGV[0]);
open (OUTF, ">$ARGV[0].vpl");
while (<INF>) {
$line = $_;
$line =~ /\d+;(\d+);(\d+);(\d+);\"\s*(.+)\s*\"/;
$vref = "@osisbook[$1] $2:$3";
$vers = $4;
$vers =~ s/--/pack("U", 0x2014)/eg;
$vers =~ s/\"\"/\"/g;
print OUTF "$vref $vers\n";
}
close (INF);
close (OUTF);
On Sat, 3 May 2003, Simon wrote:
> > I'd say go for it. There is at least one person currently trying to
> > negotiate for use of the Message.
>
> Great! I really hope they'll grant permission to the Sword Project!
> Please pray for it!
>
> > I have the text here - but
> > when I looked at it, it required more work than I was able to find
> time for
> > to make a module. The main problem is the number of verses in each
> > block - and the general layout. It will need to make heavy use of
> 'linking'.
> > Send me a copy if you get a module out from it.
> >
>
> I have an easy-to-convert file-format for it, everything's like this:
>
> 1;1;1;1;" First this: God created the Heavens and Earth--all you see,
> all you don't see. "
> 2;1;1;2;" Earth was a soup of nothingness, a bottomless emptiness, an
> inky blackness. God's Spirit brooded like a bird above the watery abyss.
> "
> 3;1;1;3;" God spoke: ""Light!"" And light appeared. "
>
> The first number is to be ignored, the 2nd number is biblebook, 3rd
> number chapter, 4rd number verse.
>
> I think it's very easy to convert to vpl-format, the only problem is the
> lack of free time to write a conversion script for it.
>
> But, in around 3 to 4 weeks, a project I'm working on is finished, so
> I'll have plenty of time then.