sigla) to full outlet or program names (nombre). The application uses this catalog to identify the source of each press clipping message and display human-readable names in the curation view and dispatched digests.
Like keywords, the catalog is loaded from the Google Spreadsheet at import time — no code changes are required to add or update media outlets.
Data structure
After loading, the catalog is stored in themediosYProgramas array:
| Field | Type | Description |
|---|---|---|
sigla | string | Short abbreviation for the outlet or program (e.g. LV4, NM, C5N) |
nombre | string | Full name of the outlet or program (e.g. La Voz 4, Noticias Mediodía, Canal 5 Noticias) |
importar.component.ts
How abbreviations are resolved
TheextractMediaAndProgram() method applies three resolution strategies in order. The first strategy that produces a match wins.
Strategy 1 — Dot-separated format
Messages from structured sources follow the patternMEDIO.PROGRAMA. text..., where both MEDIO and PROGRAMA are abbreviations. The method splits on dots and looks up both segments in the catalog.
| Segment | Sigla | Resolved name |
|---|---|---|
LV4 | outlet | La Voz 4 |
NM | program | Noticias Mediodía |
mediosYProgramas, the full nombre is used. If it is not found, the raw sigla is kept as-is.
Strategy 2 — URL-based
If the message body containshttps://, the method extracts the domain and matches it against the catalog.
www. prefix is stripped before matching. The program is always set to web for URL-based sources.
Example: a message containing https://lavoz.com.ar/nota/... resolves to:
| Field | Value |
|---|---|
media | La Voz (if lavoz is in the catalog) or lavoz (if not) |
program | web |
Strategy 3 — Acronym prefix
If neither of the first two strategies matches, the method looks for 1–3 uppercase letters at the start of the message followed by a space and another uppercase word:Fallback
If none of the three strategies produce a match, bothmedia and program are set to *:
* values are still processed and can be reviewed by operators in the curation view.
Adding a new media outlet or program
Open the master spreadsheet
Open the Google Spreadsheet configured in
shared.service.ts. See Google Sheets integration for the spreadsheet ID.Locate or add a row for the outlet
Find an existing row for the outlet if you are adding a new program for an existing outlet, or scroll to the first empty row to add a new entry.
Enter the abbreviation in column D
Type the sigla exactly as it appears in press clipping messages. Matching is performed by string equality against the extracted prefix — casing must match.
Enter the full name in column E
Type the full display name as it should appear in digests and the curation view.
The same row can contain both keyword data (columns A–B) and media catalog data (columns D–E). Rows that have a sigla and nombre but no keyword are valid — they contribute only to the catalog.
Behavior for unrecognized outlets
When the extracted sigla or domain does not match any entry inmediosYProgramas:
| Strategy | Unrecognized behavior |
|---|---|
| Dot-separated | media is set to the raw sigla; program is set to the raw program abbreviation |
| URL-based | media is set to the first segment of the domain (e.g. lavoz); program is set to web |
| Acronym prefix | media and program are set to the matched uppercase tokens as-is |
| Fallback | Both media and program are set to * |
Examples
| Raw message start | Strategy used | Resolved media | Resolved program |
|---|---|---|---|
LV4.NM. Texto... | Dot-separated | La Voz 4 | Noticias Mediodía |
C5N.INFO. Texto... | Dot-separated | Canal 5 Noticias | Informativo |
https://lavoz.com.ar/nota/... | URL-based | La Voz | web |
https://www.infobae.com/... | URL-based | Infobae | web |
LV4 NM texto sin punto... | Acronym prefix | LV4 | NM |
(mensaje sin estructura) | Fallback | * | * |
Troubleshooting
A known outlet appears as its raw sigla instead of its full name
A known outlet appears as its raw sigla instead of its full name
The sigla in the message does not match the sigla in column D of the spreadsheet exactly. Check for:
- Trailing spaces in the spreadsheet cell
- Case differences (the catalog lookup is case-sensitive for dot-separated and acronym strategies)
- The outlet row being above the header row (and therefore discarded by
.splice(0, 1))
URL-based messages resolve to the domain segment instead of the outlet name
URL-based messages resolve to the domain segment instead of the outlet name
The domain prefix (e.g.
lavoz) is not present as a sigla in column D. Add a row with lavoz in column D and the full outlet name in column E.All items from a specific source fall back to *
All items from a specific source fall back to *
The message format does not match any of the three strategies. Log the raw message body from
extractMediaAndProgram() to inspect the actual format, then determine which strategy applies and whether the catalog entry is missing.