GithubHelp home page GithubHelp logo

Comments (12)

ripose-jp avatar ripose-jp commented on June 17, 2024

Why do you need this?

from memento.

BigBoyBarney avatar BigBoyBarney commented on June 17, 2024

I would like to add the concise definition in the given context right under the sentence on the back of my Anki card.
Additionally, J-J grammar dictionary entries can be incredibly long, so a selection marker would be very useful.

from memento.

ripose-jp avatar ripose-jp commented on June 17, 2024

I understand the use case, but it seems pretty specific considering it's already possible to select the entries you want using the checkboxes. Is this something that can't already be accomplished with the {clipboard} marker?

from memento.

BigBoyBarney avatar BigBoyBarney commented on June 17, 2024

Checkboxes can only be unselected, so if an entry has 13 checkboxes, I'd have to click 12 times to get the one I'd like.

Additionally, I don't really want to remove the other entries, but add the context-specific definition at the top of my card, which requires a separate marker.

Is this something that can't already be accomplished with the {clipboard} marker?

Not fully, as of right now. If the subtitle list is visible — which it always is in my use case — ctrl + c will default to copying the subtitle line from the list, instead of the selected text in the pop-up. If the pop-up selection were to take precedence over the subtitle list, it would mostly solve it.

Would implementing a separate marker be a lot of trouble? If yes, would it be possible to make the popup selection take precedence?

Cheers!

from memento.

wandero avatar wandero commented on June 17, 2024

@ripose-jp I also really need the {selection-text} parameter for the same reasons as @BigBoyBarney.
Although currently using {clipboard-text} also works as a workaround (by pressing Ctrl+C one more time)
I would be very grateful if the {selection-text} parameter could be added.
Thank you once again. The application is excellent,
(but it seems to have very little promotion. I spent a lot of effort configuring mpvacious yomitan before I discovered Memento...)

from memento.

ripose-jp avatar ripose-jp commented on June 17, 2024

Checkboxes can only be unselected

This isn't entirely true. You can set which dictionaries are selected by default by going to SettingsOptionsAnki IntegrationCheck Show Advanced OptionsInclude in Glossary.

My main apprehension with implementing this is that it's not clear how it should work. If you try to select text in different definitions, you'll see that selecting something in one doesn't deselect text in the other. There's no correct way to handle this, just different approaches. For example, is last selected better than a bullet list of selections? Tags can be selected as well, should they be included? I don't know because I don't understand the use case.

from memento.

wandero avatar wandero commented on June 17, 2024

@ripose-jp

Is this something that can't already be accomplished with the {clipboard} marker?

Using {clipboard} can be done, but it requires pressing Ctrl+C one more time. Sometimes I forget to press it, and then the new card ends up with the definition from the previous card.

from memento.

BigBoyBarney avatar BigBoyBarney commented on June 17, 2024

This isn't entirely true. You can set which dictionaries are selected by default by going to Settings → Options → Anki Integration → Check Show Advanced Options → Include in Glossary.

This option doesn't do anything if the entries are from the same dictionary.
image

My main apprehension with implementing this is that it's not clear how it should work. If you try to select text in different definitions, you'll see that selecting something in one doesn't deselect text in the other. There's no correct way to handle this, just different approaches. For example, is last selected better than a bullet list of selections? Tags can be selected as well, should they be included? I don't know because I don't understand the use case.

I can't really speak for others, but for my own, potentially specific use case, I would need 2 separate markers ideally.

  1. Selected text is exported as is, in ascending order (from top to bottom). This would include everything from tags, to list formatting etc.
  2. A "Selected Entry" marker would be really cool to have. Essentially the opposite of the checkboxes, maybe on the right side. Whatever is checked, gets exported with this marker.

To illustrate, here is one of my older cards:
image

I do want to include all of the definitions on the card for completeness' sake, but I want the context-specific definition at the top, in accordance with the minimum information principle. This is particularly important with J-J definitions, as those are not bulleted lists, but sentences; So highlighting keywords at the top is very useful.

Thanks in advance!

from memento.

ripose-jp avatar ripose-jp commented on June 17, 2024

Selected text is exported as is, in ascending order (from top to bottom). This would include everything from tags, to list formatting etc.

I don't think this is doable because of how Qt Widgets handles selection across multiple widgets. While you can select tags, you can't select text outside of the current tag you're selecting. It's a very different architecture from a webpage where everything is selectable. Selecting the glossaries themselves is doable and they have the added benefit retaining selection due to being based on QTextEdit instead of QLabel. I don't think you'll be able to get everything you want here.

A "Selected Entry" marker would be really cool to have. Essentially the opposite of the checkboxes, maybe on the right side. Whatever is checked, gets exported with this marker.

If I'm understanding this correctly, you want a way to export {glossary} twice with two different sets of definitions. I don't want to modify the UI in any way for this since it's so niche. I think any UI modifications would annoy far more users than it would help. Adding a new marker like {glossary-all}, or if I ever get around to implementing extended marker syntax {glossary:all}, that ignores checkboxes and exports the entire glossary always sounds like it would work for your use case.

from memento.

wandero avatar wandero commented on June 17, 2024

@ripose-jp Thank you for your patient reply. It seems that our use cases are different.
It appears that Chinese dictionaries do not have well-tagged entries, so I need to select specific words to add to my cards. For example, in the image, the word "朋友" (friend) is highlighted; I only need this word (without crossing tags). If I select by tag, the Japanese-Chinese dictionary does not separate the content and would add the entire set of definitions for the word to the card. Of course, I can achieve this using {clipboard} as well, but it requires an extra press of Ctrl+C.

Snipaste_2024-04-24_15-45-53

from memento.

BigBoyBarney avatar BigBoyBarney commented on June 17, 2024

While you can select tags, you can't select text outside of the current tag you're selecting.

That's totally fine, not a huge deal for my use case. As you can see in the image I sent above, 99.9% of the time it's one definition / tag that I want to narrow down and show at the top. I don't think I've ever tried or wanted to select definitions from multiple widgets.

Adding a new marker like {glossary-all}, or if I ever get around to implementing extended marker syntax {glossary:all}, that ignores checkboxes and exports the entire glossary always sounds like it would work for your use case.

I am perfectly happy with how default checkbox selection works right now, I only want to select certain parts of the text, much like @wandero's use case. A {selection-text} that does the same as double-pressing CTRL+C would solve both his and my issue.

Cheers!

from memento.

ripose-jp avatar ripose-jp commented on June 17, 2024

Thanks @wandero and @BigBoyBarney for the clarification. I got a much better idea of what's needed now.

from memento.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.