Re: Nerd Boy, episode 291
From Faux_Pseudo <Fau...@yahoo.comERCIAL>
· alt.ascii-art
· 16 Oct 2002 09:37 · View full thread
· report
_.--- Pete Gunter spoke in alt.ascii-art --------._ > Hi there, > Faux, I just wanted to ask you aout your sig? How do you get that to work? > Is it a winamp plugin or something? /* This is going to make a lot more sence to *nix users then it will to windows users. People who automate everything under the sun should understand all of it. I am one of those people and I need a job. I will replace people with shell scripts for a small fee. */ It is a custom script that feeds off another custom script. First I needed a way to have music started at 8AM every day. So I wrote one with lots of bells and whistles to handle that. The rewrite will have lots more bells and whistles and borderline on the overblown. But then most of my custom stuff does that. I think my autopr0n.sh and its "suit" of apps is a prime example of that. Then I decided that I wanted to make sigs out of what ever was playing so I added one line of code that takes all the songs that are going to play and puts them in a file called ~/.playing. Then via crontab the following script is called. It has 3 bugs in it that I have found so far: 1) if you catch the first song Rev and Now will be listed as the same 2) if you catch the last song Now and Fwd will be listed as the same These two could be fixed very easily if I put in an extra if loop but just haven't done it yet. 3) I haven't debugged so that grep quotes the string in ~/.playing its looking for so it chokes if it goes looking for something like "Once_In_A_While_[Ava_Adore_1998].mp3" because [ and ] have special meaning in regexs. I will fix this in the rewrite. The whole "suit" of apps that make this happen really needs to be rewritten but I haven't gotten around to that yet. But I started. =) #!/bin/bash HOME=/home/faux/ sigfile=.signature PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin/\ :/home/faux/shell:/usr/games/ unbuff() { echo $@ | sed 's/.*\(.\{48\}$\)/\1/' } #nowplaying.sh is me being very lazy as all it is: "cat ~/.nowplaying" LISTAGE="$(grep -1 $(/home/faux/shell/nowplaying.sh) .playing |\ sed -e 's/.*music//' -e 's/.*comedy//' -e \ 's/.*instramental//' -e 's/.*punk//' -e 's/.*metal-rock//' )" Now_Array[0]=" (Now Playing) http://asciipr0n.com/fp updated=10/12" Now_Array[1]="Rev: $(unbuff $(echo "$LISTAGE" | head -1 | tail -1) )" Now_Array[2]="Now: $(unbuff $(echo "$LISTAGE" | head -2 | tail -1) )" Now_Array[3]="Fwd: $(unbuff $(echo "$LISTAGE" | head -3 | tail -1) )" #set -x ONELINER0="$(/usr/games/fortune /usr/share/games/fortunes/fortun-2liners)" #fortune is the app that spits out fun things on nix systems #I made a small fortun mod that has nothing but 2 line 34 byte quotes #in it to fill up the space I had left over. ONELINER1="$(echo "$ONELINER0" | head -1)" ONELINER2="$(echo "$ONELINER0" | tail -1)" #set +x echo -e " ICQ=66618055 : ${Now_Array[0]}" > $sigfile echo -e " YIM=faux_pseudo : ${Now_Array[1]}" >> $sigfile echo -e "$ONELINER1: ${Now_Array[2]}" >> $sigfile echo -e "$ONELINER2: ${Now_Array[3]}" >> $sigfile -- ICQ=66618055 : (Now Playing) http://asciipr0n.com/fp updated=10/12 YIM=faux_pseudo : Rev: Four_-_02_-_Once_In_A_While_[Ava_Adore_1998].mp3 RTFM RTFM RTFM : Now: /smashing_pumkins/perfect_single/02-summer.mp3 RTFM RTFM : Fwd: ns/bullet_with_butterfly_wings/02-said_sadly.mp3
Original message headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f996b,5280c09988c17578 X-Google-Attributes: gidf996b,public X-Google-ArrivalTime: 2002-10-16 02:37:20 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!ihug.co.nz!west.cox.net!cox.net!p01!news2.west.cox.net.POSTED!53ab2750!not-for-mail Newsgroups: alt.ascii-art From: Faux_Pseudo <Fau...@yahoo.comERCIAL> Subject: Re: Nerd Boy, episode 291 References: <aoi4oh$mishe$1...@ID-102694.news.dfncis.de> <slrnaqpji4.c4.Faux_Pseudo@fugozi.cx1209071-a> <aoj92o$11k0$1...@sp15at20.hursley.ibm.com> Reply-To: Fau...@yahoo.comERCIAL X-PGP-Server: wwwkey.nl.pgp.net X-Why: are you reading this? X-PGP-KeyID: CF4DA06B Message-ID: <slrnaqqcbe.c4.Faux_Pseudo@fugozi.cx1209071-a> User-Agent: slrn/0.9.7.4 (Linux) Lines: 79 Date: Wed, 16 Oct 2002 09:37:18 GMT NNTP-Posting-Host: 68.8.9.87 X-Complaints-To: abu...@cox.net X-Trace: news2.west.cox.net 1034761038 68.8.9.87 (Wed, 16 Oct 2002 05:37:18 EDT) NNTP-Posting-Date: Wed, 16 Oct 2002 05:37:18 EDT Organization: Cox Communications Xref: archiver1.google.com alt.ascii-art:19977
Related ASCII art in the Gallery
Explore these categories from our collection of 11,000+ artworks:
,~~--~~-. + | |\ || |~ |`,/-\ *\_) \_) `-'
__
\ \ _ _
\**\ ___\/ \
X*#####*+^^\_\
o/\ \
\__\ .------------. |\\//\\//\\//| |//\\//\\//\\| |\\//\\//\\//| |//\\//\\//\\| '------------'
_______ /` _____ `\;, /__(^===^)__\';, / ::: \ ,; | ::: | ,;' '._______.'`jgs
_ _ (o)(o)--. \../ ( )hjw m\/m--m'`--.
_ _
/` \/ `\_ _
\ /` \/ `\
'. .\ /
\/ '. .'
\/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
in 2002 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.