Ol' Shirley's Buckets

Apparently there's a craze now for translucent buckets with LED lights inside them with cutesy sayings on them. Ol' Shirley, with her vinyl printer, is jumping on this. She has a metric fuckton of designs she has purchased, but only so many buckets. I popped open a zencart site for her, and was able to use imagemagick to make it look like she has a ton of inventory:

if (-e '/tmp/bucketrunning') {
die "Already running.";
system("touch /tmp/bucketrunning");
my $filesList = `find /public/tobucket -maxdepth 1 -type f`;
my @filesToProc = split(/\n/, $filesList);
while(my $file = shift(@filesToProc)) {
my @filePath = split(/\//, $file);
my $fileName = pop(@filePath);
my @fileParts = split(/\./, $fileName);
my $fileBase = shift(@fileParts);
print "Processing $fileBase.\n";
system("convert \"$file\" -trim -scale 972x1052! -fuzz 10\% -transparent white /tmp/1.png");
my $newFileName = '/public/tobucket/done/' . $fileBase . '.png';
system("composite -gravity center -geometry +50-0 /tmp/1.png /public/butketblank.png \"$newFileName\"");

She dumps the images in the folder on our public drive, imagemagick works, well... magick, and there ya go. It's not like she is fooling anybody, she can rip one of these designs out in a matter of minutes.