Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsDiscussion Forum → An odd request...
12
An odd request...
2004-02-09, 4:41 PM #41
Quote:
<font face="Verdana, Arial" size="2">Originally posted by GBK:
Problably, but Im gonna reinvent the wheel again anyway. . because then itll be MY wheel.... [http://forums.massassi.net/html/wink.gif]

</font>


*control c*
*opens quotes file*
*control v*
*control s*
*alt F4*

------------------
MadQuack on Military school: Pro's: I get to shoot a gun. Con's: Everything else.
"I'm going to beat you until the laws of physics are violated!!" ! Maeve's Warcry

RIP -MaDaVentor-. You will be missed.

[This message has been edited by happydud (edited February 09, 2004).]
My Parkour blog
My Twitter. Follow me!
2004-02-09, 5:43 PM #42
I wrote this earler in the day, but forgot to post it. I see that now you've found someone who has what you need, but I figure I'll post this anyway in case that doesn't work out.

Code:
#!/usr/bin/perl

open FILE, "bible13.txt";
my @bible;

my %books;
while(<FILE> )
{
    if(/Book (\w{2}) *(.*) *Book (\w{2}) *(.*) *Book (\w{2}) *(.*)/g)
    {
        $books{$1} = $2;
        $books{$3} = $4;
        $books{$5} = $6;
        if($5 == 66) { last; }
    }
}
foreach(keys %books)
{
    $books{$_} =~ s/ {2,}$//g;
}

while(<FILE> )
{
    if(/^(\d{2}):[\d{3}):[\d{3}) (.*)/)
    {
        chomp(my $str = "$books{$1} $2:$3 -- $4");
        $str =~ s/0*(\d*)/$1/g;
        while(<FILE> )
        {
            if(/^\d{2}:\d{3}:\d{3} .*/) { last; }

            /^ *(.*)/;
            chomp($str .= $1);
        }
        $str =~ s/\r/ /g;
        $str =~ s/ {2,}$//g;
        $str .= "\n";
        push @bible, $str;
        redo;
    }
}

$bible[-1] =~ s/(.*Amen\.).*/$1/g;

open FILE, ">bible.txt";
print FILE @bible;
close FILE;


The damn forum turns : followed by ( into a sad face, so I replaced the ( with [.

I used this copy of the Bible from the Gutenberg project, hence the "bible13.txt" name. I glanced over the output file, and it seems to be fine. One verse per line, with each verse preceded by "Book Chapter:Verse -- ".

[This message has been edited by Argath (edited February 10, 2004).]
2004-02-09, 5:51 PM #43
Quote:
<font face="Verdana, Arial" size="2">Originally posted by GBK:
Only the KJV was shipped with the demo of MediaShout. The full version has several dozen versions, including the NIV. Ill problably use the NIV.</font>


Good man.

Quote:
<font face="Verdana, Arial" size="2">Originally posted by GBK:
Thats fine, Ill release the source to anyone who wants it When Its Finished...</font>


Sniftyness. Oh yeah, I got a question for you too about another thingy you did with text in pictures, but I dunno if it's a personal question and thus should be asked via e-mail or if it's no biggie and I can just ask the question here anyway...

------------------
Check out the following stories over at the Interactive Story Board:
The Never-ending Story Thread or visit the new webcomic version!
The Vision Cycle series
Featured Story: Mythos Solais
The Plothole: a home for amateur, inclusive, collaborative stories
http://forums.theplothole.net
12

↑ Up to the top!