Group Buy Interest?

  • Thread starter Thread starter chance
  • Start date Start date
Status
Not open for further replies.
I can't believe I leave for china in four days...

is this the textbook definition of ironic, or just coincidence...
 
Got it. I know several have not included their shipping info. I'll have to deal with those after everyone elses have been shipped.

Sucks for them but it's not like the need for that information to be entered hasn't been posted repeatedly for months. They'll learn a good life lesson about procrastination (you should charge them for the education :D).
 
UPDATE:
I sent the list (names, shipping addresses, phone numbers, and E-dresses to our own "dgatwood" who says "he can make it happen" This is too close for comfort as the boat will be in, in days (not weeks). Once I get the converted file from him. I have to send it to Fed Ex to install into my account. Once Fed Ex installs it into my address book, I will be able to export it to my USPS address book for all the international orders.
Lets all give dgatwood a round of applause.
 
A great big THANKYOU!!! dgatwood, :):):)



I'd give you the clap, but I don't think you would like it:eek::eek::eek:
 
thanks dgatewood....if you were a hot chick....Id kiss you....right on the mouth.....even if you were just a semi hot chick, id still kiss you....hell....just being a chick would probably get it done for you.....fuck it.....gimme a kiss man!!!!
 
Piece of cake. I did it with a 67-line shell script (about a fourth of which are blank). I guess it helps that I've been known to spend my days writing parsers, of course, but that script I posted a couple of days back was about 85% of the way there, and it took all of about twenty minutes to write.

Once he sent me the real data file, I just had to work around the fact that some empty entries were omitted entirely without leaving a blank line (and thus the value of "Salutation:" might appear as "First Name:" with my original hack job) and tweak the handling of the code that stripped off the first entry each time through the loop.

I mean seriously, Chance, you're going to have to at least make the problem a little harder next time.... :D :D :D

Here's the script reformatted to fit your screen:


#!/bin/sh

# echo "$1"

IFS="
"
DATA="$(cat $1)";

# echo "DATA: $DATA"

while [ "x$DATA" != "x" ] ; do

EMAIL="$(echo "$DATA" | grep -B 1 "Salutation:" | head -n 1 | sed 's/,/-/g')"
SALUTATION="$(echo "$DATA" | grep -A 1 "Salutation:" | head -n 2 | tail -n 1 | sed 's/,/-/g')"
if [ "x$SALUTATION" = "xFirst Name:" ] ; then
SALUTATION="";​
fi
FIRSTNAME="$(echo "$DATA" | grep -A 1 "First Name:" | head -n 2 | tail -n 1 | sed 's/,/-/g')"
if [ "x$FIRSTNAME" = "xLast Name:" ] ; then
FIRSTNAME="";​
fi
LASTNAME="$(echo "$DATA" | grep -A 1 "Last Name:" | head -n 2 | tail -n 1 | sed 's/,/-/g')"
if [ "x$LASTNAME" = "xAddress Line 1:" ] ; then
LASTNAME="";​
fi
ADDR1="$(echo "$DATA" | grep -A 1 "Address Line 1:" | head -n 2 | tail -n 1 | sed 's/,/-/g')"
if [ "x$ADDR1" = "xAddress Line 2:" ] ; then
ADDR1="";​
fi
ADDR2="$(echo "$DATA" | grep -A 1 "Address Line 2:" | head -n 2 | tail -n 1 | sed 's/,/-/g')"
if [ "x$ADDR2" = "xCity:" ] ; then
ADDR2="";​
fi
CITY="$(echo "$DATA" | grep -A 1 "City:" | head -n 2 | tail -n 1 | sed 's/,/-/g')"
if [ "x$CITY" = "xState:" ] ; then
CITY="";​
fi
STATE="$(echo "$DATA" | grep -A 1 "State:" | head -n 2 | tail -n 1 | sed 's/,/-/g')"
if [ "x$STATE" = "xZip Code:" ] ; then
STATE="";​
fi
ZIP="$(echo "$DATA" | grep -A 1 "Zip Code:" | head -n 2 | tail -n 1 | sed 's/,/-/g')"
if [ "x$ZIP" = "xCountry Code:" ] ; then
ZIP="";​
fi
COUNTRY="$(echo "$DATA" | grep -A 1 "Country Code:" | head -n 2 | tail -n 1 | sed 's/,/-/g')"
if [ "x$COUNTRY" = "xPhone Number:" ] ; then
COUNTRY="";​
fi
PHONE="$(echo "$DATA" | grep -A 1 "Phone Number:" | head -n 2 | tail -n 1 | sed 's/,/-/g')"
if [ "x$PHONE" = "xPhone Extension:" ] ; then
PHONE="";​
fi
EXT="$(echo "$DATA" | grep -A 1 "Phone Extension:" | head -n 2 | tail -n 1 | sed 's/,/-/g')"
if [ "x$EXT" = "xFax Number:" ] ; then
EXT="";​
fi
FAX="$(echo "$DATA" | grep -A 1 "Fax Number:" | head -n 2 | tail -n 1 | sed 's/,/-/g')"
if [ "x$FAX" = "xCellular Phone Number:" ] ; then
FAX="";​
fi
CELL="$(echo "$DATA" | grep -A 1 "Cellular Phone Number:" | head -n 2 | tail -n 1 | sed 's/,/-/g')"
if [ "x$CELL" = "xCellular Phone Number:" ] ; then
# An odd bug that only happens on the last entry.
CELL="";​
fi

# DATA="$(echo "$DATA" | perl -pi.bak -e "s/^.*?Cellular Phone Number:\n(\s|\d|[()])+\n+\s*//s")"
DATA="$(echo "$DATA" | perl -e '$/=undef;my $foo = <STDIN>; $foo =~ s/^.*?Cellular Phone Number:\n(.*?\n\s*|$)//s; print $foo;')"

# echo "DATA is \"$DATA\"";


echo "$SALUTATION $FIRSTNAME,$LASTNAME,$ADDR1,$ADDR2,$CITY,$STATE,$ZIP,$COUNTRY,$PHONE,$EXT,$FAX,$CELL,$EMAIL"
done
 
Nice work!

Now I'm starting to get anxious, too! (I really tried to forget that I got in on this, since I knew it'd be a while! But I can't help checking in now and again to see what's the latest. Sounds like not too much longer, if they clear customs in a reasonable amount of time!)
 
I mean seriously, Chance, you're going to have to at least make the problem a little harder next time.... :D :D :D

ok...next time...the data will be in no certian order....your little script will have to figure out what goes where.... :p
 
Thanks Dave
I'll be back in Ontario around 1pm and send it to Fed Ex to enter in my address book and we should be good to go. It takes them 24 hrs to complete this entry.
 
Last edited:
Well,, the boats will be arriving next week. The containers will be in quarantine/customs inspection for a week then will be shipped to me. All those who will be picking up their gear from me here in Ontario (Cal.), send me an E-mail with "pick up" in the subject header, so I can remove those invoices from the shipping process.
__________________
 
Can't wait! I'm so glad everyone could pool their talents together and make it happen!
 
Well,, the boats will be arriving next week.
cool!! but what about...
seaserpents.jpg

(knock on driftwood :D)
 
Status
Not open for further replies.
Back
Top