[Enhancement] Write metadata to .opf file #625

Open
opened 2026-04-24 23:14:59 +02:00 by adam · 2 comments
Owner

Originally created by @ahobsonsayers on GitHub (Sep 6, 2022).

Describe the feature/enhancement

Hey, first of all i want to say I love audiobookshelf, thanks for all the work you do on it!

Currently audiobookshelf writes metatdata to an .abs file using its own defined format. Personally I am a massive fan of the .abs format used (and do feel it is superior to .opf in many ways), however the .opf format is much more widely supported and for compatibility reasons I would love to be able to write metadata edited in audiobookshelf directly to either an existing or new .opf file if one does not already exist.

I mainly think this feature will be very useful for managing ebooks in audiobookshelf. The current .opf parser does a great job of reading existing book metadata but I'm hoping we can also write back to the file.

If this is a feature suited to ABS and there is interested in it being added, I might be able to find some time to code up a .opf file writer, although my JavaScript is a bit rusty these days!

Originally created by @ahobsonsayers on GitHub (Sep 6, 2022). ### Describe the feature/enhancement Hey, first of all i want to say I **love** audiobookshelf, thanks for all the work you do on it! Currently audiobookshelf writes metatdata to an .abs file using its own defined format. Personally I am a massive fan of the .abs format used (and do feel it is superior to .opf in many ways), however the .opf format is much more widely supported and for compatibility reasons I would love to be able to write metadata edited in audiobookshelf directly to either an existing or new .opf file if one does not already exist. I mainly think this feature will be very useful for managing ebooks in audiobookshelf. The current .opf parser does a great job of reading existing book metadata but I'm hoping we can also write back to the file. If this is a feature suited to ABS and there is interested in it being added, I might be able to find some time to code up a .opf file writer, although my JavaScript is a bit rusty these days!
adam added the enhancementpossible plugin labels 2026-04-24 23:14:59 +02:00
Author
Owner

@advplyr commented on GitHub (Sep 7, 2022):

I'm up for this. I was going to change the abs file to be a JSON file instead so it would be easier for external scripts to interpret.

Now I think a better idea is to allow the user to enable the metadata files they want to store with their items in library settings. So you could have an audiobook library storing abs and an ebook library storing opf.

@advplyr commented on GitHub (Sep 7, 2022): I'm up for this. I was going to change the `abs` file to be a JSON file instead so it would be easier for external scripts to interpret. Now I think a better idea is to allow the user to enable the metadata files they want to store with their items in library settings. So you could have an audiobook library storing `abs` and an ebook library storing `opf`.
Author
Owner

@wtanksleyjr commented on GitHub (Sep 28, 2022):

I would love to have a JSON output that simply reflected the things Audiobookshelf knows and cares about, while OPF and ABS format cannot. I currently run a script for which I made my own YAML format based on all of the things ABS, OPF, ODM, and Libation can tell me about a book. I can autogenerate it from any book folder, and then have it generate OPF to override almost whatever I want to (within the limits of OPF).

(Sadly there are things Audiobookserver will only accept from certain kinds of inputs, so I can't for example tell it a book's in multiple series by any means except manual input to the web server, and OPF and ABS have different capabilities with regards to multiple authors. Another reason why a truly custom Audiobookserver format would be a delight.)

I wasn't able to find an open issue for a JSON format, so I assume you're working that in your head for now, I'm rooting for that! I've got some ideas, like allowing for both input and output in the same format.

@wtanksleyjr commented on GitHub (Sep 28, 2022): I would love to have a JSON output that simply reflected the things Audiobookshelf knows and cares about, while OPF and ABS format cannot. I currently run a script for which I made my own YAML format based on all of the things ABS, OPF, ODM, and Libation can tell me about a book. I can autogenerate it from any book folder, and then have it generate OPF to override almost whatever I want to (within the limits of OPF). (Sadly there are things Audiobookserver will only accept from certain kinds of inputs, so I can't for example tell it a book's in multiple series by any means except manual input to the web server, and OPF and ABS have different capabilities with regards to multiple authors. Another reason why a truly custom Audiobookserver format would be a delight.) I wasn't able to find an open issue for a JSON format, so I assume you're working that in your head for now, I'm rooting for that! I've got some ideas, like allowing for both input and output in the same format.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#625