Local-only pipeline for identifying Google News RSS articles related to sector asset workbooks, then tagging those articles with asset and profile tags from Excel or CSV inputs. This is a generalized version of a tool utilized by staff at RMI that utilizes reference databases within RMI's Azure environment.
- Reads asset inputs from
.xlsxor.xls - Reads a required local tag profile file
- Pulls summary content from Google News RSS for each keyword
- Applies local tagging logic
- Writes a tagged output file in Excel or CSV format
If you installed Python from python.org on a Mac, you may need to install SSL certificates before the pipeline can make HTTPS requests. A symptom is an SSL: CERTIFICATE_VERIFY_FAILED error when running the tool.
To fix it, run the certificate installer that ships with Python (adjust the version number to match your installation):
/Applications/Python\ 3.x/Install\ Certificates.commandThis is a one-time step per Python installation.
- Create a virtual environment:
python -m venv .venv - Activate it in PowerShell:
.venv\Scripts\Activate.ps1 - Install dependencies:
pip install -r requirements.txt
Supported asset inputs:
- Excel workbooks with one or more sector sheets
- Each sheet is treated as an asset type, using the lowercased sheet name in the pipeline
Required tag profile input:
- a local Excel or CSV file with columns
tag category,tag, andphrase - this file is a core part of the tagging workflow and is required for every run
Field-level details for supported input and output files are documented in DATA_DICTIONARY.md.
Set your configuration file. Use pipeline_config.example.json as a starting point.
Supported config keys are:
asset_file: File path to asset fileoutput: Target output filenametag_profile: Tag profile file pathasset_types: Optional list of workbook tab names to include in the rungeography: Target geographies if providing and asset file with geography includedlookback_min: Start date of your target periodlookback_max: End date of your target periodname_tolerance: How many words from each asset name should be included for keyword searchesmax_items_per_keyword: How many search results to return per assetsource_exclude: Names of any publications to exclude from outputdebug: If true, limits keyword processing to the first 5 keywords per asset type
Or keep the defaults in a local config file and reference that from the CLI:
python main.py --config .\pipeline_config.jsonOr run the supported CLI with default configuration:
python main.py --asset-file .\AssetInput.xlsx --tag-profile .\tagProfile.xlsx --output .\output\tagged-google-news.xlsxCLI flags still override config file values for one-off runs:
python main.py --config .\pipeline_config.json --geography "United States" Canada --debugThe output file includes tagged Google News rows with fields such as:
titlesourceurlpubDatedescriptiontagstag_score- matched asset columns such as
asset_id,asset_name, andasset_countrywhen present
- The only supported entry point is
main.py. - The project runs fully from local files plus Google News RSS.
- JSON config files are optional; direct CLI usage still works. However, the config file provides more granular control over the process
petrochemicalandrefiningstill use their existing sector-specific post-processing rules; other sheet types use the generic tagged-result flow
- Incorporate paid news API source, such as SerpAPI, to broaden coverage
- Pass results to LLM for review and prioritization before providing output to user
- If using a news source that provides primary source URLs, retrieve larger portion of source text for review and tagging