Package: eatlocal
eatlocalEatlocal helps the user solvePyBitescode challenges locally. This cli tool allows you to download, unzip, and organize bites according to the expected structure from PyBites website. You can display bite directions directly in the terminal. Once you have solved the bite you can use eatlocal to submit and it will open a bowser tab at the corresponding bite page.Updatesversion 0.8.3eatlocal is now compatible with Python 3.8. This matches the expected python version for the platform.Breaking ChangesWith version0.8.0there is a neweatlocal initcommand. Use this to configure your credentials and local git repository. You no longer need to set environment variables manually.When displaying a bite, there is no longer a live display. The directions and source code are printed to the console. This eliminated the need for the getkey library and made installing eatlocal on windows easier.DEMOSConfigureDownload BitesDisplay BitesSubmit BitesTable of ContentseatlocalUpdatesVersionBreaking ChangesDEMOSDownload BitesDisplay BitesSubmit BitesTable of ContentsUsageInstallationmacOS/LinuxWindowsSetupInstall Chrome and ChromedrivermacOSLinuxWindowsUsageSet up your configuration file:eatlocalinitDownload and extract bites:# use -V, --verbose to print what's happeningeatlocaldownload<bitenumber>Display bites in the terminal:# change the theme with -t <theme name>eatlocaldisplay<bitenumber>Submit bites:# use -V, --verbose to print what's happeningeatlocalsubmit<bitenumber>InstallationThere are a few options for install eatlocal.Using pipxIf you havepipxinstalled:pipxinstalleatlocalmacOS/Linuxpip3installeatlocalWindowspipinstalleatlocalSetupGo through the directions on the PyBites website to connect your GitHub account to your PyBites account. You will find the necessary steps underSettingsin the navigation sidebar.Runeatlocal initto configure your PyBites username, PyBites password*, and local git repository.Make sure you have Chrome and chromedriver installed and on$PATH. The chromedriver version must match the version of your Chrome browser.Chromedriver downloads.*Note:  If you signed up for PyBites by authenticating through GitHub or Google, you may need to set a password manually in order to useeatlocal.Install Chrome and ChromedrivermacOSOne option is to use homebrewhomebrew.Install chrome:brewinstall--caskgoogle-chromeInstall chromedriver:brewinstallchromedriverBefore you run chromedriver for the first time (and after you update versions), you must explicitly give permission since the developer has not been verified. Running the following command in the terminal removes the warning put in place by Apple:xattr-dcom.apple.quarantine$(whichchromedriver)Homebrew automatically puts chromedriver on$PATHfor you. And since homebrew handles both chrome and chromedriver installations for me, I can runbrew update && brew upgradeto help ensure I have the same version number for both chrome and chromedriver. If you do not go the homebrew route, you must manually ensure that your version of chrome matches the version of chromedriver.LinuxNavigate to the download page forgoogle chromeand download the appropriate version for your system. Then, open up a terminal and navigate to where you downloaded the file. For me it was~/Downloads. I ran the following commands to install and check which version I have.cd~/Downloads
sudodpkg-igoogle-chrome-stable_current_amd64.deb
google-chrome--versionNext, navigate to thechromedriver download pageand choose the version that matches the output fromgoogle-chrome --version. Download that file that matches your system. Head back to your terminal.Ensure that you have unzip installed:sudoaptinstallunzipUnzip the chromedriver file. For me it was located in the downloads folder:unzip~/Downloads/chromedriver_linux64.zip-d~/DownloadsMake it executable and move to/usr/local/share:chmod+x~/Downloads/chromedriver
sudomv-f~/Downloads/chromedriver/usr/local/share/chromedriverCreate symlinks:sudoln-s/usr/local/share/chromedriver/usr/local/bin/chromedriverConfirm you have access:whichchromedriverWindowsIf working in windows powershell you can usechocolatelyto install both Chrome and chromedriver (with matching versions).I've found that in order to install packages I have to use an elevated administrative shell, withchoco install chromedriver.WSLeatlocaldoes not work withWSL2. There seems to be an issue betweenWSL2 andgoogle-chromeand chromedriver. Perhaps this will be resolved in the future withWSLg. For now, there is a workaround: Follow instructions for Windows users except install eatlocal globally. Using PowerShell or Windows Terminal, navigate to your WSL distribution's directory that holds your repository and initialize eatlocal from there. Now just download and submit through your external PowerShell command line instead of your bash terminal. Everything should still behave the same, you just can't use your WSL shell or your integrated terminal in VS Code.