mirror of
https://github.com/mewtek/i2ME-Legacy.git
synced 2025-05-11 00:57:31 -05:00
Hahaha I did a dumb.
This commit is contained in:
parent
1cd80308cb
commit
24549fda74
20
lo8s.py
20
lo8s.py
@ -4,10 +4,10 @@ from datetime import datetime, timedelta
|
|||||||
from random import choice
|
from random import choice
|
||||||
|
|
||||||
def runLo8s(flavor, duration, LDL, logo = None, LDLColor = None, EmergencyLFCancel = None):
|
def runLo8s(flavor, duration, LDL, logo = None, LDLColor = None, EmergencyLFCancel = None):
|
||||||
Id = ''.join(random.choice('ABCDEF0123456789') for i in range(16))
|
Id = ''.join(choice('ABCDEF0123456789') for i in range(16))
|
||||||
nowUTC = datetime.utcnow()
|
nowUTC = datetime.utcnow()
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
friendlyRunTime = now + timedelta(seconds=30).strftime('%m/%d/%Y %I:%M:%S %p')
|
friendlyLo8sRunTime = (now + timedelta(seconds=30)).strftime('%m/%d/%Y %I:%M:%S %p')
|
||||||
runTime = nowUTC + timedelta(seconds=30)
|
runTime = nowUTC + timedelta(seconds=30)
|
||||||
ldlCancelTime = runTime.strftime('%m/%d/%Y %H:%M:%S:02')
|
ldlCancelTime = runTime.strftime('%m/%d/%Y %H:%M:%S:02')
|
||||||
lo8sRunTime = runTime.strftime('%m/%d/%Y %H:%M:%S:00')
|
lo8sRunTime = runTime.strftime('%m/%d/%Y %H:%M:%S:00')
|
||||||
@ -52,17 +52,17 @@ def runLo8s(flavor, duration, LDL, logo = None, LDLColor = None, EmergencyLFCanc
|
|||||||
if EmergencyLFCancel == 1:
|
if EmergencyLFCancel == 1:
|
||||||
print("\nGetting The LDL Ready So It'll Cue After The National DBS Local Forecast")
|
print("\nGetting The LDL Ready So It'll Cue After The National DBS Local Forecast")
|
||||||
bit.sendCommand([f'<MSG><Exec workRequest="loadPres(File={0},Flavor=domestic/ldl{LDLColor},Duration=72000,PresentationId=LDL1)" /></MSG>'], 1)
|
bit.sendCommand([f'<MSG><Exec workRequest="loadPres(File={0},Flavor=domestic/ldl{LDLColor},Duration=72000,PresentationId=LDL1)" /></MSG>'], 1)
|
||||||
time.sleep(10)
|
sleep(10)
|
||||||
print("\nSending The Run Command For The LDL...")
|
print("\nSending The Run Command For The LDL...")
|
||||||
bit.sendCommand([f'<MSG><Exec workRequest="runPres(File={0},PresentationId=LDL1,StartTime={nextLDLRun})" /></MSG>'], 1)
|
bit.sendCommand([f'<MSG><Exec workRequest="runPres(File={0},PresentationId=LDL1,StartTime={nextLDLRun})" /></MSG>'], 1)
|
||||||
elif LDL == 1:
|
elif LDL == 1:
|
||||||
print("\nGetting The LDL Ready So It'll Cue After This Local Forecast...")
|
print("\nGetting The LDL Ready So It'll Cue After This Local Forecast...")
|
||||||
bit.sendCommand([f'<MSG><Exec workRequest="loadPres(File={0},Flavor=domestic/ldl{LDLColor},PresentationId=LDL1)" /></MSG>'], 1)
|
bit.sendCommand([f'<MSG><Exec workRequest="loadPres(File={0},Flavor=domestic/ldl{LDLColor},PresentationId=LDL1)" /></MSG>'], 1)
|
||||||
time.sleep(10)
|
sleep(10)
|
||||||
print('\nSending The Run Command For The LDL. As Dave Schwartz Would Say... "That\'s a Wrap!"')
|
print('\nSending The Run Command For The LDL. As Dave Schwartz Would Say... "That\'s a Wrap!"')
|
||||||
bit.sendCommand([f'<MSG><Exec workRequest="runPres(File={0},PresentationId=LDL1,StartTime={nextLDLRun})" /></MSG>'], 1)
|
bit.sendCommand([f'<MSG><Exec workRequest="runPres(File={0},PresentationId=LDL1,StartTime={nextLDLRun})" /></MSG>'], 1)
|
||||||
else:
|
else:
|
||||||
time.sleep(10)
|
sleep(10)
|
||||||
print('That\'s It Folks. As Dave Schwartz Would Say... "That\'s a Wrap!"')
|
print('That\'s It Folks. As Dave Schwartz Would Say... "That\'s a Wrap!"')
|
||||||
|
|
||||||
#----- SET BACKGROUNDS HERE ----------------------#
|
#----- SET BACKGROUNDS HERE ----------------------#
|
||||||
@ -75,20 +75,20 @@ BGNorm = ['3091', '3092', '3102', '3114']
|
|||||||
#------ BG RULES SECTION ------------------------#
|
#------ BG RULES SECTION ------------------------#
|
||||||
|
|
||||||
if BGCatastrophic:
|
if BGCatastrophic:
|
||||||
brandedCatastrophic = random.choice(BGCatastrophic)
|
brandedCatastrophic = choice(BGCatastrophic)
|
||||||
else:
|
else:
|
||||||
brandedCatastrophic = ''
|
brandedCatastrophic = ''
|
||||||
if BGStorm:
|
if BGStorm:
|
||||||
brandedStorm = random.choice(BGStorm)
|
brandedStorm = choice(BGStorm)
|
||||||
else:
|
else:
|
||||||
brandedStorm = ''
|
brandedStorm = ''
|
||||||
if BGAlert:
|
if BGAlert:
|
||||||
brandedAlert = random.choice(BGAlert)
|
brandedAlert = choice(BGAlert)
|
||||||
else:
|
else:
|
||||||
brandedAlert = ''
|
brandedAlert = ''
|
||||||
|
|
||||||
if BGNorm:
|
if BGNorm:
|
||||||
brandedNormal = random.choice(BGNorm)
|
brandedNormal = choice(BGNorm)
|
||||||
else:
|
else:
|
||||||
brandedNormal = ''
|
brandedNormal = ''
|
||||||
#----------------------------------------------
|
#----------------------------------------------
|
||||||
@ -117,4 +117,4 @@ while True:
|
|||||||
exit()
|
exit()
|
||||||
else:
|
else:
|
||||||
print("Not a valid selection.\n\n")
|
print("Not a valid selection.\n\n")
|
||||||
time.sleep(1)
|
sleep(1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user