mirror of
https://github.com/LazoCoder/Pokemon-Terminal
synced 2024-11-23 12:23:04 +00:00
Finished debug method, removed useless picture, and added better exception handling
This commit is contained in:
parent
4cf77373f2
commit
e1d88c4527
4 changed files with 21 additions and 5 deletions
Binary file not shown.
Before Width: | Height: | Size: 16 KiB |
18
Main.py
18
Main.py
|
@ -1,5 +1,6 @@
|
|||
import os
|
||||
from sys import argv
|
||||
import time
|
||||
|
||||
|
||||
# Determine which region a Pokemon is from.
|
||||
|
@ -132,7 +133,11 @@ def print_sinnoh():
|
|||
# The parameter is the Pokemon name or number.
|
||||
def change_background(pokemon):
|
||||
if str(pokemon).isdigit():
|
||||
create_script(int(pokemon))
|
||||
pokemon = int(pokemon)
|
||||
if pokemon < 1 or pokemon > 493:
|
||||
print("Only pokemon 1 through 493 are supported.")
|
||||
return
|
||||
create_script(pokemon)
|
||||
else:
|
||||
number = to_number(pokemon)
|
||||
if number == -1:
|
||||
|
@ -142,6 +147,13 @@ def change_background(pokemon):
|
|||
os.system('Scripts/run.sh')
|
||||
|
||||
|
||||
# Test each Pokemon in order, one by one.
|
||||
def debug():
|
||||
for x in range(1, 494):
|
||||
change_background(x)
|
||||
time.sleep(0.25)
|
||||
|
||||
|
||||
# Entrance to the program.
|
||||
if __name__ == "__main__":
|
||||
if len(argv) == 2:
|
||||
|
@ -154,7 +166,9 @@ if __name__ == "__main__":
|
|||
print_hoenn()
|
||||
elif arg == "sinnoh":
|
||||
print_sinnoh()
|
||||
elif arg == "debug":
|
||||
debug()
|
||||
else:
|
||||
change_background(argv[1])
|
||||
else:
|
||||
print_usage()
|
||||
print_usage()
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
to do:
|
||||
- exception handling for numbers too high or low
|
||||
- type one letter in the parameter to see all pokemon that start with that letter
|
||||
- jigglypuff and igglypuff issue (use method to trim name)
|
||||
- complete usage() method
|
||||
- support changing text colour
|
||||
- support changing blender
|
||||
|
@ -9,4 +10,5 @@ to do:
|
|||
- select a *contrasting* colour in the image for the font or something
|
||||
- add option for glare?
|
||||
- add Alternative images + playboy pikachu
|
||||
- how to solve the relative paths issue (if others use it they won’t have ../Laki/..)
|
||||
- how to solve the relative paths issue (if others use it they won’t have ../Laki/..)
|
||||
- how to save theme?
|
|
@ -1,5 +1,5 @@
|
|||
tell application "iTerm"
|
||||
tell current session of current window
|
||||
set background image to "/Users/Laki/PycharmProjects/Pokemon-Terminal-Themes/Images/Generation III - Hoenn/325.png"
|
||||
set background image to "/Users/Laki/PycharmProjects/Pokemon-Terminal-Themes/Images/Generation IV - Sinnoh/493.png"
|
||||
end tell
|
||||
end tell
|
Loading…
Reference in a new issue