Feature Request: Flexibly filter events (by description/category/etc.)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.1k
- Forks
- 233
- Avg merge
- 1h 44m
- Merged PRs (30d)
- 1
Description
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 😇
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the ikhal filtering path and the calendarCollection methods mentioned in the issue, then compare whether the backend or configfile is the appropriate boundary. Before implementation, clarify the filter syntax, supported fields, negative filtering behavior, and command-line versus per-calendar configuration; done requires an agreed design and tests for those cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100