Added region specific slideshow

This commit is contained in:
LazoCoder 2017-04-25 11:32:44 -04:00
parent d4161f77d2
commit ad7cf2dce9
3 changed files with 23 additions and 14 deletions

View file

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

24
main.py
View file

@ -11,15 +11,15 @@ import sys
import time import time
def debug(): def debug(start, end):
# Test each Pokemon in order, one by one. # Test each Pokemon in order, one by one.
for x in range(1, 494): try:
backchanger.change_background(x) for x in range(start, end):
try: backchanger.change_background(x)
time.sleep(0.25) time.sleep(0.25)
except KeyboardInterrupt: except KeyboardInterrupt:
print("Program was terminated.") print("Program was terminated.")
sys.exit() sys.exit()
if __name__ == "__main__": if __name__ == "__main__":
@ -45,7 +45,15 @@ if __name__ == "__main__":
elif arg == "all" or arg == "pokemon" or arg == "list": elif arg == "all" or arg == "pokemon" or arg == "list":
printer.print_all() printer.print_all()
elif arg == "slideshow": elif arg == "slideshow":
debug() debug(1, 494)
elif arg == "slideshow-kanto":
debug(1, 152)
elif arg == "slideshow-johto":
debug(152, 252)
elif arg == "slideshow-hoenn":
debug(252, 387)
elif arg == "slideshow-sinnoh":
debug(387, 494)
elif arg == "rand" or arg == "random": elif arg == "rand" or arg == "random":
backchanger.change_background(random.randint(1, 494)) backchanger.change_background(random.randint(1, 494))
elif arg == "?" or arg == "current": elif arg == "?" or arg == "current":

View file

@ -17,11 +17,12 @@ Parameters:
[letter] - List all Pokemon who's names begin with a particular letter. [letter] - List all Pokemon who's names begin with a particular letter.
Other Parameters: Other Parameters:
pokemon all - List all the Pokemon supported. pokemon all - List all the Pokemon supported.
pokemon random - Pick a Pokemon at random. pokemon random - Pick a Pokemon at random.
pokemon regions - List all the available regions. pokemon regions - List all the available regions.
pokemon slideshow - Iterate through each pokemon. pokemon slideshow - Iterate through each Pokemon.
pokemon help - Display this menu. pokemon slideshow-kanto - Iterate through each Pokemon in the specified reigon.
pokemon help - Display this menu.
''') ''')