Quantcast
Channel: MobileRead Forums
Viewing all articles
Browse latest Browse all 50080

Babelio_db metadata source plugin

$
0
0
[Metadata Source Plugin] babelio_db

This plugin gets the metadata for books from the babelio site.

The Babelio website
The address to access Babelio is <https://www.babelio.com/>.

The Babelio homepage says in french: "Babelio est un réseau social dédié aux livres et aux lecteurs. Il permet de créer et d’organiser sa bibliothèque en ligne, d’obtenir des informations sur des oeuvres, de partager et d’échanger ses goûts et impressions littéraires avec d’autres lecteurs."

This translate to: "Babelio is a social network dedicated to books and readers. It allows you to create and organise your online library, get information about works, to share and exchange literary tastes and impressions with other readers."

There is no need to log in to obtain information, (and that avoids the need of the management of an account in the plugin)

Main Features
  • Can retrieve title, author, comments, publisher, publication date, series and tags.
  • Fetches the cover related to the volume, NOT all the possible covers related to the book.
  • Now version = (0, 0, 5)
  • Needs minimum_calibre_version = (6, 3, 0)
I developed this template plugin based on the existing VdF plugin to solve a series of limitations that I encounter:
  1. There is no reference (id) that allows to find the URL, nor a way to add an id from the url due to the lack of the following two routines:
    • get_book_url: used by calibre to convert the identifier to a URL...
    • id_from_url : takes an URL and extracts the identifier details...
  2. As soon as the Babelio content is retrieved, ALL the information is translated into utf8, ALL outputs (logs...) and inputs (what is read on the site...) are in utf8... the multiple conversions make the code confusing to me.
  3. Provides only one match even if two titles answer the search query
  4. The compatibility with python 2.x seems obsolete and confusing to me.
  5. Identify() should be invoked with NAME_ID then ISBN and if it doesn't work with title + author... title only.
  6. A config.py is OK but I prefer to use the built-in config, quite sufficient.
  7. Babelio gives in the title the name of the series and its volume number (order in the series), I'll try to introduce it (and check that all my series meet it...)
  8. I much prefer comments in HTML and beautifulsoup (used in calibre by the way)
  9. I hate this search and substitution language (regular expression) probably because I don't understand almost anything... well, I only do a little bit!
I couldn't find any trace of VdF... His work, under GPL V3 license can be modified. I would have liked to contact him before publishing my work, based on his, on mobileread...

Note: babelio being a site with mostly french books for french talking poeple, I took the liberty to write the interface in french... (well I may have left comment in french too... luckily, there is no french looking instructions in python :D)

Installation Notes:
  • Download the attached zip file and install the plugin as described in the Introduction to plugins thread.
  • Alternatively, copy the zip file, unzip it in a dedicated folder, get the needed privileges and execute the runit.bat (linux people can read the file and sudo the content)
  • Note that this is not a GUI plugin so it is not intended/cannot be added to context menus/toolbars etc.

sources
babelio_db is visible on github https://github.com/lrpirlet/cal-babelio_db

last comment:
This work is open source... I had fun writing it, if you think this work should be paid, choose a charity and give them, a little, with a mention like "Thanks to Louis Richard" or "Merci à Louis Richard" or something similar in your language. This will enhance my (unpublished) reputation...

What charity? My worst nightmares involve fire, so I'm giving for children deeply burned children... My wife is afraid of cancer so she gives to cancer research, we both feel bad about people starving so we give to the "resto du Coeur"...

Unfortunately, there is always someone who needs help and will not be able to pay back (except perhaps with a thought for the stranger who helped them). So there is a lot of choices.

En Français

Spoiler:

Ce plugin récupère les métadonnées des livres depuis le site babelio.

Le site Babelio
L'adresse pour accéder à Babelio est <https://www.babelio.com/>.

La page d'accueil de Babelio dit: "Babelio est un réseau social dédié aux livres et aux lecteurs. Il permet de créer et d'organiser sa bibliothèque en ligne, d'obtenir des informations sur des œuvres, de partager et d'échanger ses goûts et impressions littéraires avec d'autres lecteurs."

Il n'est pas nécessaire de se connecter pour obtenir des informations, (et cela évite la nécessité de la gestion d'un compte dans le plugin).

Caractéristiques principales
J'ai développé ce plugin modèle basé sur le plugin VdF existant pour résoudre une série de limitations que je rencontre :
  1. Il n'y a pas de référence (id) qui permet de retrouver l'url, ni de moyen d'ajouter un id à partir de l'url du fait de l'absence des deux routines suivantes :
    • get_book_url : utilisée par calibre pour convertir l'identifiant en une URL....
    • id_from_url : prend une URL et extrait les détails de l'identifiant...
  2. Dès que le contenu Babelio est récupéré, TOUTES les informations sont traduites en utf8, TOUTES les sorties (logs...) et les entrées (ce qui est lu sur le site...) sont en utf8... les multiples conversions rendent le code confus pour moi.
  3. Ne fournit qu'une seule correspondance même si deux titres répondent à la requête de recherche.
  4. La compatibilité avec python 2.x me semble obsolète et confuse.
  5. Identify() devrait être invoqué avec NAME_ID puis ISBN et si ça ne marche pas avec titre + auteur... titre seulement.
  6. Un config.py est OK mais je préfère utiliser la config intégrée, bien suffisante.
  7. Babelio donne dans le titre le nom de la série et son numéro de volume (ordre dans la série), je vais essayer de l'introduire (et vérifier que toutes mes séries y répondent...).
  8. Je préfère de loin les commentaires en HTML et beautifulsoup (utilisé dans calibre d'ailleurs)
  9. Je déteste ce langage de recherche et de substitution (expression régulière) probablement parce que je n'y comprends quasi rien... enfin, seulement un p'tit peu !
Je n'ai trouvé aucune trace de VdF... Son travail, sous licence GPL V3 peut être modifié. J'aurais aimé le contacter avant de publier mon travail, basé sur le sien, sur mobileread...

Notes d'installation :
  • Téléchargez le fichier zip ci-joint et installez le plugin comme décrit dans le fil de discussion Introduction aux plugins.
  • Alternativement, copiez le fichier zip, décompressez-le dans un dossier dédié, obtenez les privilèges nécessaires et exécutez le runit.bat (les personnes sous linux peuvent lire le fichier et sudo le contenu).
  • Notez que ce n'est pas un plugin GUI donc il n'est pas prévu/ne peut pas être ajouté aux menus contextuels/barres d'outils etc.

sources
babelio_db est visible sur github https://github.com/lrpirlet/cal-babelio_db

dernier commentaire :
Ce travail est open source... Je me suis amusé à l'écrire, si vous pensez que ce travail devrait être rémunéré, choisissez une association caritative et donnez leur, un peu, avec une mention comme "Thanks to Louis Richard" ou "Merci à Louis Richard" ou quelque chose de similaire dans votre langue. Cela améliorera ma réputation (non publiée)...

Quelle charité ? Mes pires cauchemars impliquent le feu, donc je donne pour les enfants profondément brûlés... Ma femme a peur du cancer donc elle donne pour la recherche sur le cancer, nous nous sentons tous les deux mal à l'idée que des gens meurent de faim donc nous donnons pour le "resto du Coeur"...

Malheureusement, il y a toujours quelqu'un qui a besoin d'aide et qui ne sera pas en mesure de rembourser (sauf peut-être avec une pensée pour l'étranger qui l'a aidé). Il y a donc beaucoup de choix.

The zip

Attached Files
File Type: zip Babelio_db.zip (239.5 KB)

Viewing all articles
Browse latest Browse all 50080

Latest Images

Trending Articles



Latest Images