major rewrite

This commit is contained in:
2025-09-24 01:32:20 -05:00
parent c332748f44
commit 41413d72fd
21 changed files with 341 additions and 139 deletions

View File

@@ -1,9 +1,9 @@
import shutil
import requests
import logging,coloredlogs
from py2Lib import bit
import Util.MachineProductCfg as MPC
import records.LFRecord as LFR
import py2Lib.bit
import util.machineProductCfg as MPC
import records.lfRecord as LFR
import gzip
from os import remove
import xml.dom.minidom
@@ -21,7 +21,7 @@ for i in MPC.getPrimaryLocations():
# Open the config file and make it accessible via "cfg"
import json
with open("conf.json", "r") as file:
with open("config.json", "r") as file:
cfg = json.load(file)
apiKey = cfg["twcApiKey"]
@@ -82,4 +82,4 @@ async def makeRecord():
bit.sendFile([file], [command], 1, 0)
remove('./.temp/AchesAndPains.i2m')
remove('./.temp/AchesAndPains.gz')
remove('./.temp/AchesAndPains.gz')

View File

@@ -9,13 +9,9 @@ import aiohttp, aiofiles, asyncio
l = logging.getLogger(__name__)
coloredlogs.install()
import sys
sys.path.append("./py2lib")
sys.path.append("./Util")
sys.path.append("./records")
import bit
import MachineProductCfg as MPC
import LFRecord as LFR
import py2Lib.bit
import util.machineProductCfg as MPC
import records.lfRecord as LFR
locationIds = []
zipCodes = []
@@ -28,7 +24,7 @@ for i in MPC.getPrimaryLocations():
# Open the config file and make it accessible via "cfg"
import json
with open("conf.json", "r") as file:
with open("config.json", "r") as file:
cfg = json.load(file)
apiKey = cfg["twcApiKey"]

View File

@@ -6,13 +6,9 @@ import xml.dom.minidom
import logging,coloredlogs
import aiohttp, aiofiles, asyncio
import sys
sys.path.append("./py2lib")
sys.path.append("./Util")
sys.path.append("./records")
import bit
import MachineProductCfg as MPC
import LFRecord as LFR
import py2Lib.bit
import util.machineProductCfg as MPC
import records.lfRecord as LFR
l = logging.getLogger(__name__)
coloredlogs.install()
@@ -30,7 +26,7 @@ l.debug(airports)
# Open the config file and make it accessible via "cfg"
import json
with open("conf.json", "r") as file:
with open("config.json", "r") as file:
cfg = json.load(file)
apiKey = cfg["twcApiKey"]

View File

@@ -2,7 +2,7 @@ import requests
import json
import os
from datetime import datetime,timedelta
from Util.MachineProductCfg import getAlertZones
from util.machineProductCfg import getAlertZones
import time
import pytz
import xml.dom.minidom
@@ -10,11 +10,7 @@ import shutil
import gzip
import logging,coloredlogs
import aiohttp, aiofiles, asyncio
import sys
sys.path.append("./py2lib")
import bit
import py2Lib.bit
l = logging.getLogger(__name__)
coloredlogs.install()
@@ -23,7 +19,7 @@ coloredlogs.install()
alertLocations = getAlertZones()
# Open the config file and make it accessible via "cfg"
import json
with open("conf.json", "r") as file:
with open("config.json", "r") as file:
cfg = json.load(file)
headlineApiKey = cfg["twcApiKey"]

View File

@@ -1,5 +1,4 @@
import requests
import sys
import gzip
import uuid
import os
@@ -8,12 +7,9 @@ import xml.dom.minidom
import logging,coloredlogs
import aiohttp, aiofiles, asyncio
sys.path.append("./py2lib")
sys.path.append("./Util")
sys.path.append("./records")
import bit
import MachineProductCfg as MPC
import LFRecord as LFR
import py2Lib.bit
import util.machineProductCfg as MPC
import records.lfRecord as LFR
l = logging.getLogger(__name__)
coloredlogs.install()
@@ -31,7 +27,7 @@ l.debug(coopIds, geocodes)
# Open the config file and make it accessible via "cfg"
import json
with open("conf.json", "r") as file:
with open("config.json", "r") as file:
cfg = json.load(file)
apiKey = cfg["twcApiKey"]
@@ -94,4 +90,4 @@ async def makeDataFile():
bit.sendFile(files, commands, numFiles, 0)
os.remove("./.temp/Breathing.i2m")
os.remove("./.temp/Breathing.gz")
os.remove("./.temp/Breathing.gz")

View File

@@ -8,13 +8,9 @@ import xml.dom.minidom
import logging,coloredlogs
import aiohttp, aiofiles, asyncio
import sys
sys.path.append("./py2lib")
sys.path.append("./Util")
sys.path.append("./records")
import bit
import MachineProductCfg as MPC
import LFRecord as LFR
import py2Lib.bit
import util.machineProductCfg as MPC
import records.lfRecord as LFR
l = logging.getLogger(__name__)
coloredlogs.install()
@@ -35,7 +31,7 @@ for i in MPC.getMetroCities():
# Open the config file and make it accessible via "cfg"
import json
with open("conf.json", "r") as file:
with open("config.json", "r") as file:
cfg = json.load(file)
apiKey = cfg["twcApiKey"]

View File

@@ -1,5 +1,4 @@
import requests
import sys
import gzip
import uuid
import os
@@ -8,12 +7,9 @@ import xml.dom.minidom
import logging,coloredlogs
import aiohttp, aiofiles, asyncio
sys.path.append("./py2lib")
sys.path.append("./Util")
sys.path.append("./records")
import bit
import MachineProductCfg as MPC
import LFRecord as LFR
import py2Lib.bit
import util.machineProductCfg as MPC
import records.lfRecord as LFR
l = logging.getLogger(__name__)
coloredlogs.install()
@@ -33,7 +29,7 @@ for i in MPC.getMetroCities():
# Open the config file and make it accessible via "cfg"
import json
with open("conf.json", "r") as file:
with open("config.json", "r") as file:
cfg = json.load(file)
apiKey = cfg["twcApiKey"]
@@ -95,4 +91,4 @@ async def makeDataFile():
bit.sendFile(files, commands, numFiles, 0)
os.remove("./.temp/DailyForecast.i2m")
os.remove("./.temp/DailyForecast.gz")
os.remove("./.temp/DailyForecast.gz")

View File

@@ -1,9 +1,9 @@
import shutil
import requests
import logging,coloredlogs
from py2Lib import bit
import Util.MachineProductCfg as MPC
import records.LFRecord as LFR
import py2Lib.bit
import util.machineProductCfg as MPC
import records.lfRecord as LFR
import gzip
from os import remove
import xml.dom.minidom
@@ -21,7 +21,7 @@ for i in MPC.getPrimaryLocations():
# Open the config file and make it accessible via "cfg"
import json
with open("conf.json", "r") as file:
with open("config.json", "r") as file:
cfg = json.load(file)
apiKey = cfg["twcApiKey"]
@@ -82,4 +82,4 @@ async def makeRecord():
bit.sendFile([file], [command], 1, 0)
remove('./.temp/HeatingAndCooling.i2m')
remove('./.temp/HeatingAndCooling.gz')
remove('./.temp/HeatingAndCooling.gz')

View File

@@ -7,13 +7,9 @@ import xml.dom.minidom
import logging,coloredlogs
import aiohttp, aiofiles, asyncio, asyncio
import sys
sys.path.append("./py2lib")
sys.path.append("./Util")
sys.path.append("./records")
import bit
import MachineProductCfg as MPC
import LFRecord as LFR
import py2Lib.bit
import util.machineProductCfg as MPC
import records.lfRecord as LFR
l = logging.getLogger(__name__)
coloredlogs.install()
@@ -33,7 +29,7 @@ for i in MPC.getMetroCities():
# Open the config file and make it accessible via "cfg"
import json
with open("conf.json", "r") as file:
with open("config.json", "r") as file:
cfg = json.load(file)
apiKey = cfg["twcApiKey"]
@@ -97,4 +93,4 @@ async def makeDataFile():
bit.sendFile(files, commands, numFiles, 0)
os.remove("./.temp/HourlyForecast.i2m")
os.remove("./.temp/HourlyForecast.gz")
os.remove("./.temp/HourlyForecast.gz")

View File

@@ -1,9 +1,9 @@
import shutil
import requests
import logging,coloredlogs
from py2Lib import bit
import Util.MachineProductCfg as MPC
import records.LFRecord as LFR
import py2Lib.bit
import util.machineProductCfg as MPC
import records.lfRecord as LFR
import gzip
from os import remove
import xml.dom.minidom
@@ -21,7 +21,7 @@ for i in MPC.getPrimaryLocations():
# Open the config file and make it accessible via "cfg"
import json
with open("conf.json", "r") as file:
with open("config.json", "r") as file:
cfg = json.load(file)
apiKey = cfg["twcApiKey"]
@@ -82,4 +82,4 @@ async def makeRecord():
bit.sendFile([file], [command], 1, 0)
remove('./.temp/MosquitoActivity.i2m')
remove('./.temp/MosquitoActivity.gz')
remove('./.temp/MosquitoActivity.gz')

View File

@@ -1,5 +1,4 @@
import requests
import sys
import gzip
import uuid
import os
@@ -8,12 +7,9 @@ import xml.dom.minidom
import logging, coloredlogs
import aiohttp, aiofiles, asyncio
sys.path.append("./py2lib")
sys.path.append("./Util")
sys.path.append("./records")
import bit
import MachineProductCfg as MPC
import LFRecord as LFR
import py2Lib.bit
import util.machineProductCfg as MPC
import records.lfRecord as LFR
l = logging.getLogger(__name__)
@@ -32,7 +28,7 @@ l.debug(pollenIds, geocodes)
# Open the config file and make it accessible via "cfg"
import json
with open("conf.json", "r") as file:
with open("config.json", "r") as file:
cfg = json.load(file)
apiKey = cfg["twcApiKey"]
@@ -94,4 +90,4 @@ async def makeDataFile():
bit.sendFile(files, commands, numFiles, 0)
os.remove("./.temp/PollenForecast.i2m")
os.remove("./.temp/PollenForecast.gz")
os.remove("./.temp/PollenForecast.gz")

View File

@@ -1,9 +1,9 @@
import shutil
import logging,coloredlogs
import datetime
from py2Lib import bit
import Util.MachineProductCfg as MPC
import records.LFRecord as LFR
import py2Lib.bit
import util.machineProductCfg as MPC
import records.lfRecord as LFR
import gzip
from os import remove
import xml.dom.minidom
@@ -21,7 +21,7 @@ for i in MPC.getTideStations():
# Open the config file and make it accessible via "cfg"
import json
with open("conf.json", "r") as file:
with open("config.json", "r") as file:
cfg = json.load(file)
apiKey = cfg["twcApiKey"]
@@ -91,4 +91,4 @@ async def makeRecord():
bit.sendFile([file], [command], 1, 0)
remove('./.temp/TidesForecast.i2m')
remove('./.temp/TidesForecast.gz')
remove('./.temp/TidesForecast.gz')

View File

@@ -1,9 +1,9 @@
import shutil
import requests
import logging,coloredlogs
from py2Lib import bit
import Util.MachineProductCfg as MPC
import records.LFRecord as LFR
import py2Lib.bit
import util.machineProductCfg as MPC
import records.lfRecord as LFR
import gzip
from os import remove
import xml.dom.minidom
@@ -21,7 +21,7 @@ for i in MPC.getPrimaryLocations():
# Open the config file and make it accessible via "cfg"
import json
with open("conf.json", "r") as file:
with open("config.json", "r") as file:
cfg = json.load(file)
apiKey = cfg["twcApiKey"]
@@ -81,4 +81,4 @@ async def makeRecord():
bit.sendFile([file], [command], 1, 0)
remove('./.temp/WateringNeeds.i2m')
remove('./.temp/WateringNeeds.gz')
remove('./.temp/WateringNeeds.gz')