We all know that pesto is the greatest and most heavenly of all sauces... but where to get it? This program offers a solution [for residents of the UC Berkeley area], by scraping the websites of nearby restaurants known to occasionally offer dishes with pesto. Currently-searched businesses include the UCB dining commons, Cheese Board, and Sliver Pizzeria.
(Note that the only platform that pesto_check currently supports is OS X, because that is the only platform to which the lead (and only) developer has current access.)
Also, the Python bindings for Selenium must be installed on your computer. If they are not, then you can obtain them easily with the command
pip install selenium, or by visiting the Selenium download page.
We hope you enjoy the pesto (assuming it's even possible not to, that is)!
Running pesto_check as an application [OS X 10.4-]
For those who want to avoid all that Terminal lingo, or simply speed up the Pesto Check workflow: It is possible (and easy) to run pesto_check as an application, provided you're running a version of OS X later than 10.3. This will require the use of the Automator software, which should be pre-installed on your system.
Creating the Pesto Check app
- As always, download all of the files in this repository. This can be done with the command
git clone https://github.com/ohjay/pesto_check.git.
- In the folder that you just downloaded, navigate to the
appdirectory and open two files:
- Within these files, there are three filepaths that need to be changed. They are as follows:
- Line 9 in
pesto_check.sh: Fill in the absolute path to
- Line 15 in
pesto_check.sh: Fill in the absolute path to the
- Line 141 in
search.py: Fill in the absolute path to
bin/phantomjs(this should be contained in the
phantomjsfolder that you just downloaded)
- Open Automator (if you don't know where it is, Spotlight it), and select Application as the workflow template.
- In the Utilities section of the Actions/Library sidebar, select Run Shell Script.
- In the window on the right, select /bin/bash as the shell. Then copy/paste the contents of the
app/pesto_check.shscript into the input box.
- Save the app (for example to the Applications folder) as
Pesto Check. [Technically, of course, the name can be anything you like!]
[Optional] Adding an icon to your app
- Open Finder and enter the
pesto_check/appfolder again. Copy (⌘C) the
basil_pesto.icnsfile to the clipboard.
- Now navigate to the directory in which you just saved Pesto Check.
Pesto Check.appand choose Get Info.
- Select the icon in the top-left hand corner. It should take on a faint blue outline.
- Paste from the Clipboard (⌘V) your icns file. The default icon should be replaced by a bowl of pesto.
That's it! Now you can run Pesto Check as a regular OS X application. Like any other app, this can be added to the dock or run from the Launchpad. Have fun!