Adding image to notes
Hello,
I'm creating a plugin that grabs author information and adds it to notes. I've looked through the API documentation and thought I had everything figured out, but I'm running into a wall.
I'm creating an html table that contains various author info. For the picture, I'm using pythons requests module to get image data from a url and then using Calibre's add_notes_resource function to create the resource. I'm using the hash to add an <img> tag to the table.
When the note is created, the img source is empty.
As a test, I had my code print out the final html block that is imported using the import_note function.
This block has the img source, and if I manually take this html block and add it to the note as html source, the image shows up, so I know the resource is being created correctly.
I'm just unsure why the src part of the image tag is being deleted when being imported as a note.
|