paper_firehose.commands.filter

Filter command implementation. Fetches RSS feeds, applies regex filters, and writes results to databases. HTML rendering is handled exclusively by the html command.

Functions

purge(config_path[, days, all_data])

Purge old entries from databases.

run(config_path[, topic, output_json])

Run the filtering pipeline for one or all topics.

paper_firehose.commands.filter.purge(config_path, days=None, all_data=False)[source]

Purge old entries from databases.

Parameters:
  • config_path (str) – Path to the main configuration file

  • days (Optional[int]) – Number of days to keep (if None and not all_data, keep all)

  • all_data (bool) – If True, clear all databases completely

Return type:

None

paper_firehose.commands.filter.run(config_path, topic=None, *, output_json=False)[source]

Run the filtering pipeline for one or all topics.

Parameters:
  • config_path (str) – Path to the main configuration file

  • topic (Optional[str]) – Optional specific topic to process (if None, process every topic)

  • output_json (bool) – When True, suppress log noise and return a result dict.

Return type:

Optional[Dict[str, Any]]

Returns:

Result dict when output_json is True, otherwise None.