Stream: git-wasmtime

Topic: wasmtime / issue #13897 spam


view this post on Zulip Wasmtime GitHub notifications bot (Jul 19 2026 at 01:21):

alexcrichton edited issue #13897:

deleted

view this post on Zulip Wasmtime GitHub notifications bot (Jul 19 2026 at 02:21):

groenklimaat commented on issue #13897:

#!/usr/bin/env python3
"""
╔═══════════════════════════════════════════════════════════════════════════════╗
║ UNIVERSELE BESTANDSARCHIVER - Automatische Sortering ║
║ Veilig · Geen automatisch verwijderen · Alleen met toestemming ║
╚═══════════════════════════════════════════════════════════════════════════════╝
"""

import os
import shutil
import json
import threading
import time
import hashlib
import sys
import stat
from pathlib import Path
from datetime import datetime
from tkinter import *
from tkinter import ttk, filedialog, messagebox, scrolledtext
from dataclasses import dataclass, field
from typing import Dict, List, Optional, Set, Any
from enum import Enum
from concurrent.futures import ThreadPoolExecutor, as_completed
import multiprocessing
import getpass
import platform

============================================================================

PLATFORM DETECTIE

============================================================================

SYSTEM = platform.system()
IS_WINDOWS = SYSTEM == "Windows"
IS_LINUX = SYSTEM == "Linux"
IS_MAC = SYSTEM == "Darwin"

============================================================================

CATEGORIEËN

============================================================================

class FileCategory(Enum):
DOCUMENTS = "Documenten"
SPREADSHEETS = "Spreadsheets"
PRESENTATIONS = "Presentaties"
PDF = "PDF"
TEXT = "Tekst"
IMAGES = "Afbeeldingen"
VIDEOS = "Video's"
AUDIO = "Muziek"
SOURCE_CODE = "Broncode"
SCRIPTS = "Scripts"
WEB = "Web"
DATABASES = "Databases"
CONFIG = "Configuratie"
SYSTEM = "Systeem"
TEMP = "Tijdelijk"
BACKUP = "Backups"
LOGS = "Logs"
ARCHIVES = "Archieven"
EXECUTABLES = "Uitvoerbaar"
INSTALLERS = "Installatie"
DOWNLOADS = "Downloads"
DESKTOP = "Bureaublad"
OTHER = "Overig"
UNKNOWN = "Onbekend"

============================================================================

CONFIGURATIE - STANDAARD VEILIG

============================================================================

@dataclass
class ArchiveSettings:
"""Instellingen - Standaard veilig (geen automatisch verwijderen)"""
source_folders: List[str] = field(default_factory=list)
archive_folder: str = ""

# Sortering - AUTOMATISCH AAN
organize_by_category: bool = True      # ✅ Automatisch sorteren op categorie
organize_by_date: bool = True          # ✅ Automatisch sorteren op datum
organize_by_type: bool = False         # Optioneel

# Veiligheidsinstellingen
include_hidden: bool = False           # ❌ Verborgen bestanden overslaan
include_system: bool = False           # ❌ Systeembestanden overslaan
detect_duplicates: bool = True         # ✅ Duplicaten detecteren
duplicate_action: str = "rename"       # ✅ Herbenoemen ipv verwijderen

# ⚠️ CRUCIAAL: Verwijderen standaard UIT
delete_original: bool = False          # ❌ NIET automatisch verwijderen!
dry_run: bool = False                  # ❌ Niet in dry-run modus

# Prestaties
use_multithreading: bool = True
max_workers: int = 4
max_depth: int = 20
max_size_mb: int = 10240               # 10GB

============================================================================

BESTANDSANALYSATOR

============================================================================

class FileAnalyzer:
EXTENSION_CATEGORIES = {
'.doc': FileCategory.DOCUMENTS, '.docx': FileCategory.DOCUMENTS,
'.odt': FileCategory.DOCUMENTS, '.rtf': FileCategory.DOCUMENTS,
'.xls': FileCategory.SPREADSHEETS, '.xlsx': FileCategory.SPREADSHEETS,
'.ods': FileCategory.SPREADSHEETS, '.csv': FileCategory.SPREADSHEETS,
'.ppt': FileCategory.PRESENTATIONS, '.pptx': FileCategory.PRESENTATIONS,
'.odp': FileCategory.PRESENTATIONS,
'.pdf': FileCategory.PDF,
'.txt': FileCategory.TEXT, '.md': FileCategory.TEXT,
'.jpg': FileCategory.IMAGES, '.jpeg': FileCategory.IMAGES,
'.png': FileCategory.IMAGES, '.gif': FileCategory.IMAGES,
'.bmp': FileCategory.IMAGES, '.tiff': FileCategory.IMAGES,
'.svg': FileCategory.IMAGES, '.ico': FileCategory.IMAGES,
'.webp': FileCategory.IMAGES, '.psd': FileCategory.IMAGES,
'.mp4': FileCategory.VIDEOS, '.avi': FileCategory.VIDEOS,
'.mkv': FileCategory.VIDEOS, '.mov': FileCategory.VIDEOS,
'.wmv': FileCategory.VIDEOS, '.flv': FileCategory.VIDEOS,
'.webm': FileCategory.VIDEOS, '.m4v': FileCategory.VIDEOS,
'.mpg': FileCategory.VIDEOS, '.mpeg': FileCategory.VIDEOS,
'.mp3': FileCategory.AUDIO, '.wav': FileCategory.AUDIO,
'.flac': FileCategory.AUDIO, '.aac': FileCategory.AUDIO,
'.ogg': FileCategory.AUDIO, '.wma': FileCategory.AUDIO,
'.m4a': FileCategory.AUDIO, '.aiff': FileCategory.AUDIO,
'.py': FileCategory.SOURCE_CODE, '.pyw': FileCategory.SOURCE_CODE,
'.java': FileCategory.SOURCE_CODE, '.c': FileCategory.SOURCE_CODE,
'.cpp': FileCategory.SOURCE_CODE, '.h': FileCategory.SOURCE_CODE,
'.cs': FileCategory.SOURCE_CODE, '.vb': FileCategory.SOURCE_CODE,
'.go': FileCategory.SOURCE_CODE, '.rs': FileCategory.SOURCE_CODE,
'.swift': FileCategory.SOURCE_CODE, '.kt': FileCategory.SOURCE_CODE,
'.sh': FileCategory.SCRIPTS, '.bash': FileCategory.SCRIPTS,
'.ps1': FileCategory.SCRIPTS, '.vbs': FileCategory.SCRIPTS,
'.bat': FileCategory.SCRIPTS, '.cmd': FileCategory.SCRIPTS,
'.js': FileCategory.SCRIPTS, '.ts': FileCategory.SCRIPTS,
'.rb': FileCategory.SCRIPTS, '.pl': FileCategory.SCRIPTS,
'.html': FileCategory.WEB, '.htm': FileCategory.WEB,
'.css': FileCategory.WEB, '.scss': FileCategory.WEB,
'.php': FileCategory.WEB, '.asp': FileCategory.WEB,
'.jsp': FileCategory.WEB, '.xml': FileCategory.WEB,
'.json': FileCategory.WEB, '.yaml': FileCategory.WEB,
'.yml': FileCategory.WEB, '.toml': FileCategory.WEB,
'.sql': FileCategory.DATABASES, '.db': FileCategory.DATABASES,
'.sqlite': FileCategory.DATABASES, '.sqlite3': FileCategory.DATABASES,
'.mdb': FileCategory.DATABASES, '.accdb': FileCategory.DATABASES,
'.cfg': FileCategory.CONFIG, '.conf': FileCategory.CONFIG,
'.ini': FileCategory.CONFIG, '.env': FileCategory.CONFIG,
'.log': FileCategory.LOGS, '.out': FileCategory.LOGS,
'.zip': FileCategory.ARCHIVES, '.rar': FileCategory.ARCHIVES,
'.7z': FileCategory.ARCHIVES, '.tar': FileCategory.ARCHIVES,
'.gz': FileCategory.ARCHIVES, '.bz2': FileCategory.ARCHIVES,
'.xz': FileCategory.ARCHIVES, '.tgz': FileCategory.ARCHIVES,
'.exe': FileCategory.EXECUTABLES, '.msi': FileCategory.INSTALLERS,
'.dmg': FileCategory.INSTALLERS, '.pkg': FileCategory.INSTALLERS,
'.deb': FileCategory.INSTALLERS, '.rpm': FileCategory.INSTALLERS,
'.app': FileCategory.EXECUTABLES, '.AppImage': FileCategory.EXECUTABLES,
}

def analyze_file(self, filepath: Path) -> Optional[Dict[str, Any]]:
    try:
        if not filepath.exists():
            return None

        stat_info = filepath.stat()
        size_bytes = stat_info.st_size
        name = filepath.name
        extension = filepath.suffix.lower()

        category = self._determine_category(filepath, extension)
        is_hidden = name.startswith('.')
        is_system = self._is_system_file(filepath)

        checksum = None
        if size_bytes < 50 * 1024 * 1024:
            checksum = self._calculate_md5(filepath)

        return {
            'path': filepath,
            'name': name,
            'extension': extension,
            'size_bytes': size_bytes,
            'size_mb': size_bytes / (1024 * 1024),
            'category': category,
            'is_hidden': is_hidden,
            'is_system': is_system,
            'checksum': checksum,
            'modified': datetime.fromtimestamp(stat_info.st_mtime),
            'created': datetime.fromtimestamp(stat_info.st_ctime),
            'parent': filepath.parent.name
        }
    except Exception:
        return None

def _determine_category(self, filepath: Path, extension: str) -> FileCategory:
    path_str = str(filepath).lower()
    name = filepath.name.lower()

    path_patterns = {
        FileCategory.DOCUMENTS: ['/documents', '/documenten', '/docs'],
        FileCategory.IMAGES: ['/images', '/afbeeldingen', '/pictures', '/photos'],
        FileCategory.VIDEOS: ['/videos', '/video', '/movies', '/films'],
        FileCategory.AUDIO: ['/music', '/muziek', '/audio', '/songs'],
        FileCategory.SOURCE_CODE: ['/src', '/source', '/code', '/development'],
        FileCategory.DATABASES: ['/databases', '/db', '/sql'],
        FileCategory.CONFIG: ['/config', '/configuration', '/settings'],
        FileCategory.LOGS: ['/logs', '/log'],
        FileCategory.BACKUP: ['/backup', '/back-ups', '/backups'],
        FileCategory.TEMP: ['/temp', '/tmp', '/cache'],
        FileCategory.DOWNLOADS: ['/downloads', '/download'],
        FileCategory.DESKTOP: ['/desktop', '/bureaublad'],
    }

    for category, patterns in path_patterns.items():
        for pattern in patterns:
            if pattern in path_str:
                return category

    name_patterns = {
        FileCategory.BACKUP: ['backup', 'back-up', 'copy_'],
        FileCategory.TEMP: ['temp_', 'tmp_', 'c

[message truncated]

view this post on Zulip Wasmtime GitHub notifications bot (Jul 19 2026 at 03:10):

alexcrichton edited a comment on issue #13897:

deleted

view this post on Zulip Wasmtime GitHub notifications bot (Jul 19 2026 at 03:10):

alexcrichton locked issue #13897:

deleted


Last updated: Jul 29 2026 at 05:03 UTC