如何从书的条形码编号查找有关书的数据? [英] How can I lookup data about a book from its barcode number?

查看:97
本文介绍了如何从书的条形码编号查找有关书的数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建世界上最简单的图书馆应用程序.我想要做的就是使用典型的扫描仪(它只是将条形码的数字输入到一个字段中)扫描一本书的 UPC(条形码),然后用它来查找有关这本书的数据......最低要求、书名、作者、出版年份以及杜威十进制或美国国会图书馆目录号.

I'm building the world's simplest library application. All I want to be able to do is scan in a book's UPC (barcode) using a typical scanner (which just types the numbers of the barcode into a field) and then use it to look up data about the book... at a minimum, title, author, year published, and either the Dewey Decimal or Library of Congress catalog number.

我们的目标是打印一个带有卡片目录号的小贴纸(书脊标签"),我可以贴在书脊上,然后我可以在我们的书架上按卡片目录号对书籍进行分类公司图书馆.这样,关于相似主题的书往往会彼此靠近,例如,如果您知道自己正在寻找一本关于会计的书,那么您所要做的就是找到一些关于会计的书,然后您会看到另外六本我们就在它旁边,方便浏览图书馆.

The goal is to print out a tiny sticker ("spine label") with the card catalog number that I can stick on the spine of the book, and then I can sort the books by card catalog number on the shelves in our company library. That way books on similar subjects will tend to be near each other, for example, if you know you're looking for a book about accounting, all you have to do is find SOME book about accounting and you'll see the other half dozen that we have right next to it which makes it convenient to browse the library.

似乎有很多网络 API 可以做到这一点,包括亚马逊和国会图书馆.但这些都让我非常困惑.我真正想要的是一个更高级别的函数,它采用 UPC 条形码编号并返回有关该书的一些基本数据.

There seem to be lots of web APIs to do this, including Amazon and the Library of Congress. But those are all extremely confusing to me. What I really just want is a single higher level function that takes a UPC barcode number and returns some basic data about the book.

推荐答案

ISBNDB.com 上有一个非常简单的基于 Web 的解决方案,您可能想看看.

There's a very straightforward web based solution over at ISBNDB.com that you may want to look at.

更新了 API 文档链接,现在还有版本 2 可用

Updated API documentation link, now there's version 2 available as well

此处链接到价格和等级

您只需几分钟即可启动并运行(这些示例来自 API v1):

You can be up and running in just a few minutes (these examples are from API v1):

  • 在网站上注册并获得使用 API 的密钥

  • register on the site and get a key to use the API

尝试使用如下网址:

http://isbndb.com/api/books.xml?access_key={yourkey}&index1=isbn&results=details&value1=9780143038092

results=details 获取更多详细信息,包括卡片目录号.

The results=details gets additional details including the card catalog number.

顺便说一句,通常条形码是 isbn10 或 isbn13 中的 isbn.如果您使用扫描仪并选择了 18 个号码,则只需删除最后 5 个号码即可.

As an aside, generally the barcode is the isbn in either isbn10 or isbn13. You just have to delete the last 5 numbers if you are using a scanner and you pick up 18 numbers.

这是一个示例响应:

<ISBNdb server_time="2008-09-21T00:08:57Z">
  <BookList total_results="1" page_size="10" page_number="1" shown_results="1">
    <BookData book_id="the_joy_luck_club_a12" isbn="0143038095">
      <Title>The Joy Luck Club</Title>
      <TitleLong/>
      <AuthorsText>Amy Tan, </AuthorsText>
      <PublisherText publisher_id="penguin_non_classics">Penguin (Non-Classics)</PublisherText>
      <Details dewey_decimal="813.54" physical_description_text="288 pages" language="" edition_info="Paperback; 2006-09-21" dewey_decimal_normalized="813.54" lcc_number="" change_time="2006-12-11T06:26:55Z" price_time="2008-09-20T23:51:33Z"/>
    </BookData>
  </BookList>
</ISBNdb>

这篇关于如何从书的条形码编号查找有关书的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆