Ed Mullen wrote:
Ant wrote on 3/28/2015 3:52 AM:
<snip>
Isn't Pick-A-Tag only for Windows? Sean is using Linux so he needs a
Linux program.
Yes, Win only.
Simple shell script will do the same thing and you could run as a cron
job update on a schedule. Here is one I just hacked together. Just
create a tag list file with one tag per line. Then point your signature
to the file that the script creates.
#!/bin/bash
# tagliner.sh
# very simple random signature tag line script
# Adjustable settings
SIG_FILE=signature
TAG_LIST=taglist.txt
# Your sig block remember escape newlines
SIG="Ciao,\nJohn Doe"
# For simplicty the above files will be in the same DIR as script
# Locate the script DIR
SELF=$([[ $0 = /* ]] && echo "$0" || echo "$PWD/${0#./}")
SCRIPT_PATH=$(dirname ${SELF})
# Constants
declare -ir SUCCESS=0
declare -ir E_FATAL=1
# $1 ERR_NO, $2 message
fatal_error()
{
echo -e "Error #$1: $2" >&2
exit $1
}
# Do some sanity checks
[[ -f "$SCRIPT_PATH/$TAG_LIST" ]] ||
fatal_error $E_FATAL "Missing $SCRIPT_PATH/$TAG_LIST"
# Select random line from tag list
TAG=''
LINES=$(wc -l < "$SCRIPT_PATH/$TAG_LIST")
# Loop until non-blank because list may have extra carriage returns
until [ -n "$TAG" ]
do
RAND=$(od -d -N2 -An /dev/urandom)
LINE=$(( RAND % LINES + 1 ))
TAG=$(head -$LINE "$SCRIPT_PATH/$TAG_LIST" | tail -1)
done
# Create the sig file
echo -e "$SIG\n$TAG">"$SCRIPT_PATH/$SIG_FILE"
exit $SUCCESS
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
_______________________________________________
support-seamonkey mailing list
[email protected]
https://lists.mozilla.org/listinfo/support-seamonkey