Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

Is there a way to add all the text in the preview and not just the sentence #1680

Closed
TingTingin opened this issue May 16, 2021 · 6 comments · Fixed by #1682 or #1686
Closed

Is there a way to add all the text in the preview and not just the sentence #1680

TingTingin opened this issue May 16, 2021 · 6 comments · Fixed by #1682 or #1686

Comments

@TingTingin
Copy link

If I try to add a word from this screen it will add the sentence its in with {sentence}

brave_oy0nCRVMMT

But I want to add all the text in the preview and not have the sentence bounds stop at new lines the text comes like this when I use OCR in mangas and I wanna avoid having to put all the text in one line

@toasted-nutbread
Copy link
Collaborator

You can set up a second profile with a condition to activate it on the settings page, and then disable the sentence termination character checks and increase sentence extents.

@TingTingin
Copy link
Author

TingTingin commented May 16, 2021

If I turn off sentence termination it still stops at newlines is that intended behavior?

@toasted-nutbread
Copy link
Collaborator

You're right, I forgot about newlines. That's currently the intended behaviour; I would have to reconfigure some settings to allow for ignoring newlines.

@TingTingin
Copy link
Author

kk thx I was wondering if I was doing something wrong thx for the help

@TingTingin
Copy link
Author

TingTingin commented May 17, 2021

I tried the recent change and it works however when used in the popup it now even goes as far as matching all the words in the UI this is example output from this sentence

家族と共に
豊かで安全な生活が
保障されることに
なっているのです 生活

Yomichan Search Automatic kana conversion Clipboard monitor 家族と共に 豊かで安全な生活が 保障されることに なっているのです 生活 P ichi news Innocent Corpus 54668 Kanjium Pitch Accents せいかつ0 P n vs KireiCake living life (one

the matching goes even as far as matching the ui text ive worked around this by encasing the text in termination characters like so

!家族と共に
豊かで安全な生活が
保障されることに
なっているのです 生活!

in that case yomichan stops matching at those and only matches the sentence but was wondering if there is a more permanent solution

also as a side bar now that newlines can be matched it seems than when adding the card to anki they dont get preserved but instead all go on one line dont know if this is intended

@toasted-nutbread
Copy link
Collaborator

You're right, my workaround was a bit of a hack, so I've implemented it (hopefully) properly in #1686. There is now a new {search-query} marker.

also as a side bar now that newlines can be matched it seems than when adding the card to anki they dont get preserved but instead all go on one line dont know if this is intended

That's probably a presentation issue which could be fixed by wrapping the template content in {{#multiLine}}...{{/multiLine}}.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants