Skip to content
This repository was archived by the owner on Feb 25, 2023. It is now read-only.
This repository was archived by the owner on Feb 25, 2023. It is now read-only.

Anki integration: Definitions with images do not work #1741

Closed

Description

@shoui520

For an upcoming monolingual dictionary we are making we are taking advantage of Yomichan's images and gaiji (structured-content) feature.
They display correctly in the extension but not without this CSS

chrome_UKY0amtaF0
chrome_0nKeQ2XrDx

Well done.

However, when you try to make an Anki card from it, the glossary field turns into [object Object]
Here are my Anki integration settings
brave_yyR2Gf65hp
I mainly use the handlebars.js featured on animecards.site, which adds the {test} field, which adds definitions to your cards in plain text.
However, this does not matter here as stock handlebars.js and either {glossary} or {glossary-brief} have the exact same result

chrome_nWXh5n4ecI

The Anki card result...
anki_cX5kkBoLDC

Activity

  1. changed the title [-]Anki integration: Definitions with images break [/-] [+]Anki integration: Definitions with images do not work[/+] on Jun 16, 2021
  2. shoui520 commented on Jun 16, 2021

    @shoui520
    Author

    I have attached a test dictionary that includes the entries 藍, 亜 and 謎
    test-dictionary.zip

  3. toasted-nutbread commented on Jun 16, 2021

    @toasted-nutbread
    Collaborator

    Yes, this is currently expected. Anki integration isn't implemented yet for either images or structured-content, and the "definition" text is a JSON object instead of a string, so handlebars stringifies it to "[Object object]". I'll have to make some changes to how Anki receives the images and formats the fields.

  4. shoui520 commented on Jun 17, 2021

    @shoui520
    Author

    @toasted-nutbread I have a question regarding this.
    Will fixing this require making additional changes to the dictionary? Or will that handled entirely by the add-on?

  5. toasted-nutbread commented on Jun 17, 2021

    @toasted-nutbread
    Collaborator

    No changes required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions