DeveloperKey

TalkTalk about LibraryThing

Join LibraryThing to post.

DeveloperKey

This topic is currently marked as "dormant"—the last message is more than 90 days old. You can revive it by posting a reply.

1rocio_canada
Dec 15, 2008, 4:47 pm

Please if anybody was able to display their book cover using LT with the developer key. I am stuck. I uploaded my images, place url in my img tag but nothing comes? Help plz!

2kevinashley
Dec 15, 2008, 5:05 pm

Where are you trying to display your book cover, and what URL are you using ? And what type of 'nothing' comes? (If it looks like a broken image, your browser can probably give you a bit more detail about the error.)

3rocio_canada
Dec 15, 2008, 5:12 pm

hi kevinashley
I am trying to display my book covers on my library website.
this is the url I am using.


I found the steps here: http://www.librarything.com/blog/2008/08/million-free-covers-from-librarything.p...

what else am I missing?

4LolaWalser
Dec 15, 2008, 9:14 pm

It didn't work for me either.

5timspalding
Dec 15, 2008, 10:19 pm

Sorry. There's a basic misunderstanding here. The cover feature we provide is not a portal to *your* covers, but a portal to LibraryThing's covers. As such, it represents a cached, massaged, de-duped set of covers. If five LT members with ISBN X use cover 1, you're going to get cover 1 from the covers API. Whatever you have in your account is not relevant; indeed, it doesn't take the account name.

For reasons of speed, the covers are also cached. We can't take each new cover and perform a search through 35 million books trying to see what ISBNs (or other identifiers) change, and which don't.

So, it's a way to get 1,000,000 free covers from LibraryThing. But it's not a solution for you to upload covers and then serve them to yourself.

6kevinashley
Dec 16, 2008, 3:34 am

3,4>

What Tim said in msg 5. Which is partly why I asked what you meant by 'nothing' happening. If you use the interface correctly, you should see a cover if one is available - it just won't be your own cover. But it's unclear whether or not you are seeing any image at all.

'Doesn't work' could mean:

* I get a funny broken thing instead of an image
* I get an ugly error message instead of an image
* I get an image, but not the right one
* I get a completely blank page
* Sometimes one of the above happens, sometimes not
* My computer spontaneously turns into blancmange

Other possibilities no doubt exist.

Which is happening?

7LolaWalser
Edited: Dec 16, 2008, 9:58 am

Following instructions on the blog I typed out the thing below (substitute string of numbers for LWSKEY), but this doesn't display the cover, or anything. No Xs, errors--nothing.



And, what do you mean, you don't get YOUR cover? What if the cover I submitted is the only one associated with that ISBN? (That was the case here.)

8Pepys
Dec 16, 2008, 11:10 am

If I understand correctly, the DeveloperKey procedure
1. - only gives access to covers of works with IBSN;
2. - even so, you're not sure that it will display *your* particular cover;
3. - doesn't work for LolaWalser.
Is that right?

9Pepys
Dec 16, 2008, 11:16 am

And then, what would happen if I enter a "proprietary" ISBN code for a book which has none (e.g. "PEPYSBOOK1"), then use this code in the SRC string (".../medium/isbn/PEPYSBOOK1")? Could it work?

10rocio_canada
Dec 16, 2008, 12:28 pm

Your noisily advertised 1000 book covers for free, provide a Developer key to upload images. Me and others spent more than a day trying your LT work. and now you say we can't use the images we upload, anyway your LT is not working outside your website. The simple instructions you detailed in your site, simply don't work.

11LolaWalser
Dec 16, 2008, 2:05 pm

#9

Did you try? Getting the key was super-fast. Anyway, it didn't work for #1 either.

Here I try again:

12LolaWalser
Dec 16, 2008, 2:06 pm

See, that's what I meant by "nothing".

13LolaWalser
Dec 16, 2008, 2:09 pm

Different book (i.e. ISBN):

14LolaWalser
Dec 16, 2008, 2:11 pm

hmmmm

What gives? Any rhyme and reason to why some ISBNs may work and others not?

Note--as I said, the previous (non-appearing) example is the cover I submitted, the only such cover associated with the ISBN.

Is there strength in numbers or what?

15LolaWalser
Edited: Dec 16, 2008, 2:19 pm



Ah, it's blurry--it's not the same cover as the one I have on my profile.

well, then...

16Talbin
Dec 16, 2008, 3:59 pm

I am very bummed that LT has decided to treat covers this way. I'm one of those who likes to put them on their profile pages. I have been trying to scan books as I receive them (to help contribute to LT's library of scanned covers), then would use the link to show my own covers on my profile page. Now, we seem to only have a choice of Amazon covers or the LT provided covers, neither of which is usually my cover, and the LT covers are often blurry and non-hi-res. Seriously, this really bums me out. I'm sure there are technical reasons for all of this, but one thing I really liked was to customize my profile page, which is my "face" to the LT world. I know I can keep a list of books there with links, but it's not the same as having my own covers. I'm sad. :(

17kevinashley
Dec 16, 2008, 7:02 pm

11,12,13,14>

OK, that gives us something. The one that shows nothing has actually retrieved an empty image from LT (a 0x0 pixel image) - no, on closer inspection it's received a text/html instead of an image/jpeg response. And if I type the URL directly into my browser, I see an error message: the page you requested cannot be found.

As to why that might be: I'll leave that to LT folk.

18Helcura
Edited: Dec 16, 2008, 7:21 pm

16>

This doesn't actually seem to be a problem on the Profile page. When I tested it, it still worked to use img src= and the address of the specific cover from your library.

I think the problem is using covers outside of LT. Tim made a whole bunch of (but not all) covers available to people to use on other webpages. The OP isn't able to find the desired covers among the ones that were made public.

19SilentInAWay
Dec 16, 2008, 8:51 pm

16> Cheer up, Talbin -- there's still hope...

I display my uploaded covers on my desktop using the method described by Greyhead in this thread.

Appending my own findings to GreyHead's excellent instructions, I suggest the following pratices so that your profile covers display as sharply as possible:

1. Always use a URL to one of LT's pre-resized images of your cover--preferably one of the sizes used when you view your catalog in cover view--rather than having your browser do additional resizing (which will almost inevitably be inferior). So, when you copy the cover URL*, do so from an example where LT has displayed the image at the size you like. In cover view, the files are resized to one of six heights (depending on your zoom level): 90, 120, 142, 165, 190 or 250 pixels (I use 165 on my profile page). Now, the cover displayed on the work/book/edit page is also resized, but based on a fixed width (140 pixels) -- I recommend that you shy away from these so that you don't get blurry images when you display your profile covers all using the same height.

So, while displaying your catalog in Cover view, zoom in and out until you find a size that you'd like to use on your profile. Then, copy the URL for that image file (the URL is different for each size that your cover can be displayed) into the src field of the statement described by GreyHead.

2. With your cover displayed in your catalog at the desired size, note the height* of the displayed image (in pixels) and use this value in the height parameter in the statement described by GreyHead (for example, I use height165px). This step may not be necessary, since the files have been presized to that height--but I do it anyway, just to be sure...

3. Finally, recognize that--every once in a while--LT's cache of pre-resized covers may be cleared out (this happened just the other day), temporarily causing your cover to not display on your profile page. This is because a mere reference to a no-longer-existant file will not cause that file to be regenerated. Remember, it's not your uploaded file that's disappeared (you can still display them in your catalog); only the resized image has been deleted. You can, however, regenerate these files simply by redisplaying them in LT at the desired size (for me, I simply display those books in cover view, zoomed out to where the images are 165 pixels high).

*Note: In IE, you can get both the file's URL and its dimensions by right-clicking on the image and then selecting Properties. In other browsers, there are other ways of retrieving this information.

I hope this helps, please let me know if I can make any edits to make this more clear...

20felius
Dec 17, 2008, 1:28 am

Some interesting problems here.

First, I apologise for causing all of this confusion. I brought up CoverThing as a potential solution for people who wanted a supported method of specifying a persistent URL for cover images. CoverThing is intended for this purpose, but it only supports retrieving a cover for a given ISBN, it only displays covers that have been uploaded to LibraryThing, and it only displays a cover if we have some confidence that it's the correct one for that ISBN.

CoverThing isn't intended as a direct replacement for linking to the covers of books in your catalogue. The problem is that there's currently no supported way of doing this. You can do it (using the excellent advice given by SilentInAWay in #19), but don't come crying to us if it breaks. ;) It will break, in the sense that images you link to in this way will eventually disappear; and while you can follow the advice in #19 to regenerate them, we don't guarantee that it will always be possible to regenerate that image with the same address.

We may come up with a solution to this at some point, but that's how it stands right now.

Ok, onto the problems with CoverThing covers in this thread.

In #3, the URL being used is incorrect.
http://covers.librarything.com/01ce0e4ebac255b09866705683466006/KEY/medium/isbn/...
Should instead be:
http://covers.librarything.com/devkey/01ce0e4ebac255b09866705683466006/medium/is...

Note that the correct URL returns an empty 1x1 image - we don't show a cover for this ISBN. This is probably because we don't have a LibraryThing cover which has been chosen by enough people to go with a book having the specified ISBN.

The reason why the cover didn't show in #11 is actually not a problem with the URL, but with the quotes around the URL. Whatever those quotes are they're not the standard quote character you see on your keyboard. I've seen this happen when people copy and paste something from a word processor, as some word processors have a habit of replacing standard quotes with "pretty" quotes.

Anyway, if you use the right type of quotes around that URL you should get this:


I hope that clears up a couple of things, and sorry for any confusion I've caused!

21Pepys
Edited: Dec 17, 2008, 5:20 am

felius, you needn't apologize—at least to me—for having raised my attention to CoverThing (er—I feel embarassed—but I didn't know about it...) All these contributions clear up a lot of mysteries. Thanks.

But just one last question: if I'm the only owner of a book with a given ISBN, and I use the DeveloperKey procedure to link to a cover picture, will it work straight on?

PS: SilentInAWay, I followed what you say. It's much simpler than what I did before. Thanks.

22Talbin
Dec 17, 2008, 9:56 am

Thanks, folks. SilentInAWay - I also use GreyHead's instructions, but I haven't been using the size suggestions you give. I'll have to try that out.

It's the regeneration that is a bummer to me, and it looks like there is nothing that can be done about it. This may be silly, but I worry about what people see when they go to my profile page, and I don't like the idea that instead of seeing the proper cover, people are either seeing the red X in IE or the little black bar in FF.

But, again, thanks all. I will putz around with things, especially the sizing advice. The support of LT members is really wonderful!

23timspalding
Dec 17, 2008, 6:27 pm

Shit. I posted something last night, and it didn't take.

Check out the Add Books page if you want to do it right? The URLs there are labelled CoverThing_dynamic, and they pick the right URL via a redirect. If people want, I can add a book=xxxx to it. But those URLs are only going to work through and on LibraryThing.

24felius
Dec 17, 2008, 7:06 pm

I think that "book" and "work" links would be an excellent idea.

25infiniteletters
Edited: Dec 17, 2008, 7:12 pm

The caching timeouts make LT covers unusable for Bookmooch. And developerkeys won't work without an ISBN, which are the key covers I'm looking to distinguish. Oh well.

26Talbin
Edited: Dec 17, 2008, 8:23 pm

>23 timspalding: Check out the Add Books page if you want to do it right? The URLs there are labelled CoverThing_dynamic, and they pick the right URL via a redirect. If people want, I can add a book=xxxx to it. But those URLs are only going to work through and on LibraryThing.

Tim - what would the result be if you added "book=xxxx" to it? In other words, how would that affect the cover being shown?

(I was going to say I didn't get it, but now I do. Add a book in the Add Book screen. Right click on the resulting cover, choose Copy Image Location, then paste it where you want it. As Tim says in #23, this will "pick the right URL via a redirect."

Here's what the URL will look like, sans the :



Edited to say - but then I can't get the d&^* cover to display. Argh. What HTML is needed here?

27felius
Dec 17, 2008, 8:50 pm

>25 infiniteletters: And developerkeys won't work without an ISBN, which are the key covers I'm looking to distinguish.

What are you trying to distinguish? Are you trying to distinguish between different covers for books without an ISBN?

ISBNs are the only identifier that CoverThing supports queries for at present, but it's always been intended that we would add more. People do upload covers for books without ISBNs, after all.

An advantage of ISBNs as identifiers for covers is that they shouldn't change (although the particular cover image used might - but that's a digression). The cover associated with a work can change based on whichever is the most popular cover amongst the books included in that work, and the cover associated with an individual book can change whenever the user wants. Dealing with these situations isn't impossible, but it's more involved than dealing with ISBNs.

28infiniteletters
Edited: Dec 18, 2008, 12:01 am

When Amazon doesn't have the right (or any) cover, I try to add it to the condition notes for books I list on Bookmooch. I use ebay, LT, abebooks, etc. to find covers. It's especially useful to identify an edition when there's a ton of different covers, multiple covers for the same ISBN, or the book doesn't have an ISBN.

I don't know when the cache expiration started, but I used to be able to pick cover picture urls and have them display (most of the time). I'm not especially interested in the work cover or the ISBN cover, because I want to pick a specific one. I know staff can't control whether members delete covers, but other than that, there should be a reliable way to link to covers. If I had to add the books to my account, I'd be willing to do that (well, as a collection, but that's another matter).

29SilentInAWay
Edited: Dec 18, 2008, 2:30 pm

>23 timspalding:

Tim, it would be great if we could use "book=xxxx", instead of "isbn=xxxx" in a Coverthing_dynamic URL. I'm assuming that this will create the image on demand (if it isn't already cached).

Two quick questions (for Tim, John or anyone else "in the know"):

1) would "&height=xxxxx" control the size of the image file created by LT (whose resizing algorithms are pretty good) or merely modify its display in the browser (which--at least in my case--does a crappy job at image resizing)?

2) would "&height=xxxxx" be restricted to certain values (e.g., the image sizes currently used within LT), or could the user select anything? I ask because there are obviously arguments for both approaches.

One final comment:

There have been hints (ok, not hints--drawn out discussions) re: the possibility of an automated feature for including covers on one's profile page. Unless an automated feature would allow members to group profile covers into multiple, user-defined categories (Recently Read, Currently Reading, Soon to be Read, All-Time Favorites, etc.), then "power-users" will probably prefer to include covers on their profile page by writing their own HTML (ideally, calling the Coverthing_dynamic URL using a "books=xxxx" parameter, as Tim proposes above). I mention this simply so that an "easy for everybody" solution doesn't usurp an "easy for everything" solution. Thanks.

30timspalding
Dec 18, 2008, 3:17 pm

So, give me some time to do this. But yes, it would work like you say.

31timspalding
Edited: Dec 25, 2008, 9:19 pm

Okay, it's working. Here's how to construct a book-specific URL. It can ONLY be used on the site.

http://www.librarything.com/coverthing_dynamic.php?book=1&width=50

32infiniteletters
Dec 25, 2008, 9:24 pm

Cool! Does it require the registration key too?

33sabreuse
Dec 25, 2008, 9:26 pm

I'm guessing that the book=1 part is replaced with an LT book ID?

34timspalding
Dec 25, 2008, 9:27 pm

>32 infiniteletters:

No, it doesn't. But it will only work on the site.

>33 sabreuse:

Yes, sorry.

35SilentInAWay
Dec 26, 2008, 1:49 pm

very nice -- Thanks, Tim!

...but I can't seem to get the height parameter to work. The width parameter appears to work OK, however.

36timspalding
Dec 26, 2008, 3:34 pm

Actually, only width is programmed. I'll take a look at adding height.

37SilentInAWay
Dec 26, 2008, 5:52 pm

thanks, Tim

38bnielsen
Dec 27, 2008, 6:39 am

#36: "I'll take a look at adding height." You want to be known as Tall Tim rather than Tiny Tim? :-)

39Carnophile
Edited: Dec 27, 2008, 12:35 pm

I cannot get the code in #31 to work (even as amended as per #33). I tried this for my LT Profile page, not off-site.

First I tried Holland's Hidden Order and then chose a more popular book, The Kite Runner, to make sure obscurity wasn't an issue.

The code I'm using for Hidden Order is
http://www.librarything.com/coverthing_dynamic.php?book=36019646
and while it links to a new page with the book's cover, it doesn't actually show it on my Profile page. I.e., it functions just as it does in this post.

40SilentInAWay
Dec 27, 2008, 3:19 pm

39>

The coverthing_dynamic URL is just the "address" of the file on LT. To get this to display on your profile page, you must reference this URL within an HTML img statement (which, quite simply, tells your browser to display an image). Greyhead explains the basic process in this thread here (the only difference is that now, instead of copying the image location, you will insert the appropriate coverthing_dynamic URL into your img statement).

Disclaimer: if you were already doing this and it still didn't work, then consider me clueless and exceedingly sorry for wasting your time...

41Carnophile
Dec 27, 2008, 4:03 pm

Ah-ha, got it! Thanks, Silent!

As a public service to others like me, let me clarify some things from GreyHead's post, because I had to fiddle a bit to get what he was talking about:

First, in Internet Explorer go to the LT page of the book you want, right-click on the image, and select Properties. The window that pops up has a string that refers to the image. Copy that.

Second, in GreyHead's first example, there are quotes around the address that refers to the pic. DON'T include quotes when you actually do your own example.

Third, watch the spaces around the / and > in your string. Those are there deliberately.

42infiniteletters
Edited: Dec 27, 2008, 10:55 pm

41: Right-clicking to give you the address (of a LT book) will give you an image that will expire. If you use this format (without spaces)



the image won't expire. For that type of address, all you need is the book number for your book.

You can vary the width of the book by changing the number after width. Tim's going to enable height-changing at some point; right now, the height will scale with the width.

43Carnophile
Edited: Dec 28, 2008, 4:29 pm

Hmmm, but using the work numbner for Radicals for Capitalism pulls up an image of a book about knitting or something:

44AndrewB
Edited: Dec 28, 2008, 4:44 pm

43> You need to use the book number, not a work number. The book number is essentially the ID number of your copy of that work. When you click on a title (or hover and look in the status bar for the URL) in your library, the URL will end in "/book/123456" - that is the book number.

For example, this is the first book I see in your library, book 39107443:

45Carnophile
Dec 28, 2008, 4:51 pm

Thank you Andrew; that was the problem. I didn't realize until I read your explanation that using the Search tool would only take me to the general work, while grabbing it from my library would nail down a specific book.

46SilentInAWay
Edited: Feb 16, 2009, 3:53 pm

36> Actually, only width is programmed. I'll take a look at adding height (timspalding)

bump : perhaps after collections?

47mithunta
Mar 10, 2010, 8:48 pm

Hello Guys, I am new to Library thing, I wanted to use the Images from Librarything database.
.
I want to know what is the DeveloperKey i should specify here. Please any help on this is appreciated.

48jjmcgaffey
Mar 11, 2010, 4:24 am

In Message 3 in this topic, there's a link to a blog post about the Images database, which includes a link to the page that will give you your key (it's in the paragraph that starts with "The Catch?". It's just a matter of clicking the link, you get it automatically for being an LT member.

49mithunta
Mar 11, 2010, 11:27 am

Thank you so much jjmcgaffey, I am able get the image to display now.
My question now is how will i get the Other information to display like Title AUthor, Year of publication.. Any suggestion for this. I am building a application which involves displaying book information with images. I will have ISBN number as the input.

50conceptDawg
Mar 11, 2010, 5:36 pm

Check out all of our APIs on the services page:
http://www.librarything.com/services

51mithunta
Mar 13, 2010, 7:50 pm

This is what i was looking. Thanks conceptDawg.

52carport
Edited: Mar 15, 2010, 4:16 pm

Is Goodreads using this interface?

I just noticed that they are using a cover for a book that I'm the only owner of on LT or on GR. It's a cover that I created using Photoshop (looks very close, but isn't identical, to the original) because the book is too large for my scanner. They are definitely using the "simulated" cover that I uploaded to LT.

http://www.librarything.com/work/7818143/book/27808001

http://www.goodreads.com/book/show/6517612-san-francisco

53brightcopy
Mar 15, 2010, 5:59 pm

52> It's also possible someone swiped it from the book here on LT and uploaded it to GR, much as people swipe covers from other places and upload them to LT.

That is, assuming you can upload a cover to GR. I haven't actually used it enough to know.

54timspalding
Mar 15, 2010, 6:40 pm

When do you think you scanned it? They may have got it from OpenLibrary.

We could ask that woman—the only owner.

55carport
Edited: Mar 15, 2010, 7:05 pm

The last date modified on my book cover art is 7 Feb 2009. So, I created (didn't scan) the cover art on or before that date. I didn't upload the cover to OpenLibrary, and did check there to see if they had it (no).

ETA: "that woman" ?

Edited again to add: I did upload the books to GoodReads using an LT export whenever I joined. But covers don't export, AFAIK.