#!/usr/bin/env python3
import zipfile
import os

zip_path = '/home/alex/git/carrot/Carrot_Hunter_Final.zip'
source_dir = '/home/alex/git/carrot/Carrot_Hunter_Final'

with zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) as zipf:
    for root, dirs, files in os.walk(source_dir):
        for file in files:
            file_path = os.path.join(root, file)
            arcname = os.path.relpath(file_path, os.path.dirname(source_dir))
            zipf.write(file_path, arcname)
            print(f'✓ {arcname}')

size = os.path.getsize(zip_path) / 1024
print(f'\n✓ ZIP-fil lavet: {zip_path}')
print(f'✓ Størrelse: {size:.1f} KB')
