From ATXHackerspace
m (Update totals for March, which currently includes Shadow's $85 item only) |
Martinbogo (talk | contribs) |
||
(37 intermediate revisions by 8 users not shown) | |||
Line 4: | Line 4: | ||
We get various discounts from Adafruit if we order $250 worth of stuff. It's the Adafruit wholesale discount! So, if you want to get in on an order, add your request to this page. When the total gets to be ~$250, the order goes in, and is delivered to the hackerspace. | We get various discounts from Adafruit if we order $250 worth of stuff. It's the Adafruit wholesale discount! So, if you want to get in on an order, add your request to this page. When the total gets to be ~$250, the order goes in, and is delivered to the hackerspace. | ||
− | There have been various non-paying people on the last couple orders. SO, in order to put the order in this time, when the order is complete we'll be taking the payments '''''BEFORE''''' placing the order. Sorry, but the hackerspace just can't absorb $70-100 in unpaid items. | + | There have been various non-paying people on the last couple orders. SO, in order to put the order in this time, when the order is complete we'll be taking the payments '''''BEFORE''''' placing the order. Sorry, but the hackerspace just can't absorb $70-100 in unpaid items. |
− | == | + | If there are any major items that are marked <font color='red'>OUT OF STOCK</font> the order will not be placed until either 1) the rest of the order totals more than $250 or 2) the major items come back into stock .. usually 5-7 days. |
+ | |||
+ | == September 2013 Adafruit Order is OPEN == | ||
{| border="2" align="center" id="orderTable" | {| border="2" align="center" id="orderTable" | ||
Line 18: | Line 20: | ||
! scope="col" | MEMBER | ! scope="col" | MEMBER | ||
|- | |- | ||
− | | | + | |9999 |
− | | [http://www.adafruit.com/products/ | + | |[http://www.adafruit.com/products/9999 Example Item] |
− | | 1 | + | |1 |
− | | $ | + | |$1.00 |
− | | ?? | + | |$1.00 |
− | | | + | |$1.00 |
− | | | + | |Martin Bogomolni |
+ | |- | ||
+ | |SHIPPING | ||
+ | |UPS 2nd Day | ||
+ | | | ||
+ | |$??.?? | ||
+ | | | ||
+ | |'''$??.??''' | ||
+ | | | ||
|} | |} | ||
− | |||
<br> | <br> | ||
Line 34: | Line 43: | ||
</div> | </div> | ||
− | <div style="width: 500px; text-align: center; border: 1px solid black;margin: 0 auto;background-image: -moz-linear-gradient(#ddd, #fff);background-image: -webkit-linear-gradient(#ddd, #fff);"><div class="CHANGE_WIDTH_HERE" style="width: | + | <div style="width: 500px; text-align: center; border: 1px solid black;margin: 0 auto;background-image: -moz-linear-gradient(#ddd, #fff);background-image: -webkit-linear-gradient(#ddd, #fff);"><div class="CHANGE_WIDTH_HERE" style="width: 0px;background-color: green; color: white; font-weight: bold;background-image: -moz-linear-gradient(#5b5, #272);background-image: -webkit-linear-gradient(#5b5, #272);">0% of $250 goal</div></div> |
== Adding it up == | == Adding it up == | ||
Line 62: | Line 71: | ||
Floating point rounding errors can happen due to IEEE 754 float representation in javscript. You'd have to convert dollars to cents to fix. | Floating point rounding errors can happen due to IEEE 754 float representation in javscript. You'd have to convert dollars to cents to fix. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 20:16, 28 August 2013
Adafruit Wholesale Order
We get various discounts from Adafruit if we order $250 worth of stuff. It's the Adafruit wholesale discount! So, if you want to get in on an order, add your request to this page. When the total gets to be ~$250, the order goes in, and is delivered to the hackerspace.
There have been various non-paying people on the last couple orders. SO, in order to put the order in this time, when the order is complete we'll be taking the payments BEFORE placing the order. Sorry, but the hackerspace just can't absorb $70-100 in unpaid items.
If there are any major items that are marked OUT OF STOCK the order will not be placed until either 1) the rest of the order totals more than $250 or 2) the major items come back into stock .. usually 5-7 days.
September 2013 Adafruit Order is OPEN
ITEM# | DESCRIPTION | QTY | COST | DISCOUNT_COST | TOTAL | MEMBER |
---|---|---|---|---|---|---|
9999 | Example Item | 1 | $1.00 | $1.00 | $1.00 | Martin Bogomolni |
SHIPPING | UPS 2nd Day | $??.?? | $??.?? |
Adding it up
Mostly you can add it up your total in your head or with a calculator just as quickly as copy/pasting this, but you can also use some tools to help.
Copy/paste + awk
Copy/paste the table from your web browser into a text file. You should get tab delimited output (tested using Google Chrome pasting into vim). Save the text file as "order.tsv" and run:
awk -F"\t" '/YOURNAMEHERE/ {print $6}' order.tsv | tr -d '~$ '| awk '{sum+=$1}END{print sum}'
screen scraping with lynx and grep
This avoids the copy/paste, but requires that your name not appear on any other lines in this page.
lynx -width=500 -dump "http://www.atxhackerspace.org/index.php?title=Adafruit_Order" | egrep -o "[0-9\.]*[0-9]*[ ]+YOURNAMEHERE" | awk '{sum+=$1}END{print sum}'
Here's one for elinks, which uses a vertical pipe and variable whitespace when rendering table cells:
elinks --dump-width 500 -dump "http://www.atxhackerspace.org/index.php?title=Adafruit_Order" | egrep -o "[0-9\.]*[0-9]*[ ]+\|[ ]*YOURNAMEHERE" | awk '{sum+=$1}END{print sum}'
Built-in browser javascript console sniffing via DOM
You can open a javsacript console in Google Chrome or Firefox with Firebug installed by pressing the F12 key. Then paste in:
var NAME_REGEXP=/YOURNAMEHERE/;var t = document.getElementById("orderTable");var sum=0;for( var i =0; i < t.rows.length ; ++i){var r = t.rows[i]; if( NAME_REGEXP.test(r.cells[6].textContent) ) { sum+= parseFloat( r.cells[5].textContent.replace(/[^\d\.]/g,'' ), 10); } };console.log( NAME_REGEXP.source + " owes: $" + sum );
Floating point rounding errors can happen due to IEEE 754 float representation in javscript. You'd have to convert dollars to cents to fix.