0

The python package 'isbntools' (https://github.com/xlcnd/isbntools) allows to retrieve bibliography information about books from online resources. In particular the script isbn_meta [number] retrieves information about the book with given isbn-number [number]. Among other it uses data from google using googleapis as https://www.googleapis.com/books/v1/volumes?q=isbn+[number]&fields=. It is obvious that the url can be adjusted to search e.g. for a general [keyword] https://www.googleapis.com/books/v1/volumes?q=[keyword]. But how can I reuse the code in 'isbntools' to create a script, say title_meta which searches and retrieves bibliography data based on [keyword]. My problem is to some extent that it is not obvious for me how to deal consistently with the python package.

highsciguy
  • 2,569
  • 3
  • 34
  • 59
  • I am not sure I understand your question. Can't you inherit the class in your custom one and reuse that? – bosnjak Apr 09 '14 at 11:24
  • Probably, but how? It's possibly obvious for a python programmer. The question was raised here: http://stackoverflow.com/questions/17001907/automatically-retrieve-google-books-bibtex-citation-matching-isbn/22881516?noredirect=1#comment35021850_22881516 in the comments to the answer. – highsciguy Apr 09 '14 at 11:27

2 Answers2

0

Note: This is just an example, not meant to be used as is.

You can override the variable that contains the URL in this way, when you want:

import goob

goob.SERVICE_URL = 'my_new_googleapis_url'

myquery = goob.query(myKeyword)

Notice that you will need an %s in the SERVICE_URL variable on the place you want to put your keyword.

bosnjak
  • 8,424
  • 2
  • 21
  • 47
0

In version 3.0.1 exists a new script isbn_goom which uses goom.py that does exactly what you want.

AlexAtStack
  • 366
  • 2
  • 7