Repricing Amazon Bots

December 15th, 2014

I’ve been asked lots of times to help with store xml feeds to Amazon. First time I looked it was a nightmare, last time I looked the tools still weren’t there, and this so an area I have explicitly stayed away from because the data processing is really boring and its not what I do.

Add auto bot pricing to your xml feed and the risk is inherently greater. Add automated fulfilment and all should be well but ouch. Computer Snafus Happen. When you are shifting a wholesalers stock on 30 day terms with bot auto pricing to gain competitive advantage in huge quantities with low margins and no webstore or other channel to market as a backup and you are not a limited company , then there is a risk.  Shift 10k in a week using Amazon Fulfilment, no way to stop the shipment and the risk is significant, if it all goes wrong with the pricing.

I agree it should not all go wrong, but the due diligence is all too easy to overlook when you are are 100k of stock deep and its all drop shipping for you via amazon.

Add these terms and conditions (and I’m no lawyer, so add every disclaimer in the book)  but I wouldn’t be expecting Amazon to step in with ex-gratia payments.

No fault is implied by pointing out the T&C’s

RepricerExpress T&C’s

5. LIABILITY

5.1. Nothing in this Licence shall exclude or in any way limit either party’s liability for fraud, or for death and personal injury resulting from negligence, or any other liability to the extent that it cannot be excluded or limited as a matter of law.

5.2. Subject to condition 5.1 the Licensor shall not be liable under or in connection with this Licence for: (a) loss of income; (b) loss of business profits or contracts; (c) business interruption; (d) loss of the use of money or anticipated savings; (e) loss of information; (f) loss of opportunity, goodwill or reputation; (g) loss of, damage to or corruption of data; or (h) any indirect or consequential loss or damage of any kind howsoever arising and whether caused by tort (including negligence), breach of contract or otherwise.

5.3. Subject to condition 5.1 and condition 5.2, the Licensor’s maximum aggregate liability under or in connection with this Licence, or any collateral contract, whether in contract, tort (including negligence) or otherwise (including any liability for the acts or omissions of its employees or agents), shall be limited to a sum equal to the total Licence Fees paid to the Licensor in the period of 12 months considered retrospectively from the date the cause of action arose.

 

So fair enough, but the court case will be interesting.

 

 

OS X 10.10 kills send to my kindle for mac. This command downloads a new version and patches it when you paste it into terminal.

 

wget ‘http://s3.amazonaws.com/sendtokindle/SendToKindleForMac-installer.pkg’
pkgutil –expand SendToKindleForMac-installer.pkg SendToKindleForMac-installer
LC_CTYPE=C sed -i ” ‘s/10.6.0/0/’ SendToKindleForMac-installer/buildroot.pkg/Scripts/preinstall
pkgutil –flatten SendToKindleForMac-installer SendToKindleForMac-installer-fixed.pkg
open SendToKindleForMac-installer-fixed.pkg
echo ‘done’

After a lot of tearing my hair out, I have now got a connection to the MPD server which doesn’t drop out and a stable, high quality music server pulling the music from my NAS – with a next button for the odd misstep on the playlist. Here is the code for your delectation.

buttonfinal

Rename it to button.py and run it using python button.py. Check this post for the build details.

 

I’ve been playing with the very excellent Volumio.  Having got it all up and running, with a Hifiberry DAC and an LCD from http://andypi.co.uk/?p=351 it was pretty good. However, Volumio only allows for one playlist and the occasional song I was not in the mood for crept in.

So I wanted a skip to the next song button. Entirely possible with the Pi, and I found a guy who had done it – but his code wasn’t complete. Here are the full instructions:

Connect a switch to two spare gpio pins. I used GPIO 4 to ground.  This was useful.

GPIOs

 

 

 

 

 

 

 

 

sudo apt-get update

sudo apt-get install python-dev python-pip
sudo pip install –upgrade distribute
sudo pip install ipython
sudo pip install –upgrade RPi.GPIO

Then make a file – mine is called button py

nano button.py

This is the code

[code language=”python”]

TEST_MPD_HOST = “localhost”
TEST_MPD_PORT = “6600”
TEST_MPD_PASSWORD = “volumio” # password for Volumio / MPD

# Connect with MPD
client = mpd.MPDClient()
connected = False
while connected == False:
connected = True
try:
client.connect(TEST_MPD_HOST, TEST_MPD_PORT)
except SocketError as e:
connected = False
if connected == False:
print “Couldn’t connect. Retrying”
time.sleep(5)
print(“Connected”)

while True:
if (GPIO.input(buttonPinNext)): # Play the next song in this play list.
print “Next track in play list”
client.next()
time.sleep(1)

[/code]

Ctrl x to save

Download it here and change the extentio from txt to py

Test the code:

python button.py

Make it run at boot – you need to edit /etc/rc.local (as root since this is the owner).

sudo nano /etc/rc.local

At the bottom, just above exit 0 we’ll add a call to our script.

python /root/python.py

Ctrl x to save

Here is a rubbish picture of the finished article. 

Tlk7K6K

 

 

 

 

 

 

Disclaimer. This may not be the worlds best Python. Please let me know if I can improve it!

25 years of the WWW

March 12th, 2014

25 years of the web today. From humble beginnings…

nextmachine