st3v3nmw / obsidian-spaced-repetition

Fight the forgetting curve by reviewing flashcards & entire notes on Obsidian.md
https://www.stephenmwangi.com/obsidian-spaced-repetition/
MIT License
1.43k stars 182 forks source link

[Feat] Image occlusion #34

Open Gaaruda opened 3 years ago

st3v3nmw commented 3 years ago

I honestly don't see how we can do image occlusion without cluttering up the notes a lot. We have to store the position of the occlusion box, say [x1, y1, x2, y2] at the bare minimum, for all boxes we have. And then store scheduling information for each of those occlusions.

Pull requests on this are welcome though.

st3v3nmw commented 3 years ago

Oops, closed wrong issue.

andrewcrook commented 2 years ago

I honestly don't see how we can do image occlusion without cluttering up the notes a lot. We have to store the position of the occlusion box, say [x1, y1, x2, y2] at the bare minimum, for all boxes we have.

Couldn't the data be stored in metadata? Then hide it.

https://forum.obsidian.md/t/can-you-hide-the-metadata-box-when-previewing-a-note-with-yaml-metadata/21931/8

Or use the hider plug-in.

PaperOrb commented 2 years ago

Just spitballing here, but maybe the amount of clutter could be limited by storing the coordinate data as a serialized number like 01234567 instead of an array like [[0, 1, 2, 3], [4, 5, 6, 7]].

andrewcrook commented 2 years ago

I have seen plugins do this in pages

<!-- 
JSON Data Here
-->

that hides it from view mode.

I have also seen an annotation plugin that stores JSON in a separate file with extension e.g this could be docname.occ By default these files would be hidden and I suppose the plugin can add it to a hidden file list, if obsidian has one , just to make sure.

Values in the memory would need to be ordered lists or key pair. JSON the standard supposedly stats the order should be preserved with arrays, however, in practise you cannot not guaranteed the order is preserved between different JSON parsers (even some browsers) so would probably have to use key pair and have the key state the order.

Moot-a commented 2 years ago

A way we could circumvent this is a program (or obsidian plugin directly) that creates single-line flashcards from an image that can :

  1. occlude what we want to remember
    • single part
    • multiple sequential parts
    • grouped parts (multiple parts occluded at the same time)
  2. Mark them as siblings
  3. Output :
    1. Files as jpg for space consideration or links to the images (upload directly to Imgur, or other image sharing services)
      • With correct formatting (this is just for reference) With a way of using cloze deletion maybe, might be easier to implement for single and multiple answers cards.
        • (image)::(occluded_image)
        • (url_to_image)::(url_to_occluded_image)
    2. Copy directly to clipboard, to txt file, etc...

Of course this would be a hacky way of doing things and would take space, if there is a way to censor directly on the base image without having to create a new one for each answers would save space but add complexity.

I would like to add that I'm not really keen on developing programs (will be retrying for a 3rd time my first year in a bachelor in software dev, but didn't have the "perfect" background beforehand, and also medical issues but shush), so I think this could somewhat easily be implemented, but I have no idea how.

kingpatrickj commented 4 months ago

Sorry to necro this, but is there a way to leverage excalidraw or canvas? Make occlusions there, and add some syntax over the occluding element that tells the plugin to include it in the queue?

andrewcrook commented 4 months ago

chat to the excalidraw and excalibrain plugin guy I am sure he might be interested in the idea

however, I don't think adding a dependency to this plugin is a good idea it should be shelf contained and offer occlusions , of course , thats just my opinion.

TolgaKerem07 commented 4 months ago

https://github.com/st3v3nmw/obsidian-spaced-repetition/issues/162

If this feature is added, image occlusion data will be prevented from corrupting the notes, right?