Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet thread from alt.ascii-art.animation, started 27 Oct 1998.
 _   _                     _        _             _     _           
| | | |___  ___ _ __   ___| |_     / \   _ __ ___| |__ (_)_   _____ 
| | | / __|/ _ \ '_ \ / _ \ __|   / _ \ | '__/ __| '_ \| \ \ / / _ \
| |_| \__ \  __/ | | |  __/ |_   / ___ \| | | (__| | | | |\ V /  __/
 \___/|___/\___|_| |_|\___|\__| /_/   \_\_|  \___|_| |_|_| \_/ \___|
Ojosh!ro, some help please...

Ojosh!ro, some help please...

alt.ascii-art.animation · 6 messages · 27 Oct 1998 - 30 Oct 1998
Martin DiViaio <mar...@erols.com> ASCII art 27 Oct 1998 00:00 · permalink · report
I've heavly modified the perl script you posted that randomly changes
the sig on messages.

If you don't mind, I need a little help. What I need to know is: Is
there a way to eliminate all the white space that can appear between the
message and the credits? 

I have all ready tried adding the credits to the end of the quote but I
can't get the credits to appear on a line by themselves that way. Is
there a way to do that?

Ok, here is the modified script:

#!/usr/bin/perl

# Ojoshiro.

# Inits
my $div =
"----------------------------------------------------------------------------\n";
my $QUOTE = "~/.lazarus.quotes";
my $FIFO = "~/.signature";
my $CREDIT = "~/.lazarus.quotes.credits";
my $time;
my $quote = '';
my $credit = '';

# Open the quotefile once.
open ( QUOTE , "<$QUOTE" ) || die "Cannot open '$QUOTE' for reading
:$!\n";
my $sep = $/;
$/ = $div;
# stuff the works in an array.
my @quotes = <QUOTE>;
close ( QUOTE );	
foreach ( $d = 0 ; $d <= $#quotes ; $d++ )
{	$quotes[ $d ] =~ s/$div//sgi;
}
open ( CREDIT , "<$CREDIT" ) || die "Cannot open '$CREDIT' for reading
:$!\n";
my @credit = <CREDIT>;
close ( CREDIT );
foreach ( $d = 0 ; $d <= $#credit ; $d++ )
{       $credit[ $d ] =~ s/$div//sgi;
}
# Every time the pipe is read, stuff it again.
while ( 1 ) {
	unless ( -p $FIFO ) {
		unlink $FIFO;
		system ( 'mknod', $FIFO, 'p' ) && die "Cannot mknod '$FIFO': $!\n";
	}
	$time = localtime();
	open ( FIFO , ">$FIFO" ) || die "Cannot open '$FIFO' for writing
:$!\n";
	my $line = int( rand ( $#quotes ) );
	$quote = $quotes[ $line ];
	$credit = $credit[ $line ];
	write FIFO; 
	close ( FIFO );
	sleep 1;
}

# Mask for output.
format FIFO =
                    /)-._    Time : @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
			            $time
                   Y. ' _]   
            ,.._   |`--"=    ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
		             $quote
           /    "-/  `.\     ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
		             $quote
  /)  sk  |   |_     `\|___  ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                	     $quote
  \:::::::\___/_\__\_______\ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
		             $quote
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$quote
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$quote
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$quote
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$quote
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$quote
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$quote
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$quote
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$credit
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$credit
.

# Enjoy.

Actually, all I did was copy the exhisting script to handle a second
file along with the first.


-- 
                    /)-._    Time : Tue Oct 27 14:57:13 1998
                   Y. ' _]
            ,.._   |`--"=    It will be a great day when our schools get
           /    "-/  `.\     all the money they need and the Air Force
  /)  sk  |   |_     `\|___  has to hold a bake sale to buy a bomber.
  \:::::::\___/_\__\_______\

Martin DiViaio wrote:
> 
> I've heavly modified the perl script you posted that randomly changes
> the sig on messages.

Oh, that's okah =)

> If you don't mind, I need a little help. What I need to know is: Is
> there a way to eliminate all the white space that can appear between the
> message and the credits?

Yep, that is a bit of a problem... All lines defined in the 'format' will be
printed. 
You see what I've done there. I simply didn't put anything under the quote.
I'll see if I can build some fix for it. Shouldn't be too hard.
The ^<< lines chop the part they can display off the original string.
After a write the value of $quote is different than before.
Should be some way to use that.
 
> I have all ready tried adding the credits to the end of the quote but I
> can't get the credits to appear on a line by themselves that way. Is
> there a way to do that?

Lemme see...
Ah, I found it... Put at the end of the first long line (without a part of
the image on it) ~~ this will repeat the line untill $quote is empty.
Don't use the ~~ with @<< lines. A var written in an @<< field is not clipped
and therefore will never get empty. This will probably drop you in a loop.

around around and around untill you puke.

Okay?
Enjoy! 
 
> Ok, here is the modified script:
> 
> #!/usr/bin/perl
> 
> # Ojoshiro.
> 
> # Inits
> my $div =
> "----------------------------------------------------------------------------\n";
> my $QUOTE = "~/.lazarus.quotes";
> my $FIFO = "~/.signature";
> my $CREDIT = "~/.lazarus.quotes.credits";
> my $time;
> my $quote = '';
> my $credit = '';
> 
> # Open the quotefile once.
> open ( QUOTE , "<$QUOTE" ) || die "Cannot open '$QUOTE' for reading
> :$!\n";
> my $sep = $/;
> $/ = $div;
> # stuff the works in an array.
> my @quotes = <QUOTE>;
> close ( QUOTE );
> foreach ( $d = 0 ; $d <= $#quotes ; $d++ )
> {       $quotes[ $d ] =~ s/$div//sgi;
> }
> open ( CREDIT , "<$CREDIT" ) || die "Cannot open '$CREDIT' for reading
> :$!\n";
> my @credit = <CREDIT>;
> close ( CREDIT );
> foreach ( $d = 0 ; $d <= $#credit ; $d++ )
> {       $credit[ $d ] =~ s/$div//sgi;
> }
> # Every time the pipe is read, stuff it again.
> while ( 1 ) {
>         unless ( -p $FIFO ) {
>                 unlink $FIFO;
>                 system ( 'mknod', $FIFO, 'p' ) && die "Cannot mknod '$FIFO': $!\n";
>         }
>         $time = localtime();
>         open ( FIFO , ">$FIFO" ) || die "Cannot open '$FIFO' for writing
> :$!\n";
>         my $line = int( rand ( $#quotes ) );
>         $quote = $quotes[ $line ];
>         $credit = $credit[ $line ];
>         write FIFO;
>         close ( FIFO );
>         sleep 1;
> }
> 
> # Mask for output.
> format FIFO =
>                     /)-._    Time : @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>                                     $time
>                    Y. ' _]
>             ,.._   |`--"=    ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>                              $quote
>            /    "-/  `.\     ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>                              $quote
>   /)  sk  |   |_     `\|___  ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>                              $quote
>   \:::::::\___/_\__\_______\ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>                              $quote
> ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> $quote
> ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> $quote
> ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> $quote
> ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> $quote
> ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> $quote
> ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> $quote
> ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> $quote
> ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> $credit
> ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> $credit
> .
> 
> # Enjoy.
> 
> Actually, all I did was copy the exhisting script to handle a second
> file along with the first.
> 
> --
>                     /)-._    Time : Tue Oct 27 14:57:13 1998
>                    Y. ' _]
>             ,.._   |`--"=    It will be a great day when our schools get
>            /    "-/  `.\     all the money they need and the Air Force
>   /)  sk  |   |_     `\|___  has to hold a bake sale to buy a bomber.
>   \:::::::\___/_\__\_______\

-- 
    ____	Time :	Wed Oct 28 10:41:32 1998
  .X+.   .
.Xx+-.     .	Be wary of strong drink. It can make you shoot at tax
XXx++-..	collectors -- and miss.    Lazarus Long (120)
XXxx++--..	
`XXXxx+++--'	
  `XXXxxx'	
     ""

That did it. Thank you.



Ojosh!ro wrote:
> 
> Martin DiViaio wrote:
> >
> > I've heavly modified the perl script you posted that randomly changes
> > the sig on messages.
> 
> Oh, that's okah =)
> 
> > If you don't mind, I need a little help. What I need to know is: Is
> > there a way to eliminate all the white space that can appear between the
> > message and the credits?
> 
> Yep, that is a bit of a problem... All lines defined in the 'format' will be
> printed.
> You see what I've done there. I simply didn't put anything under the quote.
> I'll see if I can build some fix for it. Shouldn't be too hard.
> The ^<< lines chop the part they can display off the original string.
> After a write the value of $quote is different than before.
> Should be some way to use that.
> 
> > I have all ready tried adding the credits to the end of the quote but I
> > can't get the credits to appear on a line by themselves that way. Is
> > there a way to do that?
> 
> Lemme see...
> Ah, I found it... Put at the end of the first long line (without a part of
> the image on it) ~~ this will repeat the line untill $quote is empty.
> Don't use the ~~ with @<< lines. A var written in an @<< field is not clipped
> and therefore will never get empty. This will probably drop you in a loop.
> 
> around around and around untill you puke.
> 
> Okay?
> Enjoy!
> 
> > Ok, here is the modified script:
> >
> > #!/usr/bin/perl
> >
> > # Ojoshiro.
> >
> > # Inits
> > my $div =
> > "----------------------------------------------------------------------------\n";
> > my $QUOTE = "~/.lazarus.quotes";
> > my $FIFO = "~/.signature";
> > my $CREDIT = "~/.lazarus.quotes.credits";
> > my $time;
> > my $quote = '';
> > my $credit = '';
> >
> > # Open the quotefile once.
> > open ( QUOTE , "<$QUOTE" ) || die "Cannot open '$QUOTE' for reading
> > :$!\n";
> > my $sep = $/;
> > $/ = $div;
> > # stuff the works in an array.
> > my @quotes = <QUOTE>;
> > close ( QUOTE );
> > foreach ( $d = 0 ; $d <= $#quotes ; $d++ )
> > {       $quotes[ $d ] =~ s/$div//sgi;
> > }
> > open ( CREDIT , "<$CREDIT" ) || die "Cannot open '$CREDIT' for reading
> > :$!\n";
> > my @credit = <CREDIT>;
> > close ( CREDIT );
> > foreach ( $d = 0 ; $d <= $#credit ; $d++ )
> > {       $credit[ $d ] =~ s/$div//sgi;
> > }
> > # Every time the pipe is read, stuff it again.
> > while ( 1 ) {
> >         unless ( -p $FIFO ) {
> >                 unlink $FIFO;
> >                 system ( 'mknod', $FIFO, 'p' ) && die "Cannot mknod '$FIFO': $!\n";
> >         }
> >         $time = localtime();
> >         open ( FIFO , ">$FIFO" ) || die "Cannot open '$FIFO' for writing
> > :$!\n";
> >         my $line = int( rand ( $#quotes ) );
> >         $quote = $quotes[ $line ];
> >         $credit = $credit[ $line ];
> >         write FIFO;
> >         close ( FIFO );
> >         sleep 1;
> > }
> >
> > # Mask for output.
> > format FIFO =
> >                     /)-._    Time : @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> >                                     $time
> >                    Y. ' _]
> >             ,.._   |`--"=    ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> >                              $quote
> >            /    "-/  `.\     ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> >                              $quote
> >   /)  sk  |   |_     `\|___  ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> >                              $quote
> >   \:::::::\___/_\__\_______\ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> >                              $quote
> > ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> > $quote
> > ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> > $quote
> > ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> > $quote
> > ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> > $quote
> > ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> > $quote
> > ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> > $quote
> > ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> > $quote
> > ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> > $credit
> > ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> > $credit
> > .
> >
> > # Enjoy.
> >
> > Actually, all I did was copy the exhisting script to handle a second
> > file along with the first.
> >
> > --
> >                     /)-._    Time : Tue Oct 27 14:57:13 1998
> >                    Y. ' _]
> >             ,.._   |`--"=    It will be a great day when our schools get
> >            /    "-/  `.\     all the money they need and the Air Force
> >   /)  sk  |   |_     `\|___  has to hold a bake sale to buy a bomber.
> >   \:::::::\___/_\__\_______\
> 
> --
>     ____        Time :  Wed Oct 28 10:41:32 1998
>   .X+.   .
> .Xx+-.     .    Be wary of strong drink. It can make you shoot at tax
> XXx++-..        collectors -- and miss.    Lazarus Long (120)
> XXxx++--..
> `XXXxx+++--'
>   `XXXxxx'
>      ""

-- 
                    /)-._    Time : Wed Oct 28 15:21:58 1998
                   Y. ' _]
            ,.._   |`--"=    Whenever women have insisted on absolute
           /    "-/  `.\     equality with men, they have invariably
  /)  sk  |   |_     `\|___  wound up with the dirty end of the stick.
  \:::::::\___/_\__\_______\ What they are and what they can do makes
them superior to men, and their proper tactic is to demand special
privileges, all the traffic will bear. They should never settle merely
for equality. For women, "equality" is a disaster.
- Lazarus Long, a fictional character created by   Robert Heinlein

Before we get banned from this here list =) Let's take the Perl to alt.perl,
shall we?
Glad I could be of service =)

Ojosh!ro
-- 
    ____	Time :	Thu Oct 29 12:39:52 1998
  .X+.   .
.Xx+-.     .	Animals can be driven crazy by placing too many in too
XXx++-..	small a pen. Homo sapiens is the only animal that
XXxx++--..	voluntarily does this to himself.    Lazarus Long (157)
`XXXxx+++--'	
  `XXXxxx'	
     ""		
mailto:ojoshiro mindless.com

Ojosh!ro wrote:
> 
> Before we get banned from this here list =) Let's take the Perl to alt.perl,
> shall we?
> Glad I could be of service =)
> 
> Ojosh!ro

I posted this here because I didn't know of any other groups that you
use. (Not saying you don't use any others, I just don't know of them.)
Since I got this script from you I figured you were the best to ask for
advice about it.

Consider this: Until you posted your script, I had never seen perl or
know of anyone else who writes in it.



-- 
                    /)-._    Time : Thu Oct 29 16:23:12 1998
                   Y. ' _]
            ,.._   |`--"=    Animals can be driven crazy by placing too
           /    "-/  `.\     many in too small a pen. Homo sapiens is
  /)  sk  |   |_     `\|___  the only animal that voluntarily does this
  \:::::::\___/_\__\_______\ to himself.
- Lazarus Long, a fictional character created by   Robert Heinlein

Martin DiViaio wrote:
> 
> Ojosh!ro wrote:
> >
> > Before we get banned from this here list =) Let's take the Perl to alt.perl,
> > shall we?
> > Glad I could be of service =)
> >
> > Ojosh!ro
> 
> I posted this here because I didn't know of any other groups that you
> use. (Not saying you don't use any others, I just don't know of them.)
> Since I got this script from you I figured you were the best to ask for
> advice about it.

	Well, we managed to get it fixed, didn't we =)
	I wasn't attacking you or anything, just wanted to be the first one
	to say that, before some other meddling person feels the urge to
	start yelling at us.

	You don't have to use any newsgroup by the way, you can also mail
	me. My emailadres is working. =)

> Consider this: Until you posted your script, I had never seen perl or
> know of anyone else who writes in it.

	I hope you like it. I do. Here it's growing rather fast. For server-
	side applications it's my favourite. However, I'm also starting with
	Java.
	
	Some information can be found at:
	http://www.perl.com/
	http://www.oasis.leo.org/perl/00-index-full.html
	http://www.tpj.com/

	Enjoy!

	Ojosh!ro

-- 
    ____	Time :	Fri Oct 30 11:16:16 1998
  .X+.   .
.Xx+-.     .	Everything in excess! To enjoy the flavor of life, take
XXx++-..	big bites. Moderation is for monks.    Lazarus Long (33)
XXxx++--..	
`XXXxx+++--'	
  `XXXxxx'	
     ""		
mailto:ojoshiro mindless.com

About this thread. These messages were posted publicly to the newsgroup alt.ascii-art.animation in 1998 and are mirrored here unchanged as part of the Historic Archives – only email addresses are masked. The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can. Are you one of the authors? Contact us to get your posts attributed, connected to your artist profile, or removed.

Report this message

Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.

Help classify this post