Minor User Attributes GS bug: eBay Catalog inserts overlong text

This may only be applicable to (modern) books, or possibly other media types as well.

For items in eBay’s catalogue, I have recently been willing to trust their User Attributes data, and it is 100% excellent how GarageSale auto-populates those fields for me when I look something up.

However, at least two fields in the catalogue often contain text that is too long to be permitted in a listing: Reviews and Table of Contents.

Strangely enough, these are not even fields in the standard GarageSale Books dropdown! Which is odd. But I’m assuming they come in from publishers who have provided data sources that have since been compiled on eBay.

Anyway, the problem can be seen with one of the listings I just encountered, the book with ISBN/barcode 9780307986795, Paradox: The Nine Greatest Enigmas in Physics by Jim Al-Khalili.

That has both a “Reviews” and “Table of Contents” field set when I choose “Include additional information” in the GarageSale lookup window.

I think a possibly simple fix might be to check the length of text fields assigned, regardless of whether they’re user-defined keys (as these must be, I suppose) or defaults for a category.

I hit this problem daily, even with the book title. They made a great script that I run every time I scan a barcode, that trims the fields to fit the max size. This is that script:

// This script cuts off attribute values longer than the allowed 65 character limit 
function run() {
	var arr = [];
	for (const listing of selectedListings) {
		for (const key in listing.attributes) {
			const attrbts = listing.attributes;
			if (String(attrbts[key]).length > 65) {
				attrbts[key] = String(attrbts[key]).substr(0,65);
				listing.attributes = attrbts;
				consoleLog("Attribute '" + key + "' had more than 65 characters! (Listing: " + listing.title + "; item ID: " + listing.itemID + ")" );
   			}
   		}
	}
}

You can use the script mentioned by @vjl or you just click on the yellow character count below the “Table of Content” field in Preview mode to cut it.

cut

2 Likes

Whoa! Is that a new feature? That is handier than always having the script editor window open [which I currently do], as I run into those long fields dozens of times a day. Thanks, Kristian!

I hadn’t realised the full extent of this feature so I’ve just tried it out using Vaguery’s example. I get a lot of attribute field and the title filled in but I don’t see a ToC or reviews field anywhere. Any ideas?

-R

Not all books have reviews. 9780312985363 is an example of a book that does have a review, though that review is incomplete and doesn’t trigger the 65+ character limit.

Thank you. But I don’t see review field anywhere for this title (Plum Lovin) either.

Interesting - when I posted that, I had just scanned it into GS and it showed a partial review. Now I tried again, and it doesn’t! But it is in my Deleted Listings, so here’s a screenshot [the book itself is being lotted up / bundled up as I would not make enough money selling it by itself]

You can see the difference a few minutes makes - I wonder why this is? it went from 21 specifics to 14 with the same ISBN.

1 Like

I confess I usually use the title to search, because the catalog often is not quite the same edition and version I have in my hand. I’m not sure if the catalog number/ISBN is exactly the same.

I worked in a library for 8 years in the Tech Services department- cataloging and processing new books [best job ever :slight_smile: ]. I’d love to say that ISBN is the best way to get the exact edition/copy you have in your hand, but even today, it remains a hit or miss. Some ISBNs stay the same regardless of revisions in editions/printing/etc. As long as the publisher stays the same [first part of a 10-digit ISBN; characters 4-5 or up to 4-9 in ISBN-13], then often the ISBN will stay the same.

But there are many, many exceptions to this rule, unfortunately.

For me, I have a barcode scanner hooked up to my Mac, so it is easy, with modern books, to just scan the barcode into GS. But I always double check the specifics that GS finds when it’s just one match as the edition might be off a bit.

For older books, without an ISBN, then it’s title search for me, but I only do it this way out of efficiency - for what I sell, I tend to get more hits with the barcode than I do misses.

But it really would be nice to have a 100% hit ratio with ISBN scans! :slight_smile:

1 Like

Personally I do not rely on any of eBay’s catalog for any books or any other items.

I also do not use any item specifics. Any required item specifics are already filled with “N/A” or something similar within a book listing template I use.

Most of the books I sell are antique and vintage or were privately printed so they do not have bar codes.

I don’t want to spend any time proof reading another person’s work or relying on it.

I find it much less time consuming to type the title, author, publisher, copyright, number of pages, edition into the description and copy and paste into the title.

I inspect all books from cover to cover and photograph books prior to creating a listing so the information typed into the description can simply be taken from the photos. When the books are inspected I also made some shorthand notes regarding condition issues which are entered into the description. This allows me to process books in batches, with the process divided into different steps.

If you’ve already type the title of the book into a listing within GS you can use this AppleScript saved as app to search eBay for the title. Change the browser as needed. Change the GarageSale reference as needed depending on what GS version you wish to target or simply “GarageSale” if you only have one version installed.

tell application "GarageSale 9.8.1"
	repeat with theListing in (get selected ebay listings)
		set theTitle to get the title of theListing
		set t to my replaceText(" ", "+", theTitle)
	end repeat
end tell

tell application "Safari"
	tell window 1
		set current tab to (make new tab with properties {URL:"https://www.ebay.com/sch/i.html?_nkw=" & t})
	end tell
end tell

on replaceText(find, replace, textString)
	set prevTIDs to AppleScript's text item delimiters
	set AppleScript's text item delimiters to find
	set textString to text items of textString
	set AppleScript's text item delimiters to replace
	set textString to "" & textString
	set AppleScript's text item delimiters to prevTIDs
	return textString
end replaceText

If you copy a portion of the title to your clip you can use this Applescript saved as app to search eBay.

set c to the clipboard

set t to my replaceText(" ", "+", c)

tell application "Safari"
	tell window 1
		set current tab to (make new tab with properties {URL:"https://www.ebay.com/sch/i.html?_nkw=" & t})
	end tell
end tell

on replaceText(find, replace, textString)
	set prevTIDs to AppleScript's text item delimiters
	set AppleScript's text item delimiters to find
	set textString to text items of textString
	set AppleScript's text item delimiters to replace
	set textString to "" & textString
	set AppleScript's text item delimiters to prevTIDs
	return textString
end replaceText

This AppleScript is a combination of the two. It will look at all the text copied on your clipboard and if its in the title of selected listing it will search eBay with the text on the clipboard. If the text is not within the title it does the search with the title.

set c to the clipboard

tell application "GarageSale 9.8.1"
	repeat with theListing in (get selected ebay listings)
		set theTitle to get the title of theListing
	end repeat
end tell

if theTitle contains c is true then
	set t to my replaceText(" ", "+", c)
else
	set t to my replaceText(" ", "+", theTitle)
end if

tell application "Safari"
	tell window 1
		set current tab to (make new tab with properties {URL:"https://www.ebay.com/sch/i.html?_nkw=" & t})
	end tell
end tell

on replaceText(find, replace, textString)
	set prevTIDs to AppleScript's text item delimiters
	set AppleScript's text item delimiters to find
	set textString to text items of textString
	set AppleScript's text item delimiters to replace
	set textString to "" & textString
	set AppleScript's text item delimiters to prevTIDs
	return textString
end replaceText

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