FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 11-04-2010, 09:41 PM
Hiisi
 
Default OT: Evolution signature script

Hi list!
I have created this script for my signature in evolution:
cat evolution_script
#!/bin/bash

##############################################
# This script produces fancy signatures #
# for Evolution with random animals talking #
# or thinking of different wise things. #
#____________________________________________#
# Created by Hiisi <saippua5@gmail.com> #
##############################################

# Generate binary choice, that is, "true" or "false" value to choose
between 'cowsay' and 'cowthink' commands; 'cowsay' is default.
BINARY=2
T=1
number=$RANDOM
command="cowsay"
let "number %= $BINARY"
# Note that let "number >>= 14" gives a better random
distribution
#+ (right shifts out everything except last binary digit).
if [ "$number" -eq $T ]
then
command="cowthink"
fi

animal=(`ls /usr/share/cowsay`)
# The above command gives as an array of available animal files.
# Now we need a random int within this array length, hence the 'modulo'
operator.
# This returns the remainder of a division operation.

RANGE=${#animal[@]}

number=$RANDOM
let "number %= $RANGE"
# ^^
# Here goes html-formatting for evolution signature

echo "<div>-- </div>"
echo "<pre>"
/usr/bin/fortune linux -s | /usr/bin/$command -f ${animal[$number]}
echo "</pre>"

It's only a draft so I'm open to corrections/suggestions.
Hope you'll like it!
--
____________________________________
( Beeping is cute, if you are in the )
( office )
( )
( -- Alan Cox )
------------------------------------
o
o .
.---. //
Y|o o|Y//
/_(i=i)K/
~()~*~()~
(_)-(_)

Darth
Vader
koala

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 11-04-2010, 10:33 PM
Ed Greshko
 
Default OT: Evolution signature script

On 11/05/2010 06:41 AM, Hiisi wrote:
> It's only a draft so I'm open to corrections/suggestions.
> Hope you'll like it!

Since you asked.....

It has been a long time tradition/recommendation/request that signatures
be kept to no more than 5 lines when posting to mailing lists. So,
while you may enjoy a 17 line signature with ASCII art it may not win
you many hearts and minds on a mailing list.

--
To be is to be related. -- C.J. Keyser. 葛斯克 愛德華 / 台北市八德路四段

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 11-05-2010, 06:38 AM
Hiisi
 
Default OT: Evolution signature script

pe, 2010-11-05 kello 07:33 +0800, Ed Greshko kirjoitti:
> Since you asked.....
>
> It has been a long time tradition/recommendation/request that signatures
> be kept to no more than 5 lines when posting to mailing lists. So,
> while you may enjoy a 17 line signature with ASCII art it may not win
> you many hearts and minds on a mailing list.
>

Yes, I know. And I have second edition of this script with simple
`/usr/bin/fortune linux -s` command for this list. I can choose between
signatures when composing new message.
Thank you for the input!
--
Real Men don't make backups. They upload it via ftp and let the world mirror it.
-- Linus Torvalds

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 11:20 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org