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