Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A more efficient way of updating tags + Scan current file only #584

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MisterPresident
Copy link
Contributor

This pull request is just a more efficient way of updating tags (using updateNoteTags vs. removeTags + addTags). This speeds up the generation task, especially if you have a big vault (2k notes) and a lot of tags in Anki (64k cards with ~16k tags). Alltogehter It should prevent Anki from dying due to a big request-payload.

Moreover, I added a command to scan the current file only.

image

This should fix #565. Maybe helps on #428, #354, #326.

@rpj-07
Copy link

rpj-07 commented Jul 29, 2024

I just tried to download the data for the plugin from your pull request and add it to Obsidian, but it always failed with the error "Failed to load Obsidian_to_anki". Is this not the entire code that you inserted in the test_vault?
I would be very interested in your modification, as I need just such a function.

@MisterPresident
Copy link
Contributor Author

I think you didn't compile the code?

@rpj-07
Copy link

rpj-07 commented Aug 4, 2024

I think you didn't compile the code?

Can you explain what do you mean with "compile"?
I have github-desktop and that ist why I have copy me the/your "text_vault" and attempt the activation of the plugin "obsidian_to_anki" in this to my desktop copied vault?
Is that a false way to copy that?

@MisterPresident
Copy link
Contributor Author

Sorry for the late response, I'm on vacation.

You need to run the build script from the package.json "build": "rollup --config rollup.config.js",
Then replace the old main.js with the new one.

I think you could also use BRAT but I never tried it.

@rpj-07
Copy link

rpj-07 commented Aug 19, 2024

You need to run the build script from the package.json "build": "rollup --config rollup.config.js", Then replace the old main.js with the new one.

Thank you, that is work!
This is a very huge improvement for my workflow, thank you very much!!
Unfortunately I am not very affin with Github, if there is an official update from Obsidian_to_anki, then I have to decide whether I want to have your modified version or the new version installed, since the main.js file is changed during the update, right?

@MisterPresident
Copy link
Contributor Author

Did it work?
I hope that the author accepts my changes. Then this pull request would be integrated into the official version.

@rpj-07
Copy link

rpj-07 commented Aug 21, 2024

Did it work?

Yes, it works very well!
Thank for your pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

it takes too long to sync when I add a custum deck of more than 30,000 cards
2 participants