Add SVG support for masks in Image Occlusion

Hello!

I have been using Affinity Designer (webarchive) to highlight PDFs and I have integrated it into a sort of “flow” leading to creating IO notes with a lot of cards/masks.
This is an exciting thing for me to share as it spared me the hassle of the native image-occlusion engine of Anki.


So…here how it goes:
  • On Affinity Designer:
    • Import the PDF;
    • Highlight relevant information by drawing colored curves of various shapes and sizes;
    • Because of its support for layers and groups, I can group these lines in groups.
  • Then, I export the masks as an SVG file because that format “cares” about shapes, groups, layers and coordinates.
  • *Using a python script, the layers, the lines from the SVG files are translated into the Image Occlusion syntax that Anki uses to create masks.
    The result is pasted into my clipboard.
  • On Anki : finally, I paste the script result into the Occlusion field of the associated PDF I had opened on Affinity Designer.

That is a cumbersome process that I’m happy with but I can’t help but suggest the following:
Add support for importing SVG masks in Image Occlusion.

You can make a text file and import all the cards at once. Cut the pdf into images and copy them into the collection.media folder.