Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse custom roles from Calibre opf #105

Open
random-human-being opened this issue May 17, 2024 · 0 comments
Open

Parse custom roles from Calibre opf #105

random-human-being opened this issue May 17, 2024 · 0 comments

Comments

@random-human-being
Copy link

As of recent releases, bookshelf can scan Author and other select roles from an ebook/audiobook metadata.

Calibre allows the user to define custom columns for a variety of metadata.
Among these, the user can specify that a column contains a person's name (or list thereof).
This is the most straightforward way to include a field for translator, editor, foreword author, etc

For example, if I wanted to add a "Translator" field to my Calibre library metadata I would go to:
Preferences > Add your own columns > Add custom column
and there select the following:

  • Column type: "Comma separated text, like tags, shown in the tag browser"
  • Contain names: yes
  • Column heading: Translator
  • Lookup name: whatever

... and leave the rest blank

Then the newly added Translator field can be edited from the GUI.
If I then change the default blank value to a name (or a comma-separated list), Calibre will add a line to the corresponding metadata.opf, which ends up looking like the following two examples:
https://pastebin.com/h0iMCeYk
https://pastebin.com/sMDyra4D

The line that is added is a bit verbose, but the relevant metadata can be extracted as follows:
https://pastebin.com/xzt1w7Rx
(apologies for posting a script in Python rather than C#, but I am not familiar with the latter)

Could parsing of these fields be added to Jellyfin Bookshelf, and shown in the "People" section at the bottom of the ebook page?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant