expose BookReader metadata as JSON

Bug #606506 reported by mangtronix
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Internet Archive BookReader
Confirmed
Medium
mangtronix

Bug Description

Expose the generated metadata for IA books as JSON so that 3rd-parties can implement their own book readers using IA-hosted books.

Revision history for this message
mangtronix (mang) wrote :

For example this should provide enough information to find the image stack for the book and know what format the images are in. It could also provide the leaf number -> page index mapping.

Changed in bookreader:
assignee: nobody → mangtronix (mang)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Hank Bromley (hank-archive) wrote :

All of that except the leaf number => page index mapping is available now, in JSON, via URLs like:

http://www.archive.org/details/{itemID}&output=json

for instance,

http://www.archive.org/details/amisamile00kelmuoft&output=json

The returned JSON provides the location (server and directory path) of the image stack, the entire contents of meta.xml, files.xml, and reviews.xml, and a few bits of other information. It does not include the page mapping, as that would require fetching and parsing the scandata.xml, which is generally much larger than those other XML files, but I don't think it would be difficult to include the scandata on request (perhaps &output=json&scandata=1 ?).

The existing API does, by the way, also support a callback parameter:

http://www.archive.org/details/amisamile00kelmuoft&output=json&callback=my_func

Other related info:

Essentially the same information is also available in XML form via a find_file.php request:

http://www.archive.org/services/find_file.php?file=amisamile00kelmuoft

And if all one needs is the item location info (server and directory path), add "&loconly=1" to the request:

http://www.archive.org/services/find_file.php?file=amisamile00kelmuoft&loconly=1

Given the server, the scandata is available through the getScandata.php script:

http://ia341012.us.archive.org/getScandata.php?identifier=amisamile00kelmuoft

(The advantage of this route is that getScandata.php understands that scandata sometimes lives inside a zip file, and knows how to extract just the scandata portion from the zip.)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.