khal
khal copied to clipboard
Feature Request: Flexibly filter events (by description/category/etc.)
Thanks a lot for writing khal
!
I'd love to be able to filter all events, e.g. by category or description. Also negative filtering would be great.
E.g. I have some calendar entries which I have merely as reminders. I want to see them when searching for a new appointment but don't want to see when I'm asking myself what is up in the coming weeks.
For this I'd like to be able to e.g. run something like ikhal --filter "category != "Notes"
.
I don't know what the best syntax would be nor what fields would make sense (if possible, allowing the same fields to be filtered by as can be used for formatting would be nice). So I would be very glad for inputs on how a sane format for a flexible filter may look (I guess it makes sense to implement as command line argument and a per calendar option in the configfile).
I'd like to try to contribute this feature myself, but I'd need some help on the implementation, too. 😅 I skimmed through the code and think implementing it shouldn't be that hard. I'm just not sure where in the code (on which "layer") it makes sense to implement such a filter function. Should the filter be applied in the backend or on the calendarCollection methods...?
I'm a system engineer by day and my coding skills are not on expert level. So please be patient with me 😇
I do agree with everything written here. Thank you for writing khal
!
I do import some external calendars that make heavy use of categories and I'd appreciate the ability to filter by them very much. As I pretty much only use khal calendar
and khal list
I would like the filters to be usable there.
Is there something that needs to be done for this feature request to get accepted?