|
|
@@ -107,7 +107,7 @@ def convert_to_date(weird_string):
|
|
|
return calculated_date
|
|
|
|
|
|
|
|
|
-def send_messages(scratches, source, start=0):
|
|
|
+def send_messages(scratches, source, start=0, send_only_flagged=False):
|
|
|
long_message = ''
|
|
|
|
|
|
message_string = '{} {}venue = {} {} {}-{} | race = {} starts at {} | {} UTC | horse = {}{}'
|
|
|
@@ -116,6 +116,9 @@ def send_messages(scratches, source, start=0):
|
|
|
flag = ''
|
|
|
if m.torn:
|
|
|
flag = 'FLAGGED!! '
|
|
|
+ elif send_only_flagged:
|
|
|
+ # Discard messages that are not flagged
|
|
|
+ continue
|
|
|
pprint(m)
|
|
|
end = time.time()
|
|
|
message = message_string.format(source,
|