Update llmdumper.php

This commit is contained in:
2025-11-12 22:33:12 +02:00
parent 29992b7f83
commit 7c0a354464

View File

@@ -1,4 +1,5 @@
<?php
/**
* LLM Dumper for PrestaShop Modules
*
@@ -33,6 +34,7 @@ define('OUTPUT_FILE', '.llmdump');
// The directory to exclude. Typically for Composer packages.
define('VENDOR_DIR', 'vendor');
define('GIT_DIR', '.git');
// A list of image file extensions to exclude. Case-insensitive.
const IMAGE_EXTENSIONS = ['png', 'jpg', 'jpeg', 'gif', 'svg', 'webp', 'ico', 'bmp'];
@@ -81,7 +83,9 @@ foreach ($fileIterator as $file) {
if (strpos($filePath, DIRECTORY_SEPARATOR . VENDOR_DIR . DIRECTORY_SEPARATOR) !== false) {
continue;
}
if (strpos($filePath, DIRECTORY_SEPARATOR . GIT_DIR . DIRECTORY_SEPARATOR) !== false) {
continue;
}
// We only care about files, not directories.
if ($file->isDir()) {
continue;
@@ -135,5 +139,3 @@ echo "Dump complete!\n";
echo "- Files processed: {$fileCount}\n";
echo "- Total size: " . round($totalBytes / 1024, 2) . " KB\n";
echo "- Output file: {$outputFilePath}\n";
?>