Use this feature to generate category-level AI summaries and save multiple named analysis variants per period.
/feed-admin/feed-adminpermission:rssdaily, weekly, monthly, and yearly; after generation the page refreshes so the overwritten variant list is shown exactly as storedYou can run analytics in three ways:
app/Console/Kernel.php.rss:generate-analytics --period=daily at 20:00.* * * * * cd /path/to/tools && php artisan schedule:run >> /dev/null 2>&1
If your environment intentionally runs schedule:run only once per day, run it at 20:00 to match the analytics schedule. Weekly/monthly/yearly can still be run manually when needed.
php artisan rss:generate-analytics --period=daily
php artisan rss:generate-analytics --period=weekly
php artisan rss:generate-analytics --period=monthly
php artisan rss:generate-analytics --period=yearly
php artisan rss:generate-analytics --period=all
POST /api/rss/analytics/runAuthorization: Bearer <ANALYTICS_CRON_SECRET>curl -X POST "https://tools.tornevall.com/api/rss/analytics/run" \
-H "Authorization: Bearer YOUR_ANALYTICS_CRON_SECRET" \
-H "Content-Type: application/json" \
-d '{"period":"daily","categories":"all","sites":false}'
Accepted period values for CLI/API: daily, weekly, monthly, yearly, all.
POST /feed-admin/analytics/generate
category (required)period (required): daily, weekly, monthly, yearlymodel (optional): for example gpt-4o-mini, gpt-4o, gpt-4-turbolanguage (optional): for example sv, en, de, fr, esvariant_title (optional): saved title for this analysis varianttone (optional): for example neutral, critical, humorous, satirical, aggressive, analyticalvariant_description (optional): what this saved analysis should focus onwatch_for (optional): analyst guidance text added to the promptcategory_watch_for (optional): category-specific focus text combined with watch_forgenerate_all_languages (optional, default true): generate all supported languages in one runset_as_default (optional): set this variant as the default public analysis for that period bucketcurl -X POST "https://tools.tornevall.com/feed-admin/analytics/generate" \
-H "Content-Type: application/json" \
-H "X-CSRF-TOKEN: YOUR_TOKEN" \
--cookie "LARAVEL_SESSION=YOUR_SESSION" \
-d '{
"category": "Right Wing",
"period": "weekly",
"model": "gpt-4o-mini",
"language": "en",
"variant_title": "Critical English Variant",
"tone": "critical",
"variant_description": "A critical English-language weekly analysis focused on active authors and heavy edits.",
"watch_for": "Look for escalation language and repeated talking points",
"set_as_default": false
}'
You can keep multiple saved analyses for the same category and period bucket.
Examples:
If you leave title/description empty, the generation behaves like a generic default analysis.
If a variant is marked as default:
/feedWhen generate_all_languages=true, one generation run creates/updates records for all supported languages in the same request cycle.
Current supported language set:
sv, en, de, fr, es, da, noThe response includes generated_languages so the UI can show exactly which languages were updated.
Each category has its own saved analyst-focus text in /feed-admin.
Both are combined before prompt generation.
Generation updates one record per:
Buckets:
2026-03-22)2026-W11)2026-03)2026)This means:
daily, monthly, and yearly (same variant + same bucket => replace/update existing row)In /feed-admin, you can also generate analyses per site/feed (not only per category).
Site generation endpoint:
POST /feed-admin/analytics/site/generate
Main fields:
site_urlid (required)period, model, language, variant_title, tone, variant_descriptionwatch_for (global analyst focus)site_watch_for (site-specific focus)watch_for and site_watch_for are combined in the prompt.
This makes it possible to keep separate site assessments for daily/weekly/monthly/yearly windows.
GET /api/rss/feed/{selector} now supports:
analytics-daily (alias daily-analytics)analytics-weekly (alias weekly-analytics)analytics-monthly (alias monthly-analytics)analytics-yearly (alias yearly-analytics)analytics-bulk (alias bulk-analytics) for combined daily/weekly/monthly/yearly outputSelector entries are also discoverable from GET /api/rss in urls[].
On /feed, category analytics can expose multiple saved variants through a dropdown.
Each option can reflect:
The selected analysis is rendered directly in the browser, and long analyses can be expanded with Read more / Show less.
The analysis prompt can now include:
watch_for)Analytics content is stored as markdown and rendered as HTML in:
/feed-admin/rss/feedwatch_for to steer the model toward specific concerns.variant_title and variant_description when you want a reusable named analysis.set_as_default if that variant should be the first public choice.