Navigating to a category panel
Each government area has its own panel at::cat route parameter is the category name (e.g., Salud, Infraestructura, General). The panel loads only the news items whose topics array includes that category.
Category names in the URL are case-sensitive and must match exactly the area names defined in the Google Sheets keyword source.
The category panel
The panel shows the filtered list of news items for the selected area. Each item displays:- The editable summary (
iaResume) - The media outlet and program
- The link
- A guardar / editar toggle
- A copy single item button
Copying all items: copyAll()
The Copy all button calls copyAll(), which assembles the complete digest for the category and writes it to the clipboard in a WhatsApp-ready format. Only items that have an iaResume value are included — items without a summary are silently skipped:
| Line | Content |
|---|---|
| Line 1 | ->*iaResume* — the summary in WhatsApp bold |
| Line 2 | -> media / program — outlet and program separated by / |
| Line 3 | 🔗 ->link — the trimmed URL preceded by a link emoji |
| Lines 4-5 | Blank separator lines between items |
Toast notification
AftercopyAll() writes to the clipboard, a toast notification appears in the UI confirming that the digest was copied. The toast auto-dismisses after a few seconds.
Saving items to WordPress
The upsert to WordPress is triggered automatically insidecopyAll() — each item with an iaResume is persisted as part of the same action that copies the digest to clipboard. The save logic uses an upsert pattern based on the item’s id_ field:
Set topics string
Before saving,
copyAll() joins t.topic with semicolons and stores the result in t.topics, which is the field persisted to WordPress ACF.Check for existing record
The method searches
noticiasGuardadas (loaded from WordPress at startup) for an entry whose acf.id_ matches the current item’s id_.The
id_ is derived from the message timestamp during parsing and is stable across re-uploads of the same log. Re-dispatching the same item will update the existing WordPress record rather than create a duplicate.The “guardar / editar” toggle
Each item in the panel has a guardar / editar control with two states:| State | Meaning |
|---|---|
| editar | The item is in read mode. Click to enter edit mode and modify iaResume. |
| guardar | The item is in edit mode. Click to save changes and trigger the upsert to WordPress. |
Curation
How operators refine summaries and manage categories before dispatch.
Ingestion
Return to the start of the workflow.