Skip to content

Commit

Permalink
Last documentation updates and and version bump!
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelhnrq committed Oct 7, 2017
1 parent ef3af25 commit 8445e18
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ You can install in any (npm-supported) OS using `npm install --global pokemon-te

## Linux

1. Make sure you have Python 3.5+ installed, check the instructions of your distribution.
1. Make sure you have Python 3.6+ installed, check the instructions of your distribution.
2. Make sure you have Terminology or Tilix, again check the package manager of your distribution.
3. Install
- 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/).
Expand Down Expand Up @@ -186,6 +186,7 @@ if [[ "$TERMINOLOGY" -eq "1" ]]; then
pokemon
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.

# Notes & Credits

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pokemon-terminal",
"version": "1.0.7",
"version": "1.1.0",
"description": "Pokemon terminal themes",
"bin": {
"pokemon": "pokemon",
Expand All @@ -23,4 +23,4 @@
"url": "https://github.com/LazoCoder/Pokemon-Terminal/issues"
},
"homepage": "https://github.com/LazoCoder/Pokemon-Terminal#readme"
}
}
15 changes: 10 additions & 5 deletions pokemonterminal/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ def main(argv):
"""Entrance to the program."""
if __name__ != "__main__":
Filter.filtered_list = [pok for pok in Filter.POKEMON_LIST]
# TODO Lower main() complexity with factory functions or something
parser = argparse.ArgumentParser(
description='Set a pokemon to the current terminal background or '
'wallpaper',
epilog='Not setting any filters will get a completely random pokemon')
filters_group = parser.add_argument_group(
'Filters', 'Arguments used to filter the list of pokemons with '
'various conditions')
'various conditions that then will be picked')
filters_group.add_argument(
'-n',
'--name',
Expand All @@ -81,7 +82,8 @@ def main(argv):
filters_group.add_argument(
'-l',
'--light',
help='Filter out the pokemons darker then 0.xx',
help='Filter out the pokemons darker (ligthness treshold lower) ' +
'then 0.xx (default is 0.7)',
default=0.7,
const=0.7,
metavar='0.xx',
Expand All @@ -91,7 +93,8 @@ def main(argv):
filters_group.add_argument(
'-d',
'--dark',
help='Filter out the pokemons lighter then 0.xx',
help='Filter out the pokemons lighter (ligthness treshold higher) ' +
'then 0.xx (defualt is 0.42)',
default=0.42,
const=0.42,
metavar='0.xx',
Expand All @@ -108,7 +111,7 @@ def main(argv):
filters_group.add_argument(
'-ne',
'--no-extras',
help='Excludes extra pokemons',
help='Excludes extra pokemons (from the extras folder)',
nargs=0,
action=filters.NonExtrasFilter)
filters_group.add_argument(
Expand Down Expand Up @@ -158,7 +161,7 @@ def main(argv):
options = parser.parse_args(argv)
try:
options.id = int(options.id)
except ValueError as _:
except ValueError:
options.name = options.id.lower()
options.id = 0
Filter.filtered_list = [
Expand All @@ -171,6 +174,8 @@ def main(argv):
return

if options.id <= 0:
# TODO this doesn't account for the current set pokemon and might try
# TODO to set the same pokemon again (essentially not doing anything)
target = random.choice(Filter.filtered_list)
else:
options.id -= 1
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def package_data(relpath, folders):

setup(
name="pokemon-terminal",
version="0.0.1",
version="1.1.0", # Copied from package.json

description="Pokemon terminal themes.",
long_description="""
Expand Down Expand Up @@ -73,5 +73,5 @@ def package_data(relpath, folders):
"Programming Language :: Python :: 3.6",
],

python_requires=">=3.5"
python_requires=">=3.6"
)

0 comments on commit 8445e18

Please sign in to comment.