1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-15 06:53:07 +01:00

include ais conversion

This commit is contained in:
andreas
2021-10-22 13:08:25 +02:00
parent c63a9bb689
commit 35ff689cd9
3 changed files with 415 additions and 33 deletions

View File

@@ -1,10 +1,17 @@
print("running extra...")
import gzip
import shutil
import os
FILES=['web/index.html']
def compressFile(inFile):
outfile=inFile+".gz"
if os.path.exists(outfile):
otime=os.path.getmtime(outfile)
itime=os.path.getmtime(inFile)
if (otime >= itime):
print("%s is newer then %s, no need to recreate"%(outfile,inFile))
return
with open(inFile, 'rb') as f_in:
with gzip.open(outfile, 'wb') as f_out:
shutil.copyfileobj(f_in, f_out)