Giter Club home page Giter Club logo

pokefetch's Introduction

Pokefetch

This is a script I'm working on to further my webscraping skills

Tools

Python 3

  • Requests
  • BeautifulSoup

Bash

  • catimg

Serebii

  • Currently rewriting my scraper to use Bulbapedia

Context

This script currently asks for the pokedex number of the pokemon you'd like to get information about, then it will get the picture and some related information such as type, abilities, weaknesses, etc.

I wanted to model the output to be similar to screenfetch and neofetch, two popular scripts to grab system information.

Alt text

Setup

Starting steps:

Clone this repository to a directory of your choice in the command-line:

git clone https://github.com/rmccorm4/pokefetch

Make sure you have all of the necessary third-party libraries described below

Python requests module

pip install requests

Python BeautifulSoup module

pip install bs4

catimg

On Arch Linux:

yaourt -S catimg

Otherwise, follow the instructions here: https://github.com/posva/catimg

Disclaimers

The "Gender" category that gets printed out uses ascii symbols and may not print properly depending on your terminal configurations.

Personally, I use adobe-source-code-pro-fonts and I make sure that my terminal's default encoding is UTF-8

Running the script:

./pokefetch.sh <pokemon_name>

Example below.

Current progress

This is what I have so far:

Alt text

However this requires a full-screen terminal in order to come out nicely.

To-do

  • Make sure it works for every single pokemon, including difficult names such as "Mr. Mime" and "Ho-oh"
  • Get higher quality images to output if possible, need to research this more
  • Conversely, try to find more pixellated versions of the newer models in hopes of getting a prettier output
  • Add a -shiny flag to output the shiny sprite instead of the regular one
  • Scrape more relevant information about the pokemon
  • Make script work for default size terminal as well as full-screen?
  • Rewrite my scraping method to be much cleaner and more uniform
  • Include Gen VII pokemon
  • Implement old-school sprites because they come out much nicer as seen below
  • Possibly add old school gifs from the special games like yellow and crystal

Alt text

pokefetch's People

Contributors

rmccorm4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pokefetch's Issues

Error trying to run `./pokefetch.sh pikachu`.

Here is the error:

Traceback (most recent call last):
  File "pokefetch.py", line 48, in <module>
    base_total = base_total[base_total.find("Total"):]
AttributeError: 'NoneType' object has no attribute 'find'
stb_image error: No such file or directory

I have the dependecies that were listed in the readme installed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.