Skip to main content

eatlocal helps the user solve PyBite code challenges on their local machine

Project description

eatlocal

Eatlocal helps the user solve PyBites code challenges locally. This cli tool allows you to download, unzip, and organize bites according to the expected structure from the directions on the PyBites website. You can display bite directions in the terminal. Once you have solved the bite you can use eatlocal to submit and it will open a bowser tab at the correct location.

Updates

version 0.8.0

  • Better warning messages
  • Faster downloads
  • New command: eatlocal init

Breaking Changes

  • With version 0.8.0 there is a new eatlocal init command. Use this to configure your credentials and local git repository. You no longer need to set environment variables manually.

DEMOS

Configure

gif of init command

Download Bites

gif of download command

Display Bites

gif of display command

Submit Bites

gif of submit command

Table of Contents

Usage

Set up your configuration file:

eatlocal init

Download and extract bites:

# use -V, --verbose to print what's happening
eatlocal download <bite number>

Display bites in the terminal:

# change the theme with -t <theme name>
eatlocal display <bite number>

Submit bites:

# use -V, --verbose to print what's happening
eatlocal submit <bite number>

Installation

macOS/Linux

pip3 install eatlocal

Windows

pip install eatlocal

Setup

  1. Go through the directions on the PyBites website to connect your GitHub account to your PyBites account. You will find the necessary steps under Settings in the navigation sidebar.
  2. Run eatlocal init to configure your PyBites username, PyBites password*, and local git repository.
  3. 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 use eatlocal.

Install Chrome and Chromedriver

macOS

One option is to use homebrew homebrew.

Install chrome:

brew install --cask google-chrome

Install chromedriver:

brew install chromedriver

Before 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 -d com.apple.quarantine $(which chromedriver)

Homebrew automatically puts chromedriver on $PATH for you. And since homebrew handles both chrome and chromedriver installations for me, I can run brew update && brew upgrade to 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.

Linux

Navigate to the download page for google chrome and 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
sudo dpkg -i google-chrome-stable_current_amd64.deb
google-chrome --version

Next, navigate to the chromedriver download page and choose the version that matches the output from google-chrome --version. Download that file that matches your system. Head back to your terminal.

  1. Ensure that you have unzip installed:
sudo apt install unzip
  1. Unzip the chromedriver file. For me it was located in the downloads folder:
unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads
  1. Make it executable and move to /usr/local/share:
chmod +x ~/Downloads/chromedriver
sudo mv -f ~/Downloads/chromedriver /usr/local/share/chromedriver
  1. Create symlinks:
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
  1. Confirm you have access:
which chromedriver

Windows

If working in windows powershell you can use chocolately to 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, with choco install chromedriver.

chromedriver in chocolatey

I attempted to use eatlocal from WSL2 but there seems to be an issue with google-chrome and chromedriver not eatlocal. I could not get it to work.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eatlocal-0.8.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

eatlocal-0.8.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file eatlocal-0.8.0.tar.gz.

File metadata

  • Download URL: eatlocal-0.8.0.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.2 Darwin/21.4.0

File hashes

Hashes for eatlocal-0.8.0.tar.gz
Algorithm Hash digest
SHA256 f866c0fe0aa0d6fa236c55b57b8c429758df78fa5c87696613d8e247e28f11ed
MD5 57eca97c76a832878d5bd328320623ab
BLAKE2b-256 bf4075f5e2c999a99b89e97fa669ad512263ff0ecd1435ab9e0e6b1dc8bcda06

See more details on using hashes here.

File details

Details for the file eatlocal-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: eatlocal-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.2 Darwin/21.4.0

File hashes

Hashes for eatlocal-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b874ef7511eb429cd1a1f77cdc4e798b3fe7633d4b4d24a984bb2d717c9a251c
MD5 f76ddfb36b432be127b2e3760e9cd82c
BLAKE2b-256 b732d286d354f55de307797c4dcbfb5b06eeaf4078bebac44bcb237586c98577

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page