Compare commits

..

2 Commits

Author SHA1 Message Date
f972b9b5cd
Update details in file header for the fork.
Also remove trailing whitespace in the header.
2025-06-01 20:59:25 -04:00
c8d49bda3d
Use r-strings for embedded train car art
That fixes these SyntaxWarnings:

tilde-train.py:60: SyntaxWarning: invalid escape sequence '\_'
  |  |              | |__/V\_| |
tilde-train.py:76: SyntaxWarning: invalid escape sequence '\-'
  == - /  \-/  \-----/  \-/  \ - ==
tilde-train.py:86: SyntaxWarning: invalid escape sequence '\-'
  - /  \-/  \------/  \-/  \ -
2025-06-01 20:56:06 -04:00

View File

@ -1,17 +1,15 @@
#!/usr/bin/env python3
## _ _ _ _ _ _
## | |_(_) |__| |___ | |_ _ _ __ _(_)_ _
## | _| | / _` / -_)| _| '_/ _` | | ' \
## _ _ _ _ _ _
## | |_(_) |__| |___ | |_ _ _ __ _(_)_ _
## | _| | / _` / -_)| _| '_/ _` | | ' \
## \__|_|_\__,_\___(_)__|_| \__,_|_|_||_|
##
## tilde.train is an instance of TerminalTrain. It was originally developed
## by cmccabe on tilde.town but is now maintained in tildegit with the main
## development ocurring on rawtext.club.
## by cmccabe on tilde.town but is now maintained by vilmibm.
##
## If you want to contribute to code improvement, or if you have suggestions
## for cmccabe, create a pull request here: https://tildegit.org/cmccabe/TerminalTrain
## or email cmccabe at cmccabe@rawtext.club
## If you want to contribute code improvements, create a pull request here:
## https://git.tilde.town/vilmibm/tilde-train
##
## -----------------
##
@ -27,7 +25,7 @@
## * turn main loop into a function, so cmd line arg reader can call it (with -p) and quit.
## * figure out why tilde.train doesn't work in some terminals (sthg sthg unicode...)
## * BUGFIX-1 - something about inclusion default cars adding extra "links" to the train.
## * the -p (print train) option should print all cars, not limited to the max_cars value.
## * the -p (print train) option should print all cars, not limited to the max_cars value.
## * related to BUGFIX-1, that seems to impact spacers (links) between cars.
## * allow users to create multiple frames so their cars can be animated (difficulty=med+)
## * allow user configurable speed and number of train cars
@ -53,7 +51,7 @@ print_train = False ## print train to file (instead of the screen scroll)
train = [""]*max_y ## empty train of correct height.
cars = []
engine = """ ____
engine = r""" ____
|____| ------------
| | === | ------ |
___| |__| |_____| | O | |
@ -65,7 +63,7 @@ engine = """ ____
//// \__/ \__/ \__/ \__/ """
engine = engine.split("\n")
caboose = """ ||
caboose = r""" ||
============= ||
=========| |==========
| ---- ---- |
@ -77,7 +75,7 @@ caboose = """ ||
\__/ \__/ \__/ \__/ """
caboose = caboose.split("\n")
default_car = """ ----------------------------
default_car = r""" ----------------------------
| |
| YOUR TRAIN CAR HERE! |
| Just create a |