Refactor SVG processing scripts and add new functionality

- Updated `svg-cleanup.js` to improve SVG file processing and validation.
- Refactored `update-data.js` to streamline the data update process and integrate new scripts for generating image variants and syncing data files.
- Introduced `generate-variants.js` to handle the conversion of SVG files to PNG and JPG formats.
- Created `sync-data.js` to synchronize logo data with the filesystem, ensuring accurate representation of available images.
- Enhanced error handling and logging throughout the scripts for better debugging and user feedback.
- Added support for processing all collections or a specific collection based on command-line arguments or environment variables.
This commit is contained in:
sHa
2025-06-19 17:09:45 +03:00
parent 1db0f1cbe9
commit 374ece5142
11 changed files with 424 additions and 386 deletions

View File

@@ -1 +1,10 @@
<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1200 800"><path d="m0 0h1200v800h-1200z" fill="#ffd700"/><g stroke="#bf0a30" transform="translate(600 400)"><path id="a" d="m157.344 38.2812h-314.688m348.719-25.5312h-382.75m382.75-25.5h-382.75m348.719-25.5312h-314.688" stroke-linecap="round" stroke-width="17"/><use transform="rotate(90)" xlink:href="#a"/><circle fill="#ffd700" r="64.3125" stroke-width="10.625"/></g></svg>
<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 1200 800">
<path d="m0 0h1200v800h-1200z" fill="#ffd700" />
<g stroke="#bf0a30" transform="translate(600 400)">
<path id="us-ri-a" d="m157.344 38.2812h-314.688m348.719-25.5312h-382.75m382.75-25.5h-382.75m348.719-25.5312h-314.688"
stroke-linecap="round" stroke-width="17" />
<use transform="rotate(90)" xlink:href="#us-ri-a" />
<circle fill="#ffd700" r="64.3125" stroke-width="10.625" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 498 B

After

Width:  |  Height:  |  Size: 573 B