Re: Ojosh!ro, some help please...
From Martin DiViaio <mar...@erols.com>
· alt.ascii-art.animation
· 28 Oct 1998 00:00 · View full thread
· report
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
Original message headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fd588,5afd95a5839b0308 X-Google-Attributes: gidfd588,public From: Martin DiViaio <mar...@erols.com> Subject: Re: Ojosh!ro, some help please... Date: 1998/10/28 Message-ID: <363...@erols.com> X-Deja-AN: 406043878 Content-Transfer-Encoding: 7bit References: <363...@erols.com> <363...@lunatech.com> Content-Type: text/plain; charset=us-ascii X-Complaints-To: abu...@rcn.com X-Trace: IEUFeORHA3uuubW+TEieqOY3Xi/+RBIF1JC9Ugnp05M= Mime-Version: 1.0 NNTP-Posting-Date: 28 Oct 1998 20:24:53 GMT Newsgroups: alt.ascii-art.animation
Related ASCII art in the Gallery
Explore these categories from our collection of 11,000+ artworks:
_ _ (o)(o)--. \../ ( )hjw m\/m--m'`--.
_ _
/` \/ `\_ _
\ /` \/ `\
'. .\ /
\/ '. .'
\/jgs __ . . __ (o.\ \/ /.o) \__\/\/__/ /O /==\ O\ (;O/ \/ \O;)
_______ |.-----.| || jgs || ||_ _|| `--)-(--` __[=== o]___ |:::::::::::|\ `-=========-`()
,sSSs ,SSSS_/ ,_ sS/`))\// sS//|_(_/ _, SS\\\ `""-.-'` / sSS` jgs-==-'`'-._\
___________ | _______ | | | | | | | | | | | | | | |_______| | |___________|
Make your own ASCII art
Turn images, text or 3D into ASCII, or draw your own – right in your browser.
About this message.
This message was posted publicly to the newsgroup
alt.ascii-art.animation
in 1998 and is 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 the author? 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.