Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Linux: Check Publix sale paper in command line

I have simplified how I check the sale paper for a store in my area, Publix, by scraping the website and parsing the useful output myself. Check out my project aptly named coupons. It supports two stores from the website, although a store is really just a uuid so it'd be trivial to add the other ones the site supports.

To use, you specify a store and optionally a search string in lowercase to filter the sale items.

$ ./ --store publix --search candy | jq
INFO(get_cached_contents): using cache /home/bgstack15/.cache/coupons/publix_2022-09-01.json
  "Publix Ad: 8/31-9/6 or 9/1-9/7": {
    "Buy One Get Ones": [
      "Hershey's Chocolate Candy Bars or Reese's Peanut Butter Cups or Big Cup or Kit Kat, 6 ct, at $6.99 <small>($3.49)</small>"
  "Extra Savings Flyer: 8/27-9/9": {
    "Grocery": [
      "Candy or Cookie Pop Popcorn, 5.25 oz, $3.50"

I'm going to put this in a cron job now and then I'll never have to read the salepaper again; I'll just scan it automatically for the things I want!