mirror of
https://github.com/mewtek/i2ME-Legacy.git
synced 2025-05-11 17:00:23 -05:00
Create folders and files if not exist
This commit is contained in:
parent
1ae86e2898
commit
10586a41f2
22
main.py
22
main.py
@ -1,13 +1,29 @@
|
||||
import asyncio
|
||||
from asyncio.log import logger
|
||||
from asyncore import loop
|
||||
import logging,coloredlogs
|
||||
from recordGenerators import DailyForecast,CurrentObservations,HourlyForecast,AirQuality,AirportDelays,PollenForecast,Breathing,Alerts
|
||||
# from radar import TWCRadarProcessor, RadarProcessor
|
||||
|
||||
from radar import TWCRadarProcessor, RadarProcessor
|
||||
import os
|
||||
|
||||
l = logging.getLogger(__name__)
|
||||
coloredlogs.install(logger=l)
|
||||
|
||||
# Create dirs and files
|
||||
if not os.path.exists('./.temp/'):
|
||||
os.makedirs('./.temp/')
|
||||
|
||||
if not os.path.exists('./.temp/tiles/'):
|
||||
os.makedirs('./.temp/tiles/')
|
||||
|
||||
if not os.path.exists('./.temp/tiles/output/'):
|
||||
os.makedirs('./.temp/tiles/output/')
|
||||
|
||||
if not os.path.exists('./.temp/msgId.txt'):
|
||||
print("Creating initial msgId file")
|
||||
with open('./.temp/msgId.txt', "w") as f:
|
||||
f.write("410080515")
|
||||
|
||||
|
||||
"""
|
||||
CurrentConditions: Every 5 minutes
|
||||
@ -15,7 +31,7 @@ Daily Forecasts, Hourlies, etc: 60 minutes
|
||||
Alerts: 5 minutes
|
||||
"""
|
||||
l.info("Starting i2RecordCollector")
|
||||
l.info("Developed by mewtek32, Floppaa, and Goldblaze")
|
||||
l.info("Developed by mewtek32, Floppaa, Goldblaze, and needlenose")
|
||||
|
||||
async def grabAlertsLoop():
|
||||
while True:
|
||||
|
Loading…
x
Reference in New Issue
Block a user