sjmh / csistock

A golang script that will browse your wishlist and notify you via BoxCar if an item is close to going out of stock

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CSI Stock Checker v.1.0.0

This is a simple script for page scraping the http://www.coolstuffinc.com site for your wishlist and informing you via Boxcar to your mobile phone when certain events ( low stock, out of stock, back in stock ) occur.

Requirements

You'll need:

Setup

To configure this script, you'll need two environment variables.

  • BOXCAR_TOKEN: This envvar should be set to your access token. You can find this in the settings of the BoxCar app on your mobile device.
  • CSI_WISHLIST: This envvar should be set to the URL of your wishlist. You can find this at the bottom of your wishlist.

These envvars can be specified on the command line as well, e.g.:

BOXCAR_TOKEN=abcde12345 CSI_WISHLIST=http://www.coolstuffinc.com/user_wishlist.php?id=987654321 ./csistock

Note: You'll need to escape the ? in the CSI_WISHLIST URL if you do it via command line.

Running

Once you've got the pre-reqs and setup, you just need to fire off the script. It will poll the site every 5 minutes and report any events back to your phone. You can background the process if you'd like or setup a watchdog via cron to ensure it's always running.

About

A golang script that will browse your wishlist and notify you via BoxCar if an item is close to going out of stock


Languages

Language:Go 100.0%