自动化书籍引用搜索 [英] Automating book citation search

查看:177
本文介绍了自动化书籍引用搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一份书目清单,按照其标题在文本文件中列出。我想编写一个脚本,可以使用Google学者或亚马逊这样的Web服务来搜索这些书籍,并为每本书返回一个带有引用信息的xml或bibtex文件。
我可以使用哪种编程工具进行这种自动搜索? 解决方案

Python是我的建议。 p>


  • 从文本文件获取名字,读取简单文件 google的书 API



    http://books.google.com/books/feeds/volumes?q=Elizabeth+Bennet&start-index=21&max-results=10


  • 简单的python代码从这个URL获取数据(可能需要一个API密钥,建议使用urllib2进行错误处理而不是urllib)



  • 示例代码,

     导入urllib 
    url ='http:/ /foo.api.request'
    data = urllib.urlopen(url).read()




    • 查看此API的返回模式(不管您喜欢如何使用XML)。



    • $ b

      HTH

      $ b在两种格式之间转换请参阅BibTeXML。 $ b

      I have a list of books listed by their titles in a text file. I want to write a script which can use a web service like Google scholar or amazon to search for the books and return me a xml or bibtex file with citation info for each book. Which programming tools can I use for this kind of automated search ?

      解决方案

      Python would be my recommendation.

      Sample code,

       import urllib
       url = 'http://foo.api.request'
       data = urllib.urlopen(url).read()
      

      • See the return schemas for this API (you can use the XML however you like).
      • See BibTeXML for conversion between the two formats.

      HTH

      这篇关于自动化书籍引用搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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