Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Collection & ASCII Image #7

Merged
merged 8 commits into from
Mar 21, 2021
Merged

Data Collection & ASCII Image #7

merged 8 commits into from
Mar 21, 2021

Conversation

hentai-chan
Copy link
Contributor

@hentai-chan hentai-chan commented Mar 20, 2021

Description

The purpose of this python script is twofold: it collects data from the Pokemon API and stores the information as a JSON file in assets/{id}.json and creates a colorful ASCII image which in turn is stored in the same directory as a {id}.txt file. It uses ANSI escape sequences from the colorama module for the color output (each Pokemon takes up 20x20 characters of space). Installation instructions and basic usage are explained in the README file, but for your convenience here's a quick summary:

Installation

$ python -m venv venv/
$ source venv/Scripts/activate
$ pip install -r requirements.txt

Basic Usage

$ # get help
$ python gen_data.py --help
$ # creates a new JSON file in assets/
$ python gen_data.py make --id 1
$ # creates a new ascii image as txt file in assets/ and prints a preview
$ python gen_data.py --verbose ascii --id 1 --mirror

This script has been tested with the following terminals successfully on Windows:

  • Windows Terminal
  • PowerShell
  • CMD
  • Git Bash
  • MSYS2 MinGW 64-bit

Both Git Bash and MSYS2 don't print colorful output. Please test this script and report back if your terminal displays the ascii image in color (important: include the --verbose flag to enable the preview in the ascii command).

Preview

Result ran in Windows Terminal:

キャプチャ

@hentai-chan hentai-chan added the enhancement New feature or request label Mar 20, 2021
@hentai-chan hentai-chan added this to the Finish Project milestone Mar 20, 2021
@hentai-chan hentai-chan linked an issue Mar 20, 2021 that may be closed by this pull request
4 tasks
@hentai-chan
Copy link
Contributor Author

@hentai-chan hentai-chan merged commit 60db065 into integration Mar 21, 2021
@hentai-chan hentai-chan deleted the pydev branch March 21, 2021 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create: Game Data
2 participants