Rewrite Miniflux plugin to use requests, add filter and bookmark tools
Drop the miniflux pip client in favour of requests (already in the container). Add update_feed_filters (keeplist/blocklist regex), toggle_bookmark, get_entry (full content), and category filtering. Remove the pip install step from Ansible. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,10 @@ GET_UNREAD_ENTRIES = {
|
||||
"type": "integer",
|
||||
"description": "Filter to a specific feed. Omit for all feeds.",
|
||||
},
|
||||
"category_id": {
|
||||
"type": "integer",
|
||||
"description": "Filter to a specific category. Omit for all categories.",
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"description": "Maximum number of entries to return. Defaults to 20.",
|
||||
@@ -32,3 +36,81 @@ GET_UNREAD_ENTRIES = {
|
||||
"required": [],
|
||||
},
|
||||
}
|
||||
|
||||
GET_ENTRY = {
|
||||
"name": "get_entry",
|
||||
"description": (
|
||||
"Get a single entry from Miniflux by ID, including its full content. "
|
||||
"Use this to read an article's text."
|
||||
),
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entry_id": {
|
||||
"type": "integer",
|
||||
"description": "The entry ID to retrieve.",
|
||||
},
|
||||
},
|
||||
"required": ["entry_id"],
|
||||
},
|
||||
}
|
||||
|
||||
TOGGLE_BOOKMARK = {
|
||||
"name": "toggle_bookmark",
|
||||
"description": "Toggle the bookmark/star status of a Miniflux entry.",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entry_id": {
|
||||
"type": "integer",
|
||||
"description": "The entry ID to bookmark or unbookmark.",
|
||||
},
|
||||
},
|
||||
"required": ["entry_id"],
|
||||
},
|
||||
}
|
||||
|
||||
UPDATE_FEED_FILTERS = {
|
||||
"name": "update_feed_filters",
|
||||
"description": (
|
||||
"Update the keep or block filter rules on a Miniflux feed. "
|
||||
"Rules are case-insensitive regexes matched against entry titles and URLs. "
|
||||
"keeplist_rules: only entries matching are kept. "
|
||||
"blocklist_rules: entries matching are excluded. "
|
||||
"Pass an empty string to clear a rule."
|
||||
),
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"feed_id": {
|
||||
"type": "integer",
|
||||
"description": "The feed ID to update.",
|
||||
},
|
||||
"keeplist_rules": {
|
||||
"type": "string",
|
||||
"description": "Regex pattern. Only matching entries are kept. Omit to leave unchanged.",
|
||||
},
|
||||
"blocklist_rules": {
|
||||
"type": "string",
|
||||
"description": "Regex pattern. Matching entries are excluded. Omit to leave unchanged.",
|
||||
},
|
||||
},
|
||||
"required": ["feed_id"],
|
||||
},
|
||||
}
|
||||
|
||||
MARK_AS_READ = {
|
||||
"name": "mark_as_read",
|
||||
"description": "Mark one or more Miniflux entries as read.",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entry_ids": {
|
||||
"type": "array",
|
||||
"items": {"type": "integer"},
|
||||
"description": "List of entry IDs to mark as read.",
|
||||
},
|
||||
},
|
||||
"required": ["entry_ids"],
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user