Skip to content

Add include-category and exclude-category options for feed filtering#1

Merged
UberKitten merged 6 commits into
masterfrom
copilot/add-category-filter-options
Dec 13, 2025
Merged

Add include-category and exclude-category options for feed filtering#1
UberKitten merged 6 commits into
masterfrom
copilot/add-category-filter-options

Conversation

Copy link
Copy Markdown

Copilot AI commented Dec 12, 2025

  • Add include-category and exclude-category options
  • Add tests for category filtering
  • Update config documentation
  • Fix CI test failures:
    • Changed MkdirAll mode from 0666 to 0755 (directories need execute permission)
    • Added setupTestHome() helper to use t.TempDir() for isolated test environments
Original prompt

An RSS feed I use has a on each : https://www.avclub.com/rss.xml
Add per-feed key-value options include-category and exclude-category that match on a regular expression and include/exclude the post.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits December 12, 2025 09:54
Co-authored-by: UberKitten <566438+UberKitten@users.noreply.github.com>
Co-authored-by: UberKitten <566438+UberKitten@users.noreply.github.com>
Co-authored-by: UberKitten <566438+UberKitten@users.noreply.github.com>
Copilot AI changed the title [WIP] Add include and exclude category options for RSS feed Add include-category and exclude-category options for feed filtering Dec 12, 2025
Copilot AI requested a review from UberKitten December 12, 2025 10:00
@UberKitten
Copy link
Copy Markdown
Owner

@copilot so I can put two include-category and both will work? do other options also allow this?

Copy link
Copy Markdown
Author

Copilot AI commented Dec 12, 2025

@copilot so I can put two include-category and both will work? do other options also allow this?

Yes, multiple include-category options work together (OR'd - matching any one is sufficient to include the item). This follows the same pattern as existing options like include, include-title, exclude, and exclude-title.

The config documentation (lines 89-90 of config_cmd.go) already notes: "configuration-keys may be repeated multiple times, if you desire."

Example:

https://www.avclub.com/rss.xml
 - include-category: (?i)movies
 - include-category: (?i)tv

This includes items categorized as either "movies" OR "tv".

@UberKitten UberKitten marked this pull request as ready for review December 12, 2025 12:18
@UberKitten
Copy link
Copy Markdown
Owner

@copilot fix relevant test failures

… for tests

Co-authored-by: UberKitten <566438+UberKitten@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Dec 12, 2025

@copilot fix relevant test failures

Fixed in dc12c64. The issues were:

  1. os.MkdirAll used mode 0666 instead of 0755 (directories need execute permission to be traversed)
  2. Added setupTestHome(t) helper using t.TempDir() to isolate tests from the system HOME directory

@UberKitten UberKitten merged commit 59d42c7 into master Dec 13, 2025
4 checks passed
@UberKitten UberKitten deleted the copilot/add-category-filter-options branch December 13, 2025 05:44
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