Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 01-08-2015, 07:46 AM   #1
Pr.BarnArt
Addict
Pr.BarnArt has learned how to buy an e-book online
 
Pr.BarnArt's Avatar
 
Posts: 210
Karma: 94
Join Date: Jun 2011
Device: Pocketbook 902 / Ipad2
[Metadata Source Plugin] ADLIBRIS (NO)

ADLIBRIS_NO - Version 0.0.7 -BETA!! - february 14th 2015 by Pr. BarnArt.

This plugin is for using ADLIBRIS as a metadata source.
It is for books in the Norwegian language, that's why it is called ADLIBRIS_NO.
It was based on my plugin for ADLIBRIS_SE.
This project is in BETA stage, so please comment to make it more mature.
A special thank you for RAYHA for testing and feedback.


Main Features of ADLIBRIS_NO 0.0.7
  • retrieve isbn
  • retrieve multiple authors (no contributers/translators), title
  • retrieve comments, cover, series, publisher and publishing date, lanquage
  • Category CD-bok, Øvrig and MP3 are rejected
  • Option to remove commercial text in description all bold text is deleted, except for quotes , starting with double quote.
    You can set this option in the configuration file ( default is unset)
    !! be aware: that also description can be deleted if it is in bold at adlibris.
  • Option to match search for subtitle (syntax= title : subtitle) if that exists. (Default = no use of subtitle)

Special Notes:
  • ADLIBRIS_NO first looks for a match on the isbn-number, if that is given.
  • Otherwise it takes the author's name and the exact booktitle.
  • requires calibre 2.5 or higher.

Add / Fixed:
  • adjust for website changes of adlibris

Known issues:
I can only maintain the plugin if the users inform me when it is broken.
I do not use it myself. I am not from Norway.
Thank you for notifying errors and/or changes of the website.
The covers are small for the norwegian books
AdLibris is not very consequent at series and their formal naming. I cannot help that.

Installation Notes:
  • Download the attached zip file and install the plugin as described in the Introduction to plugins thread.
  • You can configure the plugin within Calibre.


Paypal Donations:
  • If you find this plugin useful please feel free to show your appreciation.

Version History:
Spoiler:

v.0.0.6 2015-02-14[*] adjust for website changes of adlibris

v.0.0.6 2015-01-18[*] when the option for subtitle is selected, the subtitle will be added to the title (syntax: title: subtitle)[*] for isbn the isbn13 format will be returned by the plugin


v.0.0.5 2015-01-12[*] fix error in case configuration file is not updated for the use of delete bold text[*]option to match search for subtitle ( syntax= title : subtitle) if that exists. (Default = no use of subtitle)[*] In case title at atlibris contains - or ' , matching title will also be done without these characters ("Marco-effecten" will be "Marco effecten")

v.0.0.4 2015-01-11[*] in version 0.0.3 there was a wrong version of __init.py (still 0.0.2)[*] delete bold tekst is implemented as option (configuration - file) Default: unset

v.0.0.3 2015-01-09[*] fix omission with rejecting categories[*] in case a ISBN-number is false or not found, the search is done by author and title[*] to remove commercial text in description all bold text is deleted, except for quotes , starting with double quote.
!! be aware: that also description can be deleted if it is in bold at adlibris.

v.0.0.2 - 2015-01-08[*] fix bug on series with no index[*] fix multiple authors, without translators/'Oversetter'

v.0.0.1 - 2015-01-08 -Beta initial release

Attached Files
File Type: zip ADLIBRIS_NO-0.0.7P.zip (11.2 KB, 8120 views)

Last edited by Pr.BarnArt; 02-14-2015 at 02:48 PM. Reason: version 0.0.7
Pr.BarnArt is offline   Reply With Quote
Old 01-08-2015, 11:36 AM   #2
Pr.BarnArt
Addict
Pr.BarnArt has learned how to buy an e-book online
 
Pr.BarnArt's Avatar
 
Posts: 210
Karma: 94
Join Date: Jun 2011
Device: Pocketbook 902 / Ipad2
Fix some early small bugs
Pr.BarnArt is offline   Reply With Quote
Old 01-08-2015, 04:13 PM   #3
Rayha
Member
Rayha began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jan 2015
Location: Norway
Device: Kindle Paperwhite
Thank you Pr.BarnArt. This is looking really good
I've done some tests and I have a few questions for you:
  1. Maximum title/author search match, from configuration page, does only work on covers. What about the rest of metadata? It would be nice to see more alternatives to choose the best set of metadata.
  2. If not possible to show more than one match of metadata, is it possible to prioritize categories when searching, and stop with first match? If so, I would like this priority: Innbundet, Pocket, Heftet, e-bok
  3. In the changelog, it says that categories CD-bok, øvrig and MP3 are rejected. But it doesn't look that way: A search for Author: Jo Nesbø, Title: Sønnen, resulted in this book: http://www.adlibris.com/no/product.aspx?isbn=8242157944, which has category øvrige.
  4. If ISBN does not match any book, the search doesn't continue trying to find books based on author/title. I know that there are different ISBN for different publisher/version/category of the book, and if the book has been added to the library with ISBN included as metadata, and that ISBN does not match the versions available in Adlibris, the search will fail. If you have these metadata for a book: Author: Jo Nesbø, Title: Sønnen, ISBN: 9788203356674, the search will fail. Even though all metadata are correct for this book from another publisher.
  5. There are some text strings that sometimes occur in Comments, that is not really wanted. Is it possible to remove those text strings? If you try to search for ISBN: 9788203355936, you will see these two lines within the text:
    Quote:
    Maks rabatt - fri frakt! Du får den ikke billigere!
    Les første kapittel her:
    If they occur, they are not wanted. Is it possible to remove them?

As I said before, I'm very happy for the effort you are putting into this plugin.
Rayha is offline   Reply With Quote
Old 01-09-2015, 01:51 PM   #4
Pr.BarnArt
Addict
Pr.BarnArt has learned how to buy an e-book online
 
Pr.BarnArt's Avatar
 
Posts: 210
Karma: 94
Join Date: Jun 2011
Device: Pocketbook 902 / Ipad2
Quote:
Originally Posted by Rayha View Post
Maximum title/author search match, from configuration page, does only work on covers. What about the rest of metadata? It would be nice to see more alternatives to choose the best set of metadata.
The selection is done by calibre, I think we could pass a priority but I have to look for that.

Quote:
Originally Posted by Rayha View Post
If not possible to show more than one match of metadata, is it possible to prioritize categories when searching, and stop with first match? If so, I would like this priority: Innbundet, Pocket, Heftet, e-bok
it is posible, but is it also very individual, for this you have to set your priority in the configuaration window.. In combination with the first point that would be interesting. I will think about it.

Quote:
Originally Posted by Rayha View Post
In the changelog, it says that categories CD-bok, øvrig and MP3 are rejected. But it doesn't look that way: A search for Author: Jo Nesbø, Title: Sønnen, resulted in this book: http://www.adlibris.com/no/product.aspx?isbn=8242157944, which has category øvrige.
Yeah,just for testing I deleted some breaks in the code and forgot to put them back. Is fixed in 0.0.3

Quote:
Originally Posted by Rayha View Post
If ISBN does not match any book, the search doesn't continue trying to find books based on author/title. I know that there are different ISBN for different publisher/version/category of the book, and if the book has been added to the library with ISBN included as metadata, and that ISBN does not match the versions available in Adlibris, the search will fail. If you have these metadata for a book: Author: Jo Nesbø, Title: Sønnen, ISBN: 9788203356674, the search will fail. Even though all metadata are correct for this book from another publisher.
Nice request, in case a ISBN-number is false or not found, the search is done by author and title. Implemented in 0.0.3

Quote:
Originally Posted by Rayha View Post
here are some text strings that sometimes occur in Comments, that is not really wanted. Is it possible to remove those text strings? If you try to search for ISBN: 9788203355936, you will see these two lines within the text: If they occur, they are not wanted. Is it possible to remove them?
It is difficult to track commercial tekst, because the tekst itself will be different and the only recognition is that they are in bold. But p.e quotes from a paper are also in bold.
I implemented a function to delete all bold tekst, unless they start with a double quote. So be aware, you can miss bold description.
See testversion 0.0.3 Maybe I shouldimplement this as an option in the configuration.

New test version available at the start of this thread.
Waiting for comments, this is the way I like to program.
Pr.BarnArt is offline   Reply With Quote
Old 01-11-2015, 05:18 AM   #5
Rayha
Member
Rayha began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jan 2015
Location: Norway
Device: Kindle Paperwhite
Here are a few more feedback after more testing.
  1. Search for commercial in bold is working, but agree with you that this could be a bit risky. It it is possible to configure this feature, I think maybe it should be configurable.
  2. Change version to 0.0.3 in __init__.py as well. This is the version showed in Calibre plugins.
  3. Not-found isbn is not implemented or does not work in v0.0.3, try this search with and without isbn:
    ISBN:9788202288488
    Author: Jo Nesbø
    Title: Hodejegerne
  4. Categories CD-bok, øvrig and MP3 are still possible to find. Try this search:
    Author: Ann-Charlotte Wennerholm
    Title: Spansk språkkurs
  5. If the symbol '-' is missing from title, the plugin fails. Maybe the symbols ' ' '-' ',' ':' ';' should be accepted missing from the field title when search is done? Try search for:
    Author: Jussi Adler-Olsen
    Title: Marco effekten

I will continue testing later on today.
Rayha is offline   Reply With Quote
Old 01-11-2015, 08:58 AM   #6
Pr.BarnArt
Addict
Pr.BarnArt has learned how to buy an e-book online
 
Pr.BarnArt's Avatar
 
Posts: 210
Karma: 94
Join Date: Jun 2011
Device: Pocketbook 902 / Ipad2
Quote:
Originally Posted by Rayha View Post
Here are a few more feedback after more testing.[LIST=1][*]Search for commercial in bold is working, but agree with you that this could be a bit risky. It it is possible to configure this feature, I think maybe it should be configurable.[*]Change version to 0.0.3 in __init__.py as well. This is the version showed in Calibre plugins.
[*].
Sorry my fault, It seems I forgot to put the o.o.3 version of init_py in the zipfile,
thats why:
cd, mpr en øvrig are not rejected,
ISBN false/not available did not work

I wil publish a 0.0.4 with the configurable delete bold tekst asap
PLease wait for that before going on testing
Pr.BarnArt is offline   Reply With Quote
Old 01-11-2015, 10:27 AM   #7
Pr.BarnArt
Addict
Pr.BarnArt has learned how to buy an e-book online
 
Pr.BarnArt's Avatar
 
Posts: 210
Karma: 94
Join Date: Jun 2011
Device: Pocketbook 902 / Ipad2
OK, new version 0.0.0.4
keep on testing
Pr.BarnArt is offline   Reply With Quote
Old 01-11-2015, 03:25 PM   #8
Rayha
Member
Rayha began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jan 2015
Location: Norway
Device: Kindle Paperwhite
Quote:
Originally Posted by Pr.BarnArt View Post
OK, new version 0.0.0.4
keep on testing
It looks like there are some problems with the new functionality regarding comments and bold/quoted text. Try search for:
Author: Christian Tybring-Gjedde
Title: Mens orkesteret fortsetter å spille

I get this errormessages in the log:
Quote:
Error parsing comments for url: u'http://www.adlibris.com/no/product.aspx?isbn=8202453836'
Traceback (most recent call last):
File "calibre_plugins.ADLIBRIS_NO.worker", line 137, in parse_details
File "calibre_plugins.ADLIBRIS_NO.worker", line 271, in parse_comments
KeyError: u'block_bold'
No comments are parsed back to Calibre. Previous version 0.0.3 managed to get comments, so this must be related to the changes made for this optional functionality.
Rayha is offline   Reply With Quote
Old 01-11-2015, 03:50 PM   #9
Rayha
Member
Rayha began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jan 2015
Location: Norway
Device: Kindle Paperwhite
Quote:
Originally Posted by Pr.BarnArt View Post
OK, new version 0.0.0.4
keep on testing
One more strange thing. There is something called Undertittel. It is translated to Subtitle or tagline or something. This will cause problems for some books. try searching for this:
Title: Bridget Jones: mad about the boy
Author: Helen Fielding

This will give you no answer. For this book 'mad about the boy' is defined as subtitle, the title contains only 'Bridget Jones'. So if you search for this:
Title: Bridget Jones
Author: Helen Fielding

You will get the correct book. But that is pure luck, since there are 3 books in this series, and book 2 and 3 have same title and different subtitles. This is really a problem for Calibre as well. There is not support for subtitle there. So the only solution I can see, is something like this:
IF <subtitle> exist
<title>=<title>+<subtitle>
seach for <title>, <author> and/or <ISBN> given in Calibre

Something you can look at?
Rayha is offline   Reply With Quote
Old 01-11-2015, 04:01 PM   #10
Pr.BarnArt
Addict
Pr.BarnArt has learned how to buy an e-book online
 
Pr.BarnArt's Avatar
 
Posts: 210
Karma: 94
Join Date: Jun 2011
Device: Pocketbook 902 / Ipad2
hi,

that error occurs if you did not config the plugin and the key is not known.
Once you config the plugin, the key's are updates.

I will implement an extra check if the key is not found, and in that case do the default action: that is no delete of bold items.
Pr.BarnArt is offline   Reply With Quote
Old 01-11-2015, 04:26 PM   #11
Pr.BarnArt
Addict
Pr.BarnArt has learned how to buy an e-book online
 
Pr.BarnArt's Avatar
 
Posts: 210
Karma: 94
Join Date: Jun 2011
Device: Pocketbook 902 / Ipad2
Quote:
Originally Posted by Rayha View Post
One more strange thing. There is something called Undertittel. It is translated to Subtitle or tagline or something. This will cause problems for some books. try searching for this:
Title: Bridget Jones: mad about the boy
Author: Helen Fielding

Something you can look at?
That is difficult.
When no ISBN is given the plugin scans the results of search page from adlibris. At this webpage subtitles are not mentioned at all.http://www.adlibris.com/no/searchres...mproduct=False

The way around could be to search with the subtitle, but adlibris answers with no match http://www.adlibris.com/no/searchres...mproduct=False

The subtitle is only found on the bookpage itself and the comparing of titles is done before.

The only solution will be to recognize the use of a subtitle throught the semi colon.
Then compare the title of the search with the title without subtitle and, if match, grab the specific bookpage and compare the subtitle.
Therefore users have to handle all subtitles the same way: using a semicolon en presume there is no maintitle with a semicolon.

Last edited by Pr.BarnArt; 01-11-2015 at 04:31 PM.
Pr.BarnArt is offline   Reply With Quote
Old 01-12-2015, 07:26 AM   #12
Pr.BarnArt
Addict
Pr.BarnArt has learned how to buy an e-book online
 
Pr.BarnArt's Avatar
 
Posts: 210
Karma: 94
Join Date: Jun 2011
Device: Pocketbook 902 / Ipad2
Update tot 0.0.5

Add / Fixed:
• fix error in case configuration file is not updated for the use of delete bold text
•option to match search for subtitle ( syntax= title : subtitle) if that exists. (Default = no use of subtitle)
• In case title at atlibris contains - or ' , matching title will also be done without these characters ("Marco-effekten" will be "Marco effekten")

You can download it at the starttopic of this thread

Last edited by Pr.BarnArt; 01-12-2015 at 09:21 AM.
Pr.BarnArt is offline   Reply With Quote
Old 01-18-2015, 11:14 AM   #13
Rayha
Member
Rayha began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jan 2015
Location: Norway
Device: Kindle Paperwhite
Quote:
Originally Posted by Pr.BarnArt View Post
Update tot 0.0.5
There were problems installing the Plugin that causes Customize-window not showing correct Other options. I had to remove the plugin, restart Calibre and install the plugin again.

There are still a few issues I'd like to address:
  1. Search for subtitle does work, but subtitle is not returned to Calibre. I would prefer that subtitle is returned as part of title.
  2. If it is possible, I would prefer to use ISBN-13 instead of ISBN-10. From 2007 ISBN-13 has been the current standard.
  3. I've noticed that if the book you search for, is part of a series, but does not have a series index, the index will be set to 1 in Calibre. Normal behavior in standard plugins in Calibre, is to set index to the the whatever you already have + 1. I.e. you have book 2 and 4 in a series. The next book will then be 5. I'm not sure which solution is the best, just want you to know, and you can decide yourself.

There are a few issues I don't like with Adlibris, but I know that you cannot do anything about it. That is:
  1. Adlibris are not really consequent using series. They have made some series of their own, not really following the standard series.
  2. It is not that easy getting information from the correct version of the book. If I could choose, I would prefer information from hardcover (Innbundet), but for some books, hardcover does not exist in Adlibris, then softcover (Heftet or Pocket) is the next priority.
  3. The covers are sadly a bit small
Rayha is offline   Reply With Quote
Old 01-18-2015, 12:36 PM   #14
Pr.BarnArt
Addict
Pr.BarnArt has learned how to buy an e-book online
 
Pr.BarnArt's Avatar
 
Posts: 210
Karma: 94
Join Date: Jun 2011
Device: Pocketbook 902 / Ipad2
Quote:
Originally Posted by Rayha View Post
[*]Search for subtitle does work, but subtitle is not returned to Calibre. I would prefer that subtitle is returned as part of title.
Yep, will be availble in next version


Quote:
[*]If it is possible, I would prefer to use ISBN-13 instead of ISBN-10. From 2007 ISBN-13 has been the current standard.
Ok, will be changed in next version

Quote:
[*]I've noticed that if the book you search for, is part of a series, but does not have a series index, the index will be set to 1 in Calibre. Normal behavior in standard plugins in Calibre, is to set index to the the whatever you already have + 1. I.e. you have book 2 and 4 in a series. The next book will then be 5. I'm not sure which solution is the best, just want you to know, and you can decide yourself.
You describe the way calibre itself handle the input of new series.
The plugin is not aware of the serie parts you already use.
The only option could be leave it blank and see how calibre handle that information. I will check this.


Thank you for testing
Pr.BarnArt is offline   Reply With Quote
Old 01-18-2015, 04:40 PM   #15
Pr.BarnArt
Addict
Pr.BarnArt has learned how to buy an e-book online
 
Pr.BarnArt's Avatar
 
Posts: 210
Karma: 94
Join Date: Jun 2011
Device: Pocketbook 902 / Ipad2
New version 0.0.6 available at the start of this thread.

As mentioned above:
Add / Fixed:
- when the option for subtitle is selected, the subtitle will be added to the title ( syntax: title: subtitle)
- for isbn the isbn13 format will be returned by the plugin

The indexnumber of the serie was already set to blank if that was not given by AdLibris. It is calibre itself that sets the index to number 1 in that case.
So cannot change that by the plugin, for it is unknown which serienumber are already used.

Thanks to RAHYA for testing so far and giving great feedback.
I think the plugin is good enough to be official annouced , so I will ask to serve it within calibre.

Please notify me in case of errors , website changes or requests.

Enjoy.

Last edited by Pr.BarnArt; 01-19-2015 at 04:43 AM.
Pr.BarnArt is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Metadata Source Plugin] ADLIBRIS (SE) Pr.BarnArt Plugins 40 03-02-2015 02:32 AM
[Metadata Source Plugin] DIZZIE_NL Pr.BarnArt Plugins 7 08-11-2014 01:48 PM
[Metadata Source Plugin] INMONDADORI Pr.BarnArt Plugins 3 10-15-2013 03:14 AM
[Metadata Source Plugin] Antikvarium.hu kloon Plugins 3 10-17-2012 11:11 AM
[Metadata Source Plugin] Amazon.it nandocuci Plugins 2 05-18-2011 02:36 AM


All times are GMT -4. The time now is 06:39 AM.


MobileRead.com is a privately owned, operated and funded community.