-
Notifications
You must be signed in to change notification settings - Fork 26
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
Filtering #4
Comments
Filtering by title added in #v2.0.0 |
@guyfedwards I'd love to help contribute this feature (namely, the filtering by feed name), as I use Some thoughts I'd like to run by you. Glancing through the code for func CustomFilter(term string, targets []string) []list.Rank {
// split term into FeedName and Title, exclude targets that don't include FeedName
/* This is the default code, copied from bubbles/list
ranks := fuzzy.Find(term, targets)
sort.Stable(ranks)
result := make([]list.Rank, len(ranks))
for i, r := range ranks {
result[i] = list.Rank{
Index: r.Index,
MatchedIndexes: r.MatchedIndexes,
}
}
*/
return result
}
// in initialization
l := list.New()
l.Filter = CustomFilter And then changing the func (i TUIItem) FilterValue() { return i.FeedName + "some_delimiter" + i.Title } This is using the standard Thanks for all your hard work! |
Hey @kanielrkirby, yea that's along the same lines I was thinking. Would be happy to review anything if you want to implement. The initial functionality can just be a text search and later down the line add categories etc once the core function is fleshed out. |
Add searching by text in list, also by source, category.
Options:
foo
narrows by titlefoo category:allfoos
narrows by title within categoryThe text was updated successfully, but these errors were encountered: