Obsidian_to_Anki
Obsidian_to_Anki copied to clipboard
Added the option to ignore files similar to a .gitignore file via settings
I added a text field in the settings where globs can be put into. If any of these match a file, it will be ignored and therefore not be scanned.
This feature is especially useful when using this plugin in combination with the obsidian-excalidraw-plugin because this plugin stores its files as .excalidraw.md.
This will cause the Obsidian_to_Anki plugin to scan these files. Excessive scan times are caused by scanning these large files.
Adding **/*.excalidraw.md
to the ignore option will alleviate this problem because these files will be ignored.
It could also be useful if a user wishes a specific folder not to be scanned (f.e. the template folder)
The option I added should behave like a git ignore file which is documented here: https://git-scm.com/docs/gitignore
kindly update
it looks like author is away since December 2020😥
If somebody else is looking for a solution to use Obsidian to Anki with Ecalidraw:
Just activate the compression function in the Excalidraw options. In my case this changes the filetype from .excalidraw.md to .excalidraw and stops Anki from searching these files and freezing in the process.
@Pseudonium Is there any chance we could get this feature merged? There are conflicts that I'd be willing to look into resolving, but since this PR is so old I'd like to get some confirmation on whether it has a chance of being merged back?
This feature to ignore files is very beneficial for:
- speeding up scan times
- utilizing plugins such as Templater without creating unnecessary anki cards
If not, could you drop a comment as to why and close the PR as won't merge?
Maybe we should think about a maintained fork. Whenever @Pseudonium comes back we could merge it back. #447
@MisterPresident I was thinking about that myself. One of the worst things about such impactful open-source projects like this, is they tend to succumb to Bus Factor one day. Many good obsidian plugins especially have. It's really important for project owners to find a few contributors to give write access to so the project can continue without you. But at least there is a LICENSE file. So separately maintained forks can be used for distribution.
Can you rebase this PR and add some Tests ? Do take note of this feature (https://github.com/ShootingKing-AM/Obsidian_to_Anki/pull/154)
Are you done @niposch ? Can you add some information about this feature and how to use in Readme.MD. Also since we already know that excalidraw, Templater obsidian addons can you set the default setting to ignore this file.
It would be also awesome if you can do a hyperlink some example so that a common (non-developer) can understand how to use globs (dont specify .gitignore :) ). Also you can have some examples as placeholder text, like "ignore_this_file.md\nignore_this_dir/*" so that it will be easy for common users to understand.
Let me know when you are done, want to merge this feature as soon as possible :)
I'm done. Added a bit more documentation and a default value for the setting and a better placeholder.
I haven't figured out what to do about ignoring the template folder as there isn't any default template folder name I'm aware of. Maybe we could add *[Tt]emplate*/**
but that could also be error prone.
Seems like some tests are failing - https://github.com/Pseudonium/Obsidian_to_Anki/actions/runs/7627084329/job/20774950101?pr=503#step:7:9685
still you can find the failed tests here #503
Thanks for the awesome feature ! @niposch Tests for this PR are done in https://github.com/Pseudonium/Obsidian_to_Anki/pull/504