View Single Post
Old 10-08-2021, 04:46 PM   #12
lrpirlet
Connoisseur
lrpirlet began at the beginning.
 
Posts: 96
Karma: 40
Join Date: Mar 2020
Location: Belgium (sorry, I am from the Walloon side of the country and I speak french only)
Device: PW3, Kobo Libra H2O
I guess you did NOT delete the nfsr_id field... In that case, my doc is incomplete

Quote:
Originally Posted by Marco24 View Post
Hi lrpirlet,

In french it would by easier for both of us
That is absolutely true... However, I thing we should either move the thread to the french forum.... I have been very frustrated, once, to find an answer in german (I do not understand it ) that was the exact answer to what I was after in the development process...

Allow me to quickly translate your input in the next quote

Quote:

I couldn't find the example with the forced editor because I found a way to get around it (which consists in filling in Calibre, field ids nsfr_id:bk$aaaa$vl$bbbbbbb by taking aaaa the ref of the work in the url noosfere and bbbbbbb the ref of the edition)

BUT I found another example which could perhaps interest you:
searching for
The Lavalite World by Philip José FARMER, isbn 2-266-03637-8 :
https://www.noosfere.org/livres/Edit...p?numitem=5085
in noosfere, I have 3 results (in this example, the covers are identical, but I had already identified identical isbn but with different covers, it is trivial, but I attach importance to it LOL)

even if I set the plugin to the most recent work (or other parameters), the plugin always retrieves the January 1991 edition and not the December 1997 one

in fact, according to the logs, it only retrieves one edition, and not the 3 with the same isbn :
Code:
Running identify query with parameters: 
{ 'title': 'The Lavalite World', 'authors': ['Philip José Farmer'], 'identifiers': { 'isbn': '2266036378', 'goodreads': '18191754'}, 'timeout': 30} 
Using plugins: noosfere DB (0, 9, 0) 
The log from individual plugins is below 

****************************** noosfere DB (0, 9, 0) ****************************** 
Found 1 results 
Downloading from noosfere DB took 2.3268990516662598 


--- 
Title: The Lavalite World
Author(s) : Philip José Farmer
Publisher : POCKET
Tags : Science-Fiction
Series : The Universe Makers / The Saga of the God-Men #5
Languages : fra
Published : 1986-09-14T22:00:00+00:00
Identifiers : nsfr_id:bk$5085$vl$2146597649, isbn:2266036378
not serious with the bypass procedure but I wanted to inform you.

Translated with www.DeepL.com/Translator (free version)
I guess you did NOT delete the nfsr_id before trying again with some different options...

Please confirm...

If the id field contains any valid nfsr_id, then if will bypass EVERYTHING and go directly to the volume pointed by the nfsr_id. The resulting effect is to overwrite everything, including the title, the author and even the ISBN...

Now, I think that the algorithm that chooses the volume should be better documented. I was aiming to include a maximum of information about the book, and that implies choosing the "best" volume, with some (maybe too) small tuning via the noosfere DB configuration...

Here is the algorithm:
Code:
    def ret_top_vol_indx(self, url, book_title):
        # cette fonction reçoit l'URL du livre qui contient plusieurs volumes du même auteur,
        # dont certains ont le même ISBN et généralement le même titres.
        #
        # Ces volumes diffèrent par l'éditeur, la date d'édition ou de réédition, l'image de couverture, le 4me de couverture, la critique.
        # MON choix se base sur un système de points sur les indications du site
        # résumé présent:                       r   1pt
        # critique présente:                    c   1pt         # semble pas trop correct car CS n'existe pas même si, quand
        # critique de la série                  cs  1pt         # une critique existe, elle est reprise pour tous les volumes
        # sommaire des nouvelles présentes:     s   1pt
        # information vérifiée                  v   1pt
        # titre identique                       t   1pt
        # image présente                        p   1pt
        # isbn présent                          i  50pt         sauf préférence
        # isbn présent et identique a calibre     100pt         sauf préférence
        # le nombre de point sera  augmenté de telle manière a choisir le volume chez l'éditeur le plus représenté... MON choix
        # en cas d'égalité, le plus ancien reçoit la préférence
        #
        # This gets the book's URL, there many volume may be present with (or not) same ISBN, same title.
        # if the book only has one volume, then we bypass ret_top_vol_indx
        #
        # the volumes are different by the publisher, edition's or re-edition's date, cover, resume, critic...
        # MY choice is based on a point system based on the site's flag
        # resume available:                     r   1pt
        # critic available:                     c   1pt         # maybe incorrect as sometimes, when a critic exists
        # series critic:                        cs  1pt         # it is distributed to all volume without indication
        # summary of novel in the book:         s   1pt
        # verified information                  v   1pt
        # same title as requested               t   1pt
        # cover available                       p   1pt
        # isbn available                        i  50pt         unless overwritten by the priority choice
        # isbn available et same as requested     100pt         unless overwritten by the priority choice
        # the score will be increased so that the volume will be chosen to the most present publisher ... MY choice
        # in case of equality the oldest win
        #
If you want a specific volume, then set the corresponding NSFR_id...

Quote:
sinon, un truc qui m'intéresserait serait de récupérer les infos sur les prix obtenus et les adaptations TV/films

et pour finir, je suis adhérent de Noosfere :
j'ai parlé de ton plugin à l'asso, du coup, pour éviter que le plugin ne fonctionne plus en cas de changement de l'interface, du module de recherche etc, ca t'intéresserait qu'on mette en place une API ?
Ok, out of respect for noosfere, I limited myself to the public information, the summary and the reviews... I don't want to break noosfere's income by taking advantage of their sources... in fact I tried to make functional all the URLs included in the texts I pumped in order to redirect the reader to noosfere.

If the association agrees to let me integrate more information, I see only one problem: will I have the time?

Translated with www.DeepL.com/Translator (free version)
lrpirlet is offline   Reply With Quote