Welcome to the Pokémon Downloader CLI! This tool allows users to interact with the PokéAPI to download and save specific data about their favorite Pokémon, including stats, sprites, and official artwork. Users can select which pieces of information they’d like to retrieve and save them locally in structured folders.
- Interactive CLI: Uses Inquirer to guide the user through selecting a Pokémon and choosing data to download.
- Data Options:
- Stats: Saves Pokémon stats (like HP, Attack, etc.) in a
.txt
file. - Sprites: Downloads various sprite images, including front and back views, and saves them in PNG format.
- Artwork: Downloads the official artwork and saves it in PNG format.
- Stats: Saves Pokémon stats (like HP, Attack, etc.) in a
- Error Handling: Gracefully handles errors such as network failures or unavailable Pokémon data.
- Folder Structure: Automatically organizes each Pokémon’s data into separate folders.
- Node.js (version 14 or higher)
- Internet connection (to access the PokéAPI)
-
Clone the repository:
git clone https://github.com/liamdewitt/pokemon-downloader-cli.git
-
Navigate into the project directory:
cd pokemon-downloader-cli
-
Open the project in your favorite code editor.
-
install dependencies:
npm install
- Start the CLI:
node pokemon-downloader.js
- Follow the prompts to:
- Enter the name of a Pokemon
- Choose the data types you want to download (Stats, Sprites, and or Artwork)
- View each Pokemon's data, saved in organized folders.
-
After selecting "Pikachu" (not case sensitive) and choosing all data options, the tool will create a folder structure like this:
pokemon-downloader-cli/ ├── pikachu/ │ ├── stats.txt # Pokémon stats │ ├── front_default.png # Pokémon sprite (front view) │ ├── back_default.png # Pokémon sprite (back view) │ └── pikachuOfficialArtwork.png # Official artwork
Contributions are welcome! Please open an issue or submit a pull request to discuss any changes.