Pokemon-Terminal/README.md

204 lines
11 KiB
Markdown
Raw Normal View History

2017-04-25 18:23:48 +00:00
# Pokemon-Terminal
2017-11-08 15:36:53 +00:00
[![Build Status](https://travis-ci.org/LazoCoder/Pokemon-Terminal.svg?branch=master)](https://travis-ci.org/LazoCoder/Pokemon-Terminal)
<p align="center">
<img src="https://i.imgur.com/n34fXyp.png" width="300"/>
<img src="https://i.imgur.com/xaHPMUd.png" width="300"/>
2017-11-08 18:12:48 +00:00
<br><a href="https://imgur.com/a/0wfFm" target="_blank">More previews</a>
2017-11-08 15:36:53 +00:00
</p>
2017-04-25 23:01:53 +00:00
# Features
- 719 unique Pokemon
2017-04-25 23:01:53 +00:00
- Select Pokemon by name or by index number
2017-05-09 14:02:39 +00:00
- Ability to change the Desktop Wallpaper & the Terminal background
2017-04-25 23:01:53 +00:00
- Internal search system for finding Pokemon
2017-06-17 15:31:25 +00:00
- Supports iTerm2, Terminology & Tilix
2017-04-25 23:01:53 +00:00
2017-11-08 15:36:53 +00:00
# Installation
Install Python 3.6 or higher:
- [For Mac](https://www.python.org/downloads/mac-osx/)
- [For Ubuntu](https://askubuntu.com/a/865569)
- [For Arch Linux](https://www.archlinux.org/packages/extra/x86_64/python/)
- Not all compatible distros are named here, but a quick Google search should give you instructions for your distribution of choice.
Get a compatible terminal emulator:
- [iTerm2](https://iterm2.com/)
- [Terminology](https://www.enlightenment.org/about-terminology)
- [Tilix](https://gnunn1.github.io/tilix-web/)
You can then proceed with one of the following methods for installation:
- [Arch Linux User Repository package (System-wide)](https://aur.archlinux.org/packages/pokemon-terminal-git/) (maintained by [@sylveon](https://github.com/sylveon))
- [pip (System-wide)](#pip-system-wide)
- [pip (Per-User)](#pip-per-user)
- [npm (Per-User)](#npm-per-user)
- [Distutils (System-wide)](#distutils-system-wide)
2017-06-12 20:09:58 +00:00
2017-11-08 15:36:53 +00:00
Notes:
- Your distro might include pip in a different package then Python, make sure to have that installed and running when calling `pip3.6` if you want to install using it.
- npm installation obviously requires to have [Node.js](https://nodejs.org/) installed.
2017-07-05 23:53:21 +00:00
2017-11-08 15:36:53 +00:00
## pip (System-wide)
2017-11-08 15:36:53 +00:00
Run `sudo pip3.6 install git+https://github.com/LazoCoder/Pokemon-Terminal.git`. When the command completes, it's installed and ready to go!
## pip (Per-User)
You can install it with pip for a single user with `pip3.6 install --user git+https://github.com/LazoCoder/Pokemon-Terminal.git`. You might want to add `~/.local/bin` to your PATH to be able to call `pokemon` and `ichooseyou` everywhere.
## npm (Per-User)
2017-06-17 13:56:03 +00:00
You can install in any (npm-supported) OS using `npm install --global pokemon-terminal`. That's it, you're done!
2017-11-08 15:36:53 +00:00
## Distutils (System-wide)
You can clone or [download](https://github.com/LazoCoder/Pokemon-Terminal/archive/master.zip) this repo, and run `sudo python3.6 setup.py install` at the root of the repo.
# Usage
2017-06-12 20:09:58 +00:00
2017-04-25 18:57:47 +00:00
```
2017-11-08 15:36:53 +00:00
usage: pokemon [-h] [-n NAME]
[-r [{kanto,johto,hoenn,sinnoh,unova,kalos} [{kanto,johto,hoenn,sinnoh,unova,kalos} ...]]]
[-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} [{normal,fire,fighting,water,flying,grass,poison,electric,ground,psychic,rock,ice,bug,dragon,ghost,dark,steel,fairy} ...]]]
[-ne] [-e] [-ss [X]] [-w] [-v] [-dr] [-c]
[id]
2017-07-09 14:45:13 +00:00
Set a pokemon to the current terminal background or wallpaper
positional arguments:
2017-11-08 15:36:53 +00:00
id Specify the wanted pokemon ID or the exact (case
insensitive) name
2017-07-09 14:45:13 +00:00
optional arguments:
-h, --help show this help message and exit
-c, --clear Clears the current pokemon from terminal background
and quits.
Filters:
2017-11-08 15:36:53 +00:00
Arguments used to filter the list of pokemons with various conditions that
then will be picked
2017-07-09 14:45:13 +00:00
2017-11-08 15:36:53 +00:00
-n NAME, --name NAME Filter by pokemon which name contains NAME
-r [{kanto,johto,hoenn,sinnoh,unova,kalos} [{kanto,johto,hoenn,sinnoh,unova,kalos} ...]], --region [{kanto,johto,hoenn,sinnoh,unova,kalos} [{kanto,johto,hoenn,sinnoh,unova,kalos} ...]]
2017-07-09 14:45:13 +00:00
Filter the pokemons by region
2017-11-08 15:36:53 +00:00
-l [0.xx], --light [0.xx]
Filter out the pokemons darker (ligthness treshold
lower) then 0.xx (default is 0.7)
-d [0.xx], --dark [0.xx]
Filter out the pokemons lighter (ligthness treshold
higher) then 0.xx (defualt is 0.42)
-t [{normal,fire,fighting,water,flying,grass,poison,electric,ground,psychic,rock,ice,bug,dragon,ghost,dark,steel,fairy} [{normal,fire,fighting,water,flying,grass,poison,electric,ground,psychic,rock,ice,bug,dragon,ghost,dark,steel,fairy} ...]], --type [{normal,fire,fighting,water,flying,grass,poison,electric,ground,psychic,rock,ice,bug,dragon,ghost,dark,steel,fairy} [{normal,fire,fighting,water,flying,grass,poison,electric,ground,psychic,rock,ice,bug,dragon,ghost,dark,steel,fairy} ...]]
2017-07-09 14:45:13 +00:00
Filter the pokemons by type.
2017-11-08 15:36:53 +00:00
-ne, --no-extras Excludes extra pokemons (from the extras folder)
-e, --extras Excludes all non-extra pokemons
2017-07-09 14:45:13 +00:00
Misc:
2017-11-08 15:36:53 +00:00
-ss [X], --slideshow [X]
Instead of simply choosing a random pokemon from the
filtered list, starts a slideshow (with X minutes of
delay between pokemon) in the background with the
pokemon that matched the filters
-w, --wallpaper Changes the desktop wallpaper instead of the terminal
2017-07-09 14:45:13 +00:00
background
-v, --verbose Enables verbose output
2017-11-08 15:36:53 +00:00
-dr, --dry-run Implies -v and doesnt actually changes either
wallpaper or background after the pokemon has been
chosen
2017-07-09 14:45:13 +00:00
2017-11-08 15:36:53 +00:00
Not setting any filters will get a completely random pokemon
2017-04-25 18:57:47 +00:00
```
Example:
2017-11-08 15:36:53 +00:00
![](https://i.imgur.com/DfA2lcd.gif)
# Tips, tricks and common issues
2017-04-25 18:57:47 +00:00
2017-11-08 15:36:53 +00:00
## iTerm2 settings
2017-04-25 18:57:47 +00:00
2017-11-08 15:36:53 +00: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 18:57:47 +00:00
1. Navigate to iTerm2 > Preferences > Profiles > Window
2017-05-09 14:12:28 +00:00
2. Set the transparency to about half way.
2017-04-25 18:57:47 +00: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 18:57:47 +00:00
2017-11-08 15:36:53 +00:00
![](https://i.imgur.com/xSZAGhL.png)
2017-04-25 18:57:47 +00:00
2017-05-09 14:02:39 +00:00
The result should look like this:
2017-11-08 15:36:53 +00:00
![](https://i.imgur.com/82DAT97.jpg)
2017-05-09 14:02:39 +00:00
2017-11-08 15:36:53 +00:00
## Adding Custom Images
2017-04-27 22:55:06 +00:00
2017-11-08 15:36:53 +00:00
The folder `pokemonterminal/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:
```bash
2017-07-09 14:45:13 +00:00
$ pokemon -e -dr
2017-04-27 22:55:06 +00:00
```
2017-05-09 14:12:28 +00:00
Alternatively, you can delete images from this folder and it will not break the program. These are some custom backgrounds:
2017-04-27 22:55:06 +00:00
2017-11-08 15:36:53 +00:00
![](https://i.imgur.com/gdGUucu.gif)
2017-05-09 14:02:39 +00:00
2017-11-08 15:36:53 +00:00
## Solutions for Common Issues
2017-04-25 18:57:47 +00:00
2017-11-08 15:36:53 +00: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.
![](https://i.imgur.com/5HMu1jD.png)
2017-04-25 20:27:03 +00:00
2017-07-05 22:35:44 +00:00
* If you are using Tilix and the terminal background is not changing, try adjusting the transparency in your profile settings.
2017-11-08 15:36:53 +00:00
* If you are experiencing issues with Terminology and are running on Ubuntu, make sure that you have installed the latest version:
```bash
$ sudo add-apt-repository ppa:niko2040/e19
$ sudo apt-get update
$ sudo apt install terminology
2017-07-05 22:35:44 +00:00
```
2017-11-08 15:36:53 +00:00
* If you get the error `39:46: syntax error: Expected end of line but found identifier. (-2741)`: Locate the file `ITerm.py` in `pokemonterminal/adapter/implementations` and on line 7, change `iTerm` to `iTerm2`. If you still experience the error, try changing it to `iTerm 2`.
2017-07-05 22:35:44 +00:00
2017-11-08 15:36:53 +00:00
## Saving
2017-04-25 20:41:56 +00:00
2017-11-08 15:36:53 +00:00
### macOS
2017-06-11 02:29:12 +00:00
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 20:41:56 +00:00
1. Navigate to iTerm2 > Preferences > General
2. Locate the field where it says *Send text at start* under *Command*.
2017-07-09 14:45:13 +00: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 20:41:56 +00:00
4. You can leave out "; clear" if you don't care about the line showing up at the top of the terminal.
2017-11-08 15:36:53 +00:00
![](https://i.imgur.com/2d4qa9j.png)
2017-04-25 20:41:56 +00:00
2017-11-08 15:36:53 +00:00
### Linux
Terminology already saves it automatically, just untick "temporary" in the settings after setting your desired pokemon:
![](http://i.imgur.com/BTqYXKa.png)
2017-06-11 02:29:12 +00:00
To setup a random pokemon each session:
2017-06-11 02:29:12 +00:00
1. Open `~/.bashrc` in your favorite text editor.
2017-11-08 15:36:53 +00:00
2. Add the following lines to it:
```bash
if [[ "$TERMINOLOGY" -eq "1" ]]; then
pokemon
fi
```
That will simply pick a completely 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-11 02:29:12 +00:00
# Notes & Credits
2017-04-25 20:27:03 +00: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 23:03:25 +00: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 13:38:59 +00:00
- Thanks to [@samosaara](https://github.com/samosaara) for the Linux (GNOME and Terminology) port.
2017-11-08 15:36:53 +00:00
- Thanks to [@sylveon](https://github.com/sylveon) for maintaining the AUR package.
2017-06-17 14:00:10 +00:00
- Thanks to [@therealklanni](https://github.com/therealklanni) for adding the project to npm.
2017-06-17 14:53:19 +00:00
- Thanks to [@MattMattV](https://github.com/MattMattV) for adding Tilix support.
2017-06-17 16:19:48 +00:00
- Thanks to [@connordinho](https://github.com/connordinho) for enhancing the slideshow functionality.
2017-06-21 23:03:25 +00: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 21:18:48 +00:00
- Thanks to [@marcobiedermann](https://github.com/marcobiedermann) for better image compression.
2017-06-25 17:15:20 +00:00
- Thanks to [@kamil157](https://github.com/kamil157) and [@dosman711](https://github.com/dosman711) for the randomized slideshow function.
2017-09-01 15:57:45 +00:00
- Thanks to [@Squirrels](https://github.com/Squirrels) for adding Pokemon from the Unova and Kalos regions.
2017-09-01 22:43:41 +00:00
- Thanks to [@caedus75](https://github.com/caedus75) for pip and reorganizing the files & folders.