Jump to content

Hardware (tools)


oligarchy314
 Share

Recommended Posts

I can't say if anyone will actually be interested in this, but for anyone looking for very affordable hand tools and power tools, I thought I'd share. Also, having heard Harbor Freight mentioned before on Systm I thought it would be worth a shot to share this somewhere, and Hak5 seemed appropriate given Daren is now fully relocated to California.

This script lets you use wget to directly download all of the monthly coupons on Harbor Freight's "magazine lander pages" as well as the weekly coupons that go out to HF email subscribers.

There will be a number of duplicate coupons, but this is to your advantage. The purpose here is to maximize the number of coupons you have, in order to maximize the number of deals you can get, regardless of quantity limits per coupon. With this script, there is no reason to ever pay regular price at HF again.

This script does not garantee that you will get the best price by using any of these coupons. Sometimes the best deal is to wait for a regular sale and use a 20% off coupon instead of an item specific coupon. Also, sometimes the best price is on a coupon that comes in the weekly news-paper rather than one on the HF website.

Additionally if someone has any interest in re-writing this for linux/bash, that would be awesome. I was just working with what I know. Script Code Below..

:: HF Coupon Wget Batch Script
:: written by Mark David Scott Cunningham, July 2010
::
:: "Shop smart. Shop S-Mart." --Ash, _Army of Darkness_

:initialize
echo off
setlocal
:: Set title
title=HF Coupon Download Script

:menu
:: Set iteration variable to zero
set /A int=0

:: Print the menu
cls
echo ========================
echo      MENU OPTIONS
echo ========================
echo    (W)eekly Coupons
echo    (M)onthly Coupons
echo ========================
echo    (Q)uit
echo ========================
set /p opt="Enter Option Here: "

:: Act on selected option
if /I %opt%==w goto:download-weekly
if /I %opt%==m goto:download-monthly
if /I %opt%==q goto:exit

:: Errorcheck
echo Please choose from the options listed above!
pause
goto:menu

:ask
:: Ask what to do next
cls
set /p opt="Would you like to download something else? (y/n) "
if /I %opt%==y goto:menu
if /I %opt%==n goto:exit

:download-weekly
:: Ask for the weekend to download and then download it if available
cls
set /p wknd="Please enter the date of the nearest up-coming Monday (MMDD) "
for /L %%i in (1,1,21) do wget -x http://images.harborfreight.com/cpi/emails/more_coupons/wkend%wknd%/images/%%i.jpg
goto:ask

:download-monthly
:: Increment the iteration condition
set /A int+=1

:: Check the iteration count and set the directory parameter accordingly
if %int%==1 (set dir=^/1-automotive)
if %int%==2 (set dir=^/2-boat)
if %int%==3 (set dir=^/3-general)
if %int%==4 (set dir=^/4-motorcycle)
if %int%==5 (set dir=^/5-outdoor)
if %int%==6 (set dir=^/6-truck)
if %int%==7 (set dir=^/7-xtreme_sports)

:: Download all the numbered coupon jpegs in the directory
for /L %%x in (1,1,20) do wget -x http://images.harborfreight.com/hftweb/campaigns/mag_landers%dir%/images/%%x.jpg

:: Download the flashlight and 20% off coupon from the directory
wget -x http://images.harborfreight.com/hftweb/campaigns/mag_landers%dir%/images/flash_c.jpg
wget -x http://images.harborfreight.com/hftweb/campaigns/mag_landers%dir%/images/20_c.jpg

:: Check the iteration and if necessary repeat, else exit
if %int% LSS 7 goto:download-monthly
goto:ask

:exit
:: Wave goodbye to the user and exit
cls
echo. 
echo. 
echo Goodbye . . .
echo. 
echo. 
pause
exit

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...