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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user