=== NoticiaCubo ===
Contributors: hostalcubo
Donate link: https://paypal.me/hostingalcubo
Tags: autoblog, news, rss, ai, content
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Scheduled original blog articles from RSS news, written with your own Groq key and illustrated with free stock photos.

== Description ==

NoticiaCubo keeps your blog active without manual work and without third-party automation platforms. On the days and time you choose, it picks a recent news item from your RSS feeds (Google News searches or any feed), writes a completely original article about it with the Groq API using your own key, adds a featured image from Pexels (or Openverse as a fallback) with proper credits, and saves it as a draft or publishes it.

Each article includes an SEO title, an excerpt, a body in HTML with H2 subheadings (600 to 900 words), a link to the original source and your own call to action at the end. The AI is instructed not to copy the source text and not to invent figures or quotes.

Nothing is published half-done: posts are created as drafts first and only switch to the chosen status once the content has been validated. If something fails (timeout, rate limit, malformed response), the run is logged and nothing empty is published.

= Features (free) =

* **Schedule with WP-Cron:** choose the days of the week, the time and the time zone. Instructions to add a server cron job are included.
* **News sources:** Google News searches (one per line) and your own RSS feeds, up to 5 sources, rotating on each run.
* **No repeats:** used news URLs and titles are remembered, so the same story is never used twice.
* **Original article written by AI** in the language and style you choose, using your own Groq API key and the model you choose.
* **Featured image** from Pexels (free API key) with photographer credits and alt text; Openverse as a fallback (commercial-use licenses); if everything fails, the post is saved without an image.
* **Draft, pending review or publish directly**, with category and author.
* **Your call to action** appended to every article.
* **"Generate one now" and "Test keys" buttons.**
* **Log of the last 50 runs** (OK, PARTIAL or ERROR with a summary).
* **Keys are never shown in full** in the admin.

= Pro version (separate) =

A separate Pro version adds: an editable AI prompt, unlimited topics and feeds with a category per topic, a protected REST endpoint with the run log (to connect your own dashboards), automatic translation linked with Polylang, Rank Math SEO fields, and email or Telegram notifications. The free version works fully on its own. More info: https://hostalcubo.com.ar/noticiacubo

== External services ==

This plugin connects to third-party services to find news, write articles and get images. Below is what each service is used for, when, and what data is sent. No visitor data is ever sent: all requests happen in the background (WP-Cron) or when an administrator clicks a button.

**Google News RSS (news.google.com) — news source**
Used to read recent headlines for the topics you configure.
* Data sent: the search terms (topics), language and country you configure. Your site's URL is sent as part of the standard request.
* When: on every scheduled or manual run.
* Provider: Google LLC. Terms: https://policies.google.com/terms — Privacy: https://policies.google.com/privacy

**Other RSS feeds you add**
Only the feed URLs you enter are requested, on every run. Their terms and privacy policies are those of each publisher.

**Groq API (api.groq.com) — required to write the articles**
* Data sent: your Groq API key, the selected model, and the news item (headline, source name, date and summary) together with the writing instructions.
* Data received: the generated article (title, excerpt, body, keywords).
* When: on every run, and when you click "Test keys" (lists the models available to your key).
* Provider: Groq, Inc. Terms: https://groq.com/terms-of-use/ — Privacy: https://groq.com/privacy-policy/

**Pexels API (api.pexels.com) — featured image (optional)**
* Data sent: your Pexels API key and a few English search keywords for the image.
* Data received: photo URLs and photographer names; the chosen photo is downloaded to your Media Library.
* When: on every run if a Pexels key is set, and when you click "Test keys".
* Provider: Pexels GmbH. Terms: https://www.pexels.com/terms-of-service/ — Privacy: https://www.pexels.com/privacy-policy/ — License: https://www.pexels.com/license/

**Openverse API (api.openverse.org) — featured image fallback (optional, no key)**
* Data sent: a few English search keywords for the image.
* Data received: openly licensed image URLs with author and license data; the chosen image is downloaded to your Media Library from its original host.
* When: only if enabled and Pexels has no usable result.
* Provider: WordPress.org / Openverse. Terms: https://docs.openverse.org/terms_of_service.html — Privacy: https://wordpress.org/about/privacy/

You need your own Groq account and API key. Please review the generated drafts and make sure your use complies with each service's terms, the image licenses and your local laws.

== Installation ==

1. Upload the `noticiacubo` folder to `/wp-content/plugins/`, or install the .zip from Plugins -> Add New -> Upload Plugin.
2. Activate the plugin.
3. Go to Settings -> NoticiaCubo.
4. Paste your Groq API key (free at console.groq.com) and, optionally, your Pexels API key (free at pexels.com/api). Click "Test keys".
5. Review topics, days, time, status, category and call to action. Turn on the schedule and save.
6. Click "Generate one now" to try it.

== Frequently Asked Questions ==

= Do I need API keys? =
A Groq API key is required (free tier available). A Pexels key is optional but recommended for images; without it, Openverse is used if enabled.

= Does it copy the news articles? =
No. The AI receives only the headline and a short summary from the feed and is instructed to write an original article in its own words. The source is always credited with a link. Review drafts before publishing.

= The article was not published at the scheduled time. =
WP-Cron runs only when someone visits your site. Add a server cron job every 15 minutes that calls `https://your-site.com/wp-cron.php?doing_wp_cron`.

= What happens if Groq is down or rate-limited? =
The plugin retries once and, if it still fails, logs an ERROR and publishes nothing. The news item is not marked as used, so it can be retried on the next run.

= Can it publish twice in the same slot? =
No. Each slot runs only once and a lock prevents parallel runs.

== Screenshots ==

1. Settings: schedule, news sources and Groq.
2. Featured image, publishing options and call to action.
3. Log of the last runs.

== Changelog ==

= 1.0.2 =
* New: link to a 7-day free trial of NoticiaCubo Pro (no credit card) in the settings screen.

= 1.0.1 =
* Fix: deleting the free version no longer removes the settings shared with NoticiaCubo Pro.

= 1.0.0 =
* First version: scheduled articles from RSS news with Groq, featured image from Pexels or Openverse, draft or publish, call to action, run log, "Generate one now" and "Test keys".

== Upgrade Notice ==

= 1.0.0 =
First public release of NoticiaCubo.
