Quote:
Originally Posted by compurandom
I'm sure I can make it work. I'm not sure I can make it work without modifying calibre.
At the very least, it appears that the metadata GUI supports adding fields, I tested that much. I didn't test if I can get the field into the book. I may have to dig for that and add a line of code or two somewhere.
|
I'm not sure if I am following you there. Calibre supports custom columns. The metadata editor automatically builds entry fields for them. Or do you mean in the Metadata download configuration?
Quote:
Let me know where, so that when I fix it, I can let them know. :-P
|
There are far to many places to name. I'd suggest at least once in every metadata source plugin thread. And plenty of times in other threads about downloading metadata.
The real issue would be that all metadata source plugins would need to be updated to use custom columns. And there would need to be a way to identify the columns for each possible piece of metadata from the source.
Quote:
This I have tested. It shouldn't be too hard. I just don't want to supoprt every single identifier in existence.
For translating from identifier to url, I had imagined making a dictionary of identifiers with a template to create the URL. This could even be fully automated, pulling the template itself from wikidata.
Going from URL to identifier is a two part job.
When pulling from wikidata, we already know which template it will match, so extracting the ID is easy. I might not be able to automate that, but manually making a regex for it is trivial.
The second half would be translating a generic URL to an identifier.
I hadn't planned on doing that at all, but...
|
Your using an API to get the data, so that probably makes some of this easier. But, if you don't translate both ways, then adding the identifier is fairly pointless. And won't display anywhere.
Quote:
Thanks a lot for that! I was wondering where that function was used. I'll test that as soon as I can.
If I understand correctly, this function is used to translate the URI when importing the book independently from downloading metadata with the plugin.
I'll certainly translate a few URI's automatically, but it might be tricky to get them all without just iterating over the list of all templates, which might or might not be a performance problem. If it's not, I should be able to do them all easily as long as I can make good regex's to match the URIs.
|
I did this because I frequently ended up with a URL in the clipboard for a metadata source. Especially when the download didn't merge the versions I wanted. The button in the metadata editor already supported pasting an ISBN. I just extended this. And Kovid extended it a little bit before I finished my change.