Visual indication of why list matched on a record, or stricter default search
Kappers opened this issue · 4 comments
Multiple times I get surprised by things that flag on a bibo list query - it can be fiddly to figure out why. Below is a little example - why does this first entry flag on 'attention'? Turns out, the word appears once in the abstract (and sometimes this can be in quite a superficial way, but other times really interesting):
(venv) TK :: ~ » bibo list attention
...
large_neural_2015 📁 🔗
Edward W. Large, Jorge A. Herrera, and Marc J. Velasco. Neural {Networks} for {Beat}
{Perception} in {Musical} {Rhythm}. Frontiers in Systems Neuroscience, 9, nov 2015.
...
(venv) TK :: ~ » bibo list author:large abstract:attention --raw | g --colour attention
abstract = {...
and has been linked with attentional allocation and movement coordination.
...},
(venv) TK :: ~ »
I think some flag/etc combining grep --colour
with auto field extraction would be useful, similar to find-in-page, to get all the hits. Maybe, this is better off as a plugin?
(venv) TK :: ~ » bibo list attention --find
...
large_neural_2015 📁 🔗
Edward W. Large, Jorge A. Herrera, and Marc J. Velasco. Neural {Networks} for {Beat}
{Perception} in {Musical} {Rhythm}. Frontiers in Systems Neuroscience, 9, nov 2015.
Abstract: "...Synchronized neural activity has been observed in auditory and motor networks,
and has been linked with attentional allocation and movement coordination..."
...
Interesting idea! I think it makes sense to highlight the words that causes the match. We can do this by default, no need to use a plugin. Also, if the match is due to something that is not in the default citation, we can include the field and the highlighted value as well. What do you think?
Another option is to make the list command easier to modify with plugins and then write a wrapper that adds this functionality. I prefer not to have a separate list function or extra flags to support this if possible.
Should this go into alpha @Kappers?
I think it makes sense to highlight the words that causes the match. We can do this by default, no need to use a plugin. Also, if the match is due to something that is not in the default citation, we can include the field and the highlighted value as well. What do you think?
I think this would be nice in alpha, and (at least personally) would want this as default list
behaviour.
After autocomplete (which I plan to get on this weekend), I wouldn't mind helping with it, if you have a lot to do already.
Another option is to make the list command easier to modify with plugins and then write a wrapper that adds this functionality.
Separately, I think it's still worth asking how list
might need to be made easier to use (or not). For example, when I wrote a 'todo list' variant that I use heavily.
Good! Adding this to alpha. I can work on that, or not, up to you :-)
Will open a separate ticket to make the list command extensible with plugins. Not for alpha I assume.