diff --git a/tilde-train.py b/tilde-train.py index 62d79b2..a706dd7 100755 --- a/tilde-train.py +++ b/tilde-train.py @@ -42,6 +42,7 @@ import curses from signal import signal, SIGINT import time ## allowing the loop steps of train animation to be slowed import string ## for input validation +from inspect import cleandoc traincarFN = ".choochoo" max_x = 35 ## max length of train car. @@ -90,30 +91,34 @@ default_car = [ ] def print_help(): - print("") - print("~ ~ Hooray! You've found the tilde.train! ~ ~") - print("") - print("To add your own car to a future train, create") - print("a .choochoo file in your home directory and") - print("make sure it is 'other' readable, for example:") - print("") - print(" chmod 644 ~/.choochoo") - print("") - print("The file should contain an ascii drawing of a") - print("train car no more than " + str(max_x) + " characters wide") - print("and " + str(max_y) + " characters tall.") - print("") - print("Only printable ascii characters are accepted for now.") - print("Run the command again followed by a -t switch to test") - print("your .choochoo file and report any non accepted chars.") - print("") - print("Each train contains a random selection of cars") - print("from across tilde.town user home directories.") - print("Don't worry, yours will be coming around the") - print("bend soon!") - print("") - print("~ ~ ~ ~ ~ ~") - print("") + print( + cleandoc( + f""" + ~ ~ Hooray! You've found the tilde.train! ~ ~ + + To add your own car to a future train, create + a .choochoo file in your home directory and + make sure it is 'other' readable, for example: + + chmod 644 ~/.choochoo + + The file should contain an ascii drawing of a + train car no more than {max_x} characters wide + and {max_y} characters tall. + + Only printable ascii characters are accepted for now. + Run the command again followed by a -t switch to test + your .choochoo file and report any non accepted chars. + + Each train contains a random selection of cars + from across tilde.town user home directories. + Don't worry, yours will be coming around the + bend soon! + + ~ ~ ~ ~ ~ ~ + """ + ) + ) def test_user_car():