Garage Sale picture idea

I have a cool idea, instead of individually dragging and dropping pictures, if you highlight a group of pics they get uploaded into your blank templates however you choose.

example you have 100 pictures for 100 templates (1 for each)… just drag the folder of pics or highlight pics into your group of templates and they are placed individually into folders. 100 pics could go automatically into 100 blank templates… maybe you have 200 pics for 100 templates and you want 2 to go into each, you could select you want 2 for each template. 300 pics for 100 auctions… select you want 3 each template.

this would save a ton of time instead of dragging and dropping each pic. you could use this fuction, upload pics first and build your listings from there. right now i do titles first then drag and drop pics… this way i could upload all the pics with 1 shot and add titles after. would save a lot of time

i guess this would not work if you have a folder where some listings have 1 pic and some have 3 but if you had a folder of templates where each template requires the same number of pics this is a great idea.

would basically add pics in the order they are in your photo library into your templates.

2 Likes

That would force me to empty Ilja’s wish list :grinning: and would bring GS closer to perfection.

1 Like

How would GS determine which picture went with which template? Ebay also doesn’t allow duplicate titles so you would have to make 100 titles up first each one different and then GS would have to correctly place a photo to each of the 100 titles. Personally no 2 of my listings have the same number of photos. Some have 4, some with 10, and some 15 or more depending on the item.

It depends on what you sell. Books, postcards, photos, … always have the same number of photos. What @miamiwax was saying, if I correctly understood, is GS automatically generating a bunch of new listings with empty title and automatically adding one/two/three photos in each new listings from a folder, in the same order as photos included in that folder. That would be genial, because this is exactly what I manually do, loosing a huge part of employees’ time (and money). Anyway you have to fill title one by one, at least GS won’t develop any AI solution! Each item is different that any other.

yes i was saying that if you don’t have a consistent amount of photos per template then it would not work but if you always have a set number this would be ideal.

would drag highligted pics (or folder of pics) into a group of templates that have no pics. in the order the pics are arranged in photo folder, gs would enter the pics into the templates, top to bottom the same way skus are generated

if you have 1 pic per ebay listing you should also have 1 pic in your photo folder per for each listing. so with 1 click you can now have all the pics uploaded into your templates and then you can work on doing the titles and adding any details from there… instead of dragging and dropping each pic to each template.

imagine some of the guys selling thousands of baseball cards or comic. this would be a huge time saver.

Hi,

I think this should be possible already via Automator and/or Apple Script. Can you send me a fraction (about 20 folders/images are enough) of such a folder structure (maybe of-list in a private message)? I will try to come up with a solution via the mentioned tools above.

Thanks,
Paul

Or dozen of thousands postcard and photographs! @Paul , my folder structure is very easy. A unique scanner folder containing all images named like image00001, image00002, image00003, … Let me know if you need anything else. I am not expert at all of Automator and/or Apple Script, but I will do anything to come up with such a feature!!

I looked at this, thinking it would be easy to do with a couple of AppleScript files. It turned, we needed to patch GarageSale to cope with tightened macOS sandbox restrictions.

So, once you have downloaded GS 9.8 Beta 6 (GarageSale 9.8 Alpha 6 Released), you can give this AppleScript a go.

It lets you pick a folder, and every JPEG image at the top level of this folder will get turned into a listing in GarageSale with that image.
Every subfolder in the folder you picked will get turned into a listing, too, having all images it contains added.

Confusingly, GarageSale might ask you to pick that folder once again, that work around sandbox reading restrictions.

Paste this into Script Editor:

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

tell application "Finder"
	set theFolder to (choose folder)
	set theFiles to (name of every file in theFolder)
	try
		set theFolders to (name of every folder in theFolder)
	on error
		display alert "No folders were found in the selected folder"
		error number -128
	end try
end tell

set theFolderPath to theFolder as string

repeat with theFile in theFiles
	if the theFile ends with ".jpeg" or theFile ends with ".jpg" then
		set fileAlias to (theFolderPath & theFile) as alias
		createListing(theFile as string, {fileAlias})
	end if
end repeat

repeat with aFolder in theFolders
	set folderAlias to (theFolderPath & aFolder) as alias
	set imageFileAliases to {}
	tell application "Finder"
		set imageFiles to (name of every file in folderAlias)
		repeat with imageFileName in imageFiles
			set imageAlias to ((folderAlias as string) & imageFileName) as alias
			set imageFileAliases to imageFileAliases & imageAlias
		end repeat
	end tell
	createListing(aFolder as string, imageFileAliases)
end repeat


on createListing(listingName, images)
	tell application "GarageSale"
		set theListing to make ebay listing
		tell theListing
			set title to listingName
			repeat with theImageFile in images
				if (the theImageFile as string) ends with ".jpeg" or (the theImageFile as string) ends with ".jpg" then
					set imagePath to POSIX path of theImageFile
					set theImage to make listing image file imagePath
				end if
			end repeat
		end tell
	end tell
end createListing

Let me know how it works for you.

1 Like

Hi Ilja,
I just tried it here and yes, it worked! This is a very nice step. Now, let me explain you some situations that I usually meet:

  • let’s say I have 10 photos into the same folder and I want GS to add 2 photos into each listing. So GS should create 5 listings instead of 10 with photos 1+2, 3+4, 5+6 and so on. How is that possibile? Creating sub folder with thousands photos will waste the time I saved with this new feature.

  • second situation, I need GS to pick the first image from one folder and second and third images to another folder. So each listing contains 3 images, Image A from folder 1 and images B and C (subsequently) from folder 2. Is this something possible?

  • Then, I noticed that GS uses image’s title as listing’s title. This sounds to be something to invest on… is it somehow possible to use image’s title as SKU instead of title?

  • Last, I noticed that GS creates new listings with a design automatically applied. I need to create new listings without any design. How can I disable it into the apple script? And without the “lorem ipsum” text? If I bulk select new listings and mark “do not use design”, the “lorem ipsum” text stays there!

Sorry but I am not able to work on apple script. But I would be happy to hire someone to do it for me :innocent:

On your last two bullet points:

You can achieve this by adding this to the last code block:

set use design to false
set description to "My Description"
set use sku to true
set sku to listingName

(The SKU will contain the suffix of the image. This is a bit ugly.)

Bildschirmfoto 2024-05-16 um 09.44.55

1 Like

Hi @kristian, thank you as always for your help!
I gave it a try. Concerning the template matter, it partially worked (still keep image setting differently). Anyway I found a quicker and easier workaround. I keep a “master” template, then I simply copy and past components in bulk to new listings. In a second it is done.
Concerning the SKU matter, it is a good solution but I agree that the .jpeg at the end is a bit ugly and it might give me some troubles. To avoid it, I think I will keep on automatically generating SKUs, that’s not a waste of time. But most of all, now I really need to find a way to let apple script add two consecutive images into the same new listings. This would change my woking life! Have you got any idea about it?

I tweaked the AppleScript, so it now adds a pair of two images to each listing:

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

tell application "Finder"
	set theFolder to (choose folder)
	set theFiles to (name of every file in theFolder)
	try
		set theFolders to (name of every folder in theFolder)
	on error
		display alert "No folders were found in the selected folder"
		error number -128
	end try
end tell

set theFolderPath to theFolder as string

repeat while the (count of theFiles) is not 0
	set listingName to the first item of theFiles
	set imagesForThisListing to {}
	set {theFiles, imagesForThisListing} to addFirstImageFromFilesToList(theFiles, imagesForThisListing, theFolderPath)
	set {theFiles, imagesForThisListing} to addFirstImageFromFilesToList(theFiles, imagesForThisListing, theFolderPath)
	if the (count of imagesForThisListing) is not 0 then
		createListing(listingName, imagesForThisListing)
	end if
end repeat

repeat with aFolder in theFolders
	set folderAlias to (theFolderPath & aFolder) as alias
	set imageFileAliases to {}
	tell application "Finder"
		set imageFiles to (name of every file in folderAlias)
		repeat with imageFileName in imageFiles
			set imageAlias to ((folderAlias as string) & imageFileName) as alias
			set imageFileAliases to imageFileAliases & imageAlias
		end repeat
	end tell
	createListing(aFolder as string, imageFileAliases)
end repeat

on createListing(listingName, images)
	tell application "GarageSale"
		set theListing to make ebay listing
		tell theListing
			set title to listingName
			repeat with theImageFile in images
				if (the theImageFile as string) ends with ".jpeg" or (the theImageFile as string) ends with ".jpg" then
					set imagePath to POSIX path of theImageFile
					set theImage to make listing image file imagePath
				end if
			end repeat
		end tell
	end tell
end createListing

on addFirstImageFromFilesToList(inFiles, outImages, inFolderPath)
	if the (count of inFiles) is 0 then
		return {inFiles, outImages}
	end if
	set theFile to first item of inFiles
	if the theFile ends with ".jpeg" or theFile ends with ".jpg" then
		set fileAlias to (inFolderPath & theFile) as alias
		set outImages to outImages & fileAlias
	end if
	if (count of inFiles) is 1 then
		set inFiles to {}
	else
		set inFiles to items 2 thru -1 of inFiles
	end if
	return {inFiles, outImages}
end addFirstImageFromFilesToList

2 Likes

Super @ilja ! I will try it asap. Just to know, is there anything to change in that code to let GS add 3, 4 or 5 photos? Is there just a single word or code to change or is it more complicated to do?

I tweaked the script once again. Look for repeat 2 times and change it to the number of images you want for each listing.

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

tell application "Finder"
	set theFolder to (choose folder)
	set theFiles to (name of every file in theFolder)
	try
		set theFolders to (name of every folder in theFolder)
	on error
		display alert "No folders were found in the selected folder"
		error number -128
	end try
end tell

set theFolderPath to theFolder as string

repeat while the (count of theFiles) is not 0
	set listingName to the first item of theFiles
	set imagesForThisListing to {}
	repeat 2 times
		set {theFiles, imagesForThisListing} to addFirstImageFromFilesToList(theFiles, imagesForThisListing, theFolderPath)
	end repeat
	if the (count of imagesForThisListing) is not 0 then
		createListing(listingName, imagesForThisListing)
	end if
end repeat

repeat with aFolder in theFolders
	set folderAlias to (theFolderPath & aFolder) as alias
	set imageFileAliases to {}
	tell application "Finder"
		set imageFiles to (name of every file in folderAlias)
		repeat with imageFileName in imageFiles
			set imageAlias to ((folderAlias as string) & imageFileName) as alias
			set imageFileAliases to imageFileAliases & imageAlias
		end repeat
	end tell
	createListing(aFolder as string, imageFileAliases)
end repeat

on createListing(listingName, images)
	tell application "GarageSale"
		set theListing to make ebay listing
		tell theListing
			set title to listingName
			repeat with theImageFile in images
				if (the theImageFile as string) ends with ".jpeg" or (the theImageFile as string) ends with ".jpg" then
					set imagePath to POSIX path of theImageFile
					set theImage to make listing image file imagePath
				end if
			end repeat
		end tell
	end tell
end createListing

on addFirstImageFromFilesToList(inFiles, outImages, inFolderPath)
	if the (count of inFiles) is 0 then
		return {inFiles, outImages}
	end if
	set theFile to first item of inFiles
	if the theFile ends with ".jpeg" or theFile ends with ".jpg" then
		set fileAlias to (inFolderPath & theFile) as alias
		set outImages to outImages & fileAlias
	end if
	if (count of inFiles) is 1 then
		set inFiles to {}
	else
		set inFiles to items 2 thru -1 of inFiles
	end if
	return {inFiles, outImages}
end addFirstImageFromFilesToList

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.