insomnia-lab/libreant

Add a book with ISBN

Opened this issue · 4 comments

Our future userbase asks us to implement a simpler interface for ISBN-books (I don't know if ISBN is for something else than books).

Apart from the html+js thing, we should also think on this aspects:

  • shall every book created this way get its own "preset"?
  • shall we consider mapping ISBN-retrieved fields to other fields? (I don't think so)
  • shall we "propose" (that is, ship in a examples/ directory) a preset that is "compatible" with isbn retrieval?

thanks; I think that fetching data is the easy part. My real doubts are about the data structure. Have you tried running it? here is an example

% isbn_meta '1783559284'         
Type:      BOOK
Title:     HTML5 Data And Services Cookbook: Over One Hundred Website Building Recipes Utilizing All The Modern HTML5 Features And Techniques!
Author:    Gorgi Kosev
Author:    Mite Mitreski
ISBN:      9781783559282
Year:      2013
Publisher: Packt

or you can get a json representation, like

{"type": "book",
     "title": "HTML5 Data And Services Cookbook: Over One Hundred Website Building Recipes Utilizing All The Modern HTML5 Features And Techniques!",
    "author": [{"name": "Gorgi Kosev"}, {"name": "Mite Mitreski"}],
      "year": "2013",
"identifier": [{"type": "ISBN", "id": "9781783559282"}],
 "publisher": "Packt"}

As you can see, the output is quite good, but for example in the json representation, author is not a list of strings, but a list of objects with a name attribute.

The first representation is plain String: String so at least the types match. Still, the field names might be different from the one in the preset the user has created.

What shall we do?

https://github.com/xlcnd/isbntools

Actually https://github.com/xlcnd/isbnlib is better for the purpose, it's the library used by isbntools.

As you can see, the output is quite good

Regarding the output quality, this is relevant: https://github.com/xlcnd/isbnlib#merge-metadata.

Still, the field names might be different from the one in the preset the user has created.

This can be solved in many ways, cant say which is the best right now.

https://github.com/xlcnd/isbntools

Actually https://github.com/xlcnd/isbnlib is better for the purpose, it's the library used by isbntools.

ok, I tried isbntools because it was easier to use, but a library is
definitely better

As you can see, the output is quite good

Regarding the output quality, this is relevant:
https://github.com/xlcnd/isbnlib#merge-metadata.

ok. I don't think we should do much at this level. Just trust what
isbnlib, hope for the best, keep in mind that the user could need to
manually fix the fields.

Still, the field names might be different from the one in the preset the user has created.

This can be solved in many ways, cant say which is the best right now.

so, are you interested in writing an UI to insert a book based only on
its ISBN?