On 9/27/10 1:44 PM, Jonathan Rochkind wrote:
> I think I asked this question like two years ago, and the answer was
> "No, not yet, but we'd like that."  So I'm pinging again.
>
> Some Internet Archive/OL full text exists in a 'page turner' interface
> that also has 'search inside' functionality. For instance:
> http://www.archive.org/stream/thesetwain00bennrich#page/n5/mode/2up
>
> Using IA/OL APIs, I am already identifying internet archive ID's of
> interest, like say "thesetwain00bennrich".  Using that identifier, is
> there any way using IA/OL APIs for me to:
>
> 1) Discover if a book is available in that page-turner format (not
> everything is).
Unfortunately the logic to determine if a book can be displayed is a 
little complicated and we don't have a proper API that exposes the result.

In the meantime this is a little cheesy but you could fetch 
http://www.archive.org/stream/{itemid} and look for the string 
"BookReader.js" in the returned HTML.  That should indicate that the 
BookReader is being served.

That should work for all the books which we've scanned.  For user 
uploaded text items it's a little more complicated since there is 
usually an additional 'sub-prefix' that is also required.  Right now 
there isn't a great way to find out the sub-prefix... we make that 
determination by looking at the item files.xml for the files that the 
BookReader needs (sorry).

2) Deep link into search results for a particular query in a particular
> book.
This already works by appending "search/{terms}" after the # in the 
BookReader URL.

e.g.
http://www.archive.org/stream/nimrodofseaorame00davirich#page/18/mode/2up/search/albatross

This is documented here:
http://openlibrary.org/dev/docs/bookurls#searching

We're working on using an improved full-text search engine instead of 
the current rudimentary search.  This should only give better results 
and shouldn't affect the deep-linked search URLs!

   - mang
> If #1 can be taken care of, but #2 can't be because of limitations in
> the javascript reader, then I might try to find time to submit a patch
> to the javascript reader to make that possible, although I'm not sure
> when I'd find the time to do so.
>
> Jonathan
> _______________________________________________
> Ol-tech mailing list
> [email protected]
> http://mail.archive.org/cgi-bin/mailman/listinfo/ol-tech
> To unsubscribe from this mailing list, send email to 
> [email protected]

_______________________________________________
Ol-tech mailing list
[email protected]
http://mail.archive.org/cgi-bin/mailman/listinfo/ol-tech
To unsubscribe from this mailing list, send email to 
[email protected]

Reply via email to