Pokemon-Terminal/README.md

210 lines
10 KiB
Markdown
Raw Normal View History

2017-04-25 14:23:48 -04:00
# Pokemon-Terminal
2017-04-25 14:57:47 -04:00
![alt-tag](Samples/pikachu.png)
2017-04-25 14:23:48 -04:00
Sample Set #1 | Sample Set #2
:-------------------------------:|:-------------------------------:
2017-04-25 14:57:47 -04:00
![alt-tag](Samples/bulbasaur.png)| ![alt-tag](Samples/squirtle.png)
![alt-tag](Samples/charizard.png)| ![alt-tag](Samples/eevee.png)
![alt-tag](Samples/clefairy.png) | ![alt-tag](Samples/magikarp.png)
![alt-tag](Samples/machop.png) | ![alt-tag](Samples/slowpoke.png)
![alt-tag](Samples/muk.png) | ![alt-tag](Samples/porygon.png)
2017-04-25 14:23:48 -04:00
![alt-tag](Samples/chansey.png) | ![alt-tag](Samples/growlithe.png)
![alt-tag](Samples/scyther.png) | ![alt-tag](Samples/omanyte.png)
![alt-tag](Samples/corsola.png) | ![alt-tag](Samples/mewtwo.png)
2017-04-25 14:57:47 -04:00
![alt-tag](Samples/azumarill.png)| ![alt-tag](Samples/snubbull.png)
![alt-tag](Samples/wobbuffet.png)| ![alt-tag](Samples/tyranitar.png)
![alt-tag](Samples/lugia.png) | ![alt-tag](Samples/kyogre.png)
![alt-tag](Samples/rayquaza.png) | ![alt-tag](Samples/deoxys.png)
2017-04-25 19:01:53 -04:00
# Features
- 719 unique Pokemon
2017-04-25 19:01:53 -04:00
- Select Pokemon by name or by index number
2017-05-09 10:02:39 -04:00
- Ability to change the Desktop Wallpaper & the Terminal background
2017-04-25 19:01:53 -04:00
- Internal search system for finding Pokemon
2017-06-17 11:31:25 -04:00
- Supports iTerm2, Terminology & Tilix
2017-04-25 19:01:53 -04:00
2017-04-25 16:13:49 -04:00
# How to Install
2017-06-12 13:09:58 -07:00
2017-07-09 11:45:13 -03:00
Type `python3 -V` in your terminal to verify that you have [Python 3.6](https://www.python.org/downloads/) or later installed.
2017-07-06 01:53:21 +02:00
2017-06-17 09:56:03 -04:00
## npm
You can install in any (npm-supported) OS using `npm install --global pokemon-terminal`. That's it, you're done!
> If you do not use npm, or prefer a manual install, continue reading.
2017-06-10 23:29:12 -03:00
## Mac OS
2017-04-25 16:13:49 -04:00
2017-07-09 11:45:13 -03:00
1. Make sure you have [Python 3.6](https://www.python.org/downloads/mac-osx/) or higher.
2017-06-10 23:29:12 -03:00
2. Make sure you have [iTerm2](http://www.iterm2.com/downloads.html).
2017-06-07 06:45:26 +02:00
3. Copy and paste the following for the installation:
2017-04-25 16:13:49 -04:00
```
2017-06-07 06:45:26 +02:00
# Pokemon Installation
git clone https://github.com/LazoCoder/Pokemon-Terminal $HOME/.Pokemon-Terminal
echo PATH="$HOME/.Pokemon-Terminal:${PATH}" >> ~/.bash_profile
source ~/.bash_profile
2017-04-25 16:13:49 -04:00
```
2017-06-24 17:18:48 -04:00
4. If you are using zsh, do the following instead:
```
# Pokemon Installation
git clone https://github.com/LazoCoder/Pokemon-Terminal $HOME/.Pokemon-Terminal
echo PATH="$HOME/.Pokemon-Terminal:$"PATH"" >> ~/.zshrc
source ~/.zshrc
```
2017-04-25 14:57:47 -04:00
2017-06-10 23:29:12 -03:00
## Linux
2017-04-25 14:57:47 -04:00
1. Make sure you have Python 3.6+ installed, check the instructions of your distribution.
2017-06-17 10:53:19 -04:00
2. Make sure you have Terminology or Tilix, again check the package manager of your distribution.
3. Install
2017-07-01 09:44:01 -03:00
- If you are a Arch Linux User, you can install it from the AUR package [pokemon-terminal-git](https://aur.archlinux.org/packages/pokemon-terminal-git/).
- Otherwise, copy and paste the following bash script into a terminal for the installation:
2017-06-24 17:18:48 -04:00
```bash
# Pokemon Installation
git clone https://github.com/LazoCoder/Pokemon-Terminal $HOME/.Pokemon-Terminal
echo PATH="$HOME/.Pokemon-Terminal:$"PATH"" >> ~/.bash_profile
source ~/.bash_profile
```
2017-06-10 23:29:12 -03:00
# Instructions
2017-06-12 13:09:58 -07:00
## Usage
2017-04-25 14:57:47 -04:00
```
2017-07-09 11:45:13 -03:00
usage: pokemon [-h] [-n NAME] [-r {kanto,johto,hoenn,sinnoh}] [-l [0.xx]]
[-d [0.xx]]
[-t {normal,fire,fighting,water,flying,grass,poison,electric,
ground,psychic,rock,ice,bug,dragon,ghost,dark,steel,fairy}]
[-ne] [-e] [-w] [-v] [-dr] [-c] [id]
Set a pokemon to the current terminal background or wallpaper
positional arguments:
id Specify the desired pokemon ID
optional arguments:
-h, --help show this help message and exit
-c, --clear Clears the current pokemon from terminal background
and quits.
Filters:
Arguments used to filter the list of pokemons with various conditions
-n/--name NAME Filter by pokemon which name contains NAME
-r/--region {kanto,johto,hoenn,sinnoh}
Filter the pokemons by region
-l/--light [0.xx] Filter out the pokemons darker then 0.xx
-d/--dark [0.xx]
Filter out the pokemons lighter then 0.xx
-t/--type {normal,fire,fighting,water,flying,grass,poison,electric,ground,
psychic,rock,ice,bug,dragon,ghost,dark,steel,fairy}
Filter the pokemons by type.
-ne/--no-extras Excludes extra pokemons
-e/--extras Excludes all non-extra pokemons
Misc:
-w, --wallpaper Changes the desktop wallpapper instead of the terminal
background
-v, --verbose Enables verbose output
-dr, --dry-run Implies -v and doesn't actually changes the wallpapper
or background after the pokemon has been chosen
Not setting any filters will get a completly random pokemon
2017-04-25 14:57:47 -04:00
```
Example:
![alt-tag](Samples/usage.gif)
# Suggestions
2017-05-09 10:02:39 -04:00
I highly suggest making the font colors black and the terminal window transparent. Some of the images have both light and dark colours and so it can be difficult to see the text sometimes. Transparency resolves this issue. Since *Pokemon Terminal* only changes the background, the transparency must be done manually:
2017-04-25 14:57:47 -04:00
1. Navigate to iTerm2 > Preferences > Profiles > Window
2017-05-09 10:12:28 -04:00
2. Set the transparency to about half way.
2017-04-25 14:57:47 -04:00
3. Hit the "blur" checkbox.
4. Set the blur to maximum.
5. Optionally you can set the blending to maximum to adjust the colors to look like the samples provided.
2017-04-25 14:57:47 -04:00
![alt-tag](Samples/transparency_setting.png)
2017-05-09 10:02:39 -04:00
The result should look like this:
![alt-tag](Samples/transparency_tauros.png)
2017-04-27 18:55:06 -04:00
# Adding Custom Images
The folder *Images/Extra* is for adding custom images. You can manually add backgrounds to this folder and they will be visible to the program. Only JPG format is supported. To see a list of all the custom backgrounds type:
2017-04-27 18:55:06 -04:00
```
2017-07-09 11:45:13 -03:00
$ pokemon -e -dr
2017-04-27 18:55:06 -04:00
```
2017-05-09 10:12:28 -04:00
Alternatively, you can delete images from this folder and it will not break the program. These are some custom backgrounds:
2017-04-27 18:55:06 -04:00
2017-05-09 10:02:39 -04:00
![alt-tag](Samples/custom_deoxys.gif)
2017-07-05 18:35:44 -04:00
# Solutions for Common Issues
2017-04-25 14:57:47 -04:00
2017-07-05 18:35:44 -04:00
* If you experience a line at the top of the terminal after changing the Pokemon, you can remove it by typing in the *clear* command or opening a new terminal.
2017-04-25 14:57:47 -04:00
![alt-tag](Samples/line.png)
2017-04-25 16:27:03 -04:00
2017-07-05 18:35:44 -04:00
* If you are using Tilix and the terminal background is not changing, try adjusting the transparency in your profile settings.
* If you are experiencing issues with Terminology, make sure that you have installed the latest version:
```
sudo add-apt-repository ppa:niko2040/e19
sudo apt-get update
sudo apt install terminology
```
* If you get the error: ```39:46: syntax error: Expected end of line but found identifier. (-2741)```. Locate the file ITerm.py in adapter/implementations and on line 7, change "iTerm" to "iTerm2". If you still experience the error, try changing it to "iTerm 2".
2017-04-25 16:41:56 -04:00
# Saving
2017-06-10 23:29:12 -03:00
## Mac OS
I have not yet implemented a way to save the terminal background to a profile. To save a background you will need to setup a startup command in the profile.
2017-04-25 16:41:56 -04:00
1. Navigate to iTerm2 > Preferences > General
2. Locate the field where it says *Send text at start* under *Command*.
2017-07-09 11:45:13 -03:00
3. In that field type "pokemon -n [pokemon name]". You can see an example in the image down below.
- Alternatively you can also type "pokemon" for a random theme each time you open up a new terminal.
2017-04-25 16:41:56 -04:00
4. You can leave out "; clear" if you don't care about the line showing up at the top of the terminal.
![alt-tag](Samples/saving.png)
2017-06-10 23:29:12 -03:00
## Linux
Terminology already saves it automatically, just tick and remove the "temporary" tick in the settings just in case, after setting your desired pokemon (see image below).
![Terminlogy temporary](http://i.imgur.com/BTqYXKa.png)
2017-06-12 13:09:58 -07:00
However to setup a random pokemon each session do:
2017-06-10 23:29:12 -03:00
1. Open `~/.bashrc` in your favorite text editor.
2. Make sure your `~/.bashrc` file has a guard check for interactive terminals, so you don't try to set the background every possible time bash runs. Place this before any command that may produce any output (again, if you don't have it already, and variable setting, e.g `exports` don't produce output):
``` bash
if [[ $- != *i* ]]; then #You might have this already
return
fi
```
3. You may also want to check if terminology is actually running before trying to set the background, so that leads us to
```bash
if [[ "$TERMINOLOGY" -eq "1" ]]; then
2017-07-09 11:45:13 -03:00
pokemon
2017-06-10 23:29:12 -03:00
fi
```
That will simply pick a completly random pokemon each session, but the `pokemon` line is simply calling the app, so you can still filter with regions, darkness, and etc. like you normally would, or you can also reset to a preset pokemon everytime you start.
2017-06-10 23:29:12 -03:00
# Notes & Credits
2017-04-25 16:27:03 -04:00
- Nearly all of the Pokemon backgrounds were created by [Teej](https://pldh.net/gallery/the493).
- Originally the images were about 100mb in total but [ImageOptim](https://imageoptim.com/) was used to compress them down to about 17mb.
- Since the images are compressed, some of them may have some mild (but negligible) compression artifacts.
2017-06-21 19:03:25 -04:00
- Thanks to [@DrMartinLutherXing](https://github.com/DrMartinLutherXing) for some bug fixes.
- Thanks to [@joanbono](https://github.com/joanbono) for the easy installation script in the readme.
- Thanks to [@BnMcG](https://github.com/BnMcG) for the region specific randomize function.
2017-06-11 09:38:59 -04:00
- Thanks to [@samosaara](https://github.com/samosaara) for the Linux (GNOME and Terminology) port.
2017-06-11 09:44:34 -04:00
- Thanks to [@charlesmilette](https://github.com/charlesmilette) for maintaining the AUR package.
2017-06-17 10:00:10 -04:00
- Thanks to [@therealklanni](https://github.com/therealklanni) for adding the project to npm.
2017-06-17 10:53:19 -04:00
- Thanks to [@MattMattV](https://github.com/MattMattV) for adding Tilix support.
2017-06-17 12:19:48 -04:00
- Thanks to [@connordinho](https://github.com/connordinho) for enhancing the slideshow functionality.
2017-06-21 19:03:25 -04:00
- Thanks to [@cclauss](https://github.com/cclauss) for simplifying the code in the database class and the main class.
- Thanks to [@Fiskie](https://github.com/Fiskie) for implementing the adapter design pattern, piping commands and more.
2017-06-24 17:18:48 -04:00
- Thanks to [@marcobiedermann](https://github.com/marcobiedermann) for better image compression.
2017-06-25 13:15:20 -04:00
- Thanks to [@kamil157](https://github.com/kamil157) and [@dosman711](https://github.com/dosman711) for the randomized slideshow function.
2017-09-01 11:57:45 -04:00
- Thanks to [@Squirrels](https://github.com/Squirrels) for adding Pokemon from the Unova and Kalos regions.
2017-09-01 18:43:41 -04:00
- Thanks to [@caedus75](https://github.com/caedus75) for pip and reorganizing the files & folders.