The chutney bot

Savithru Lokanath
4 min readFeb 24, 2022

There are a few places in the San Francisco bay area where you can have a south Indian delicacy called Masala Dose. There’s only a single place where you can have the best version of it; at Suryadarshini dosa truck.

Suryadarshini Dose Truck @Bishop Ranch, San Ramon (Src: https://www.fb.com/suryadarshinidosa)

So much is the craving for this dose, there were often long lines resulting in a wait time of a few hours! COVID hit & now you can no longer drop by & order just like any other food truck. You will need to place an order a couple of days in advance & usually sells out within a few minutes.

Masala Dose with aloogadde palya (Src: https://www.fb.com/suryadarshinidosa)

Suryadarshini is a family-run business & they are located at the Bishop Ranch farmer’s market every Saturday between 10:00 AM to 02:00 PM.

Location of the food truck

Tempted? So, how do I order & keep my taste buds happy? Here you go,

  1. There are a limited number of dose’s available to order every week
  2. The demand is so high (yes!!!!! even for dose’s) that a couple of days in advance, they open up an ordering system that lets you preorder the dose’s
  3. Being a veteran dose hunter, I’ve been noticing that they consistently sell out within the first 1–2 minutes of opening. 120 seconds is all that’s available between you & a crispy masala dose
  4. Now, if you are still reading & really want the benne/butter masala dose, butterfingers won’t help! Keep a reminder for Thursday, 07:00 PM & bookmark Suryadarshini’s home page
  5. When it’s time, login, find & tap the “I Accept” hyperlink as fast as you can. The link is posted exactly at 07:00 PM & changes every week; welcome to silicon valley!
  6. Select the dose, the count & make the payment
  7. If you have managed to complete these above steps in < 120 seconds, then “mission accomplished!”
  8. You get a pickup time emailed to you on the Friday & you can go pick up your order on Saturday
  9. Repeat next {week, month, year}
Butter Masala Dose

For fun, what if we automate some of the above steps? Here’s how, we’ll write a script to,

  • remind us on Thursday (ping on WhatsApp)
  • get the dynamic link from Suryadarshini’s website
  • post it to WhatsApp
  • place order (not sharing the logic for this to be fair)
Anything for a crispy masala dosa (Src: https://www.fb.com/suryadarshinidosa)

We’ll use cron to schedule & pass args to the script to express our emotions :)

$ crontab -l# Minute | Hour | Day | Month | Day of the week | Command00 17 * * THU /usr/local/bin/python3 /opt/get_dose.py --wait
30 18 * * THU /usr/local/bin/python3 /opt/get_dose.py --cant-wait
59 18 * * THU /usr/local/bin/python3 /opt/get_dose.py --lets-do-it

Here’s the sequence of events:

  • T minus 90 min (05:30 PM, Thursday): Send a reminder
  • T minus 30 min (06:30 PM, Thursday): Send another reminder
  • T minus 01 min (06:59 PM, Thursday): Watch for link & post when found

Now we’ve automated STEP1–5. Click on the “Direct URL” link, which should take you to STEP6 & continue from there. Here’s the source code & happy eating!!

--

--