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

FR: Proposal for deck search configuration #24

Open
BorisNA opened this issue Nov 11, 2023 · 0 comments
Open

FR: Proposal for deck search configuration #24

BorisNA opened this issue Nov 11, 2023 · 0 comments

Comments

@BorisNA
Copy link

BorisNA commented Nov 11, 2023

I have a proposal for the known words deck search configuration. It already works for me, so if you are Ok, I will make a PR.

Instead of hardcoded heuristic we can move it to the configuration to the config file. There will be an array of search conditions, each of those conditions containing:

  • a set of decks to search
  • a set of fields to search in these decks
  • search query to limit search
  • an additional search query to exclude (it can be a little overhead but it looks like it is needed for difficult configurations)

For example, we include seen words from two main study decks (with different fields in each) without suspended ones:

        "known_words": [
            {
                "decks": [
                    "🇨🇳 中文::Hanzi", "🇨🇳 中文::Words"
                ],
                "fields": [
                    "Hanzi", "Word"
                ],
                "search_exclude": "is:suspended OR tag:leech",
                "search_include": "-is:new"
            },

And also add "known" all words, that are hidden in another deck (suspended, active,... all):

            {
                "decks": [
                    "🇨🇳 中文::z_known"
                ],
                "fields": [
                    "Hanzi",
                    "Simplified"
                ],
                "search_exclude": "",
                "search_include": ""
            }

Yes, it could be a little hard for ordinary user, but it is easy to implement and gives more than enough configurability.

Another possible option would be to borrow idea, UI (and code?) from anki-morph plugin

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

No branches or pull requests

1 participant