Pārlūkot izejas kodu

Add day (abbr) to message string

Foppe Hemminga 6 gadi atpakaļ
vecāks
revīzija
631b189476
1 mainītis faili ar 7 papildinājumiem un 5 dzēšanām
  1. 7 5
      main.py

+ 7 - 5
main.py

@@ -67,11 +67,13 @@ if __name__ == '__main__':
                     found_in_database = True
             if not found_in_database:
                 # report new scratching
-                message = 'New scratching: venue = {} {}-{} | race = {} | horse = {}'.format(scratching.date,
-                                                                                             scratching.state,
-                                                                                             scratching.venue,
-                                                                                             scratching.race,
-                                                                                             scratching.horse)
+                day_abbr = scratching.date.strftime('%a')
+                message = 'New scratching: venue = {} {} {}-{} | race = {} | horse = {}'.format(day_abbr,
+                                                                                                scratching.date,
+                                                                                                scratching.state,
+                                                                                                scratching.venue,
+                                                                                                scratching.race,
+                                                                                                scratching.horse)
                 print(message)
                 view.broadcast(message)
                 # store new scratching