Fixed formatting for '?' command

Added zeroes so “7 Charizard” becomes “007 Charizard”. This keeps
consistency with all the other commands.
This commit is contained in:
LazoCoder 2017-04-27 17:28:26 -04:00
parent 9b0e0dbf02
commit 38b093776e
2 changed files with 10 additions and 2 deletions

View file

@ -1,5 +1,5 @@
tell application "iTerm"
tell current session of current window
set background image to "/Users/Laki/GitHub/Pokemon-Terminal/Images/Generation I - Kanto/025.png"
set background image to "/Users/Laki/GitHub/Pokemon-Terminal/Images/Generation I - Kanto/006.png"
end tell
end tell

View file

@ -11,6 +11,14 @@ def load_names():
return content
def load_extra():
# Load all the file names of the images in the Extra folder.
files = []
for file in os.listdir(os.get_exec_path()[0] + "/Images/Extra"):
if file.endswith(".png"):
files.append(os.path.join("/Images/Extra", file).split('/')[-1][0:-4])
def trim_name(pokemon):
# Extract the name from a Pokemon extracted from the data file.
# Example: it will be read in from the data file as "150 Mewtwo\n" but it should just be "Mewtwo".
@ -52,5 +60,5 @@ def current_pokemon():
all_pokemon = load_names()
for pokemon in all_pokemon:
if int(pokemon.split(' ')[0]) == int(pokemon_id):
print(pokemon[:-1]) # Remove the new line at the end.
print(printer.add_zeroes(pokemon[:-1])) # Remove the new line at the end.
break