Skip to content

Add initial category filtering support#1036

Open
kkrishnan10 wants to merge 3 commits intoniccokunzmann:masterfrom
kkrishnan10:feature/category-filtering
Open

Add initial category filtering support#1036
kkrishnan10 wants to merge 3 commits intoniccokunzmann:masterfrom
kkrishnan10:feature/category-filtering

Conversation

@kkrishnan10
Copy link
Copy Markdown

Initial work for category filtering feature.

This PR adds the first steps for category based event filtering.
I updated the backend to read the CATEGORIES field from ICS events and included it in the
JSON output. The feature is not complete yet, but this sets up the structure for the full
filtering system. I will continue adding the UI and filtering logic next.

@kkrishnan10 kkrishnan10 changed the title v Add initial category filtering support Dec 9, 2025
Copy link
Copy Markdown
Owner

@niccokunzmann niccokunzmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this looks like a good start. Let me know if you need any help.

Comment thread open_web_calendar/convert/events.py Outdated
end = start + datetime.timedelta(days=1)
location = Location(calendar_event, self.location_spec)
name = calendar_event.get("SUMMARY", "")
raw_categories = calendar_event.get("CATEGORIES", "")
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have a look.. You should be able to use

calendar_event.categories that does exactly that.

https://icalendar.readthedocs.io/en/stable/api.html#icalendar.cal.Calendar.categories

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion! I have updated the code to use calendar_event.categories and pushed the change.

{% if specification['menu_shows_description'] %}<div class="menu-text menu-calendar-description">{{ specification["description"] }}</div>{% endif %}
</div>
</div>
<div id="category-filters" style="margin-bottom: 15px;">
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add all the styles to the .css file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants