WP Manifestindependent plugin directory
manifest / ai / tldr

TL;DR

Too Long; Didn't Read for your WordPress posts! This plugin generates concise 5×5 summaries (5 bullet points × 5 words max) using Mistral AI.

by Moritz Dittrich · github.com/moritzdittrich/tldr

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/moritzdittrich/tldr/archive/refs/heads/main.zip

Too Long; Didn't Read for your WordPress posts! This plugin generates concise 5×5 summaries (5 bullet points × 5 words max) using Mistral AI.

🎉 Why This Plugin?

Because nobody has time to read long posts! Let AI do the hard work while you:

  • ☕ Sip your coffee
  • 🚀 Focus on creating great content
  • 📈 Watch your engagement grow
  • 😊 Enjoy the compliments on your perfectly summarized posts

TL;DR of this README: Install → Add API key → Use [tl;dr] → Enjoy concise summaries! 🚀

🚀 Installation

Manual Installation

  1. Download the plugin ZIP file
  2. Go to Plugins → Add New → Upload Plugin
  3. Upload the ZIP file
  4. Activate the plugin

After Installation

  1. Go to Settings → TL;DR
  2. Enter your Mistral API key
  3. It will save automatically
  4. Add [tl;dr] shortcode to any post or page

🎯 Features

Feature [tl;dr] [tl;dr_sentence]
Output Format 5 bullet points × 5 words 1 engaging sentence
Max Length ~25 words total ~20 words
Purpose Quick overview Hook reader with compelling summary
HTML Class tldr-summary tldr-sentence
Caching ✅ Yes ✅ Yes
Refresh Option refresh="true" refresh="true"
Template tldr-template.php tldr-sentence-template.php

Key Benefits

  • AI-Powered Summaries: Uses Mistral's advanced AI models
  • One-Time Generation: Each summary created once, stored permanently in database
  • Manual Refresh: Force regenerate with refresh="true" attribute
  • Theme Friendly: Uses your theme's styling with customizable templates
  • No Bloat: Clean, lightweight code
  • Caching: Minimizes API calls, maximizes performance

📝 Usage

Bullet-Point Summary (5×5 Format)

Generate a concise summary with 5 bullet points, each with maximum 5 words:

[tl;dr]

// Force refresh - generate new summary
[tl;dr refresh="true"]

Engaging Sentence

Generate a single engaging sentence that encourages reading (max. 20 words):

[tl;dr_sentence]

// Force refresh - generate new sentence
[tl;dr_sentence refresh="true"]

🔧 Customization

Template Override

Both shortcodes support custom templates:

For [tl;dr] (bullet points):

  1. Copy tldr-template.php to your theme directory
  2. Modify the HTML/CSS
  3. Add filter to functions.php:
    add_filter('tldr_template_path', function($template_path) {
     return get_stylesheet_directory() . '/tldr-template.php';
    });

For [tl;dr_sentence] (engaging sentence):

  1. Copy tldr-sentence-template.php to your theme directory
  2. Modify the HTML/CSS
  3. Add filter to functions.php:
    add_filter('tldr_sentence_template_path', function($template_path) {
     return get_stylesheet_directory() . '/tldr-sentence-template.php';
    });

CSS Styling

Style the outputs with these CSS classes:

  • .tldr-summary - Container for bullet-point summaries
  • .tldr-summary ul - Bullet point list
  • .tldr-summary li - Individual bullet points
  • .tldr-sentence - Container for sentence output

💡 Requirements

  • WordPress 5.0+
  • PHP 7.4+
  • Mistral API key (get one at mistral.ai)
  • cURL enabled on your server

🤔 Frequently Asked Questions

Why only Mistral API?

This plugin is designed specifically for Mistral's API to ensure optimal performance and compatibility. We may add support for other providers in future versions.

How are summaries stored?

Summaries are stored permanently in your WordPress database (wp_tldr_summaries table) for maximum performance. They auto-update when you edit posts.

Can I change the summary format?

Yes! Customize the template file as shown above, or use CSS to style the output to match your theme.

Is my API key secure?

Absolutely. API keys are stored securely in WordPress options and never exposed to the frontend or logged.

📚 Technical Details

  • Database Table: wp_tldr_summaries
  • Caching: Permanent storage, auto-invalidation on post updates
  • Security: Proper escaping, nonce verification, capability checks
  • Performance: One-time API calls, instant loading from database

Author: Moritz Dittrich | Support: sayhello@moritzdittrich.de License: MIT | Contributions: Welcome!

Report Issues | Star on GitHub