Skip to content

Commit

Permalink
gzipped files in /www are now stored deterministic, without timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
nlimper committed Aug 11, 2023
1 parent 3b7fd7d commit da487fb
Show file tree
Hide file tree
Showing 14 changed files with 1 addition and 2 deletions.
Binary file modified ESP32_AP-Flasher/data/www/content_cards.json.gz
Binary file not shown.
Binary file modified ESP32_AP-Flasher/data/www/edit.html.gz
Binary file not shown.
Binary file modified ESP32_AP-Flasher/data/www/favicon.ico.gz
Binary file not shown.
Binary file modified ESP32_AP-Flasher/data/www/index.html.gz
Binary file not shown.
Binary file modified ESP32_AP-Flasher/data/www/jsontemplate-demo.html.gz
Binary file not shown.
Binary file modified ESP32_AP-Flasher/data/www/main.css.gz
Binary file not shown.
Binary file modified ESP32_AP-Flasher/data/www/main.js.gz
Binary file not shown.
Binary file modified ESP32_AP-Flasher/data/www/ota.js.gz
Binary file not shown.
Binary file modified ESP32_AP-Flasher/data/www/painter.js.gz
Binary file not shown.
Binary file modified ESP32_AP-Flasher/data/www/setup.html.gz
Binary file not shown.
Binary file modified ESP32_AP-Flasher/data/www/setup.js.gz
Binary file not shown.
Binary file modified ESP32_AP-Flasher/data/www/upload-demo.html.gz
Binary file not shown.
Binary file added ESP32_AP-Flasher/data/www/variables-demo.html.gz
Binary file not shown.
3 changes: 1 addition & 2 deletions ESP32_AP-Flasher/gzip_wwwfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ def gzip_files(source_folder, destination_folder):

print(f"Gzipping: {file}")

with open(source_file_path, 'rb') as f_in, gzip.open(destination_file_path, 'wb') as f_out:
with open(source_file_path, 'rb') as f_in, gzip.GzipFile(destination_file_path, 'wb', mtime=0) as f_out:
shutil.copyfileobj(f_in, f_out)

if __name__ == "__main__":
source_folder = "wwwroot" # Replace with the path of the source folder
destination_folder = "data/www" # Replace with the path of the destination folder

gzip_files(source_folder, destination_folder)

0 comments on commit da487fb

Please sign in to comment.