Skip to content

A WP plugin to allow viewers of a post click an AI button to generate a TLDR summary with your custom CTA messaging.

License

Notifications You must be signed in to change notification settings

mathetos/tldrwp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TLDRWP - AI-Powered Post Summaries

WordPress Plugin Version WordPress Plugin Downloads WordPress Plugin Rating WordPress PHP License

Automatically generate AI-powered TL;DR summaries for your WordPress posts using the WordPress AI plugin. Perfect for improving reader engagement and content accessibility.

πŸš€ Features

  • πŸ€– AI-Powered Summaries: Leverages the WordPress AI plugin to generate intelligent, contextual summaries
  • ⚑ Automatic Generation: Creates TL;DR summaries automatically when posts are published or updated
  • 🎨 Customizable Display: Choose where and how summaries appear on your site
  • πŸ”Œ Multiple AI Platforms: Works with any AI platform supported by the WordPress AI plugin (OpenAI, Anthropic, Google AI, etc.)
  • πŸ”§ Clean Integration: Seamlessly integrates with your existing WordPress workflow
  • ⚑ Performance Optimized: Lightweight and efficient with conditional loading

πŸ“‹ Requirements

  • WordPress: 6.0 or higher
  • PHP: 7.4 or higher
  • WordPress AI Plugin: Download here

πŸ› οΈ Installation

Method 1: WordPress Admin (Recommended)

  1. Go to Plugins β†’ Add New in your WordPress admin
  2. Search for "TLDRWP"
  3. Click Install Now and then Activate
  4. Install and activate the WordPress AI plugin
  5. Configure your AI credentials in Settings β†’ AI Credentials
  6. Go to Settings β†’ Reading to configure TLDRWP options
  7. Test the connection and start generating summaries!

Method 2: Manual Installation

  1. Download the plugin ZIP file from this repository
  2. Upload the tldrwp folder to /wp-content/plugins/
  3. Activate the plugin through Plugins β†’ Installed Plugins
  4. Follow steps 4-7 from Method 1

πŸ”§ Configuration

Setting Up WordPress AI Plugin

  1. Install and activate the WordPress AI plugin
  2. Go to Settings β†’ AI Credentials
  3. Configure your AI provider credentials (OpenAI, Anthropic, Google AI, etc.)
  4. The WordPress AI plugin automatically selects the best available provider and model
  5. Save settings

Configuring TLDRWP

  1. Navigate to Settings β†’ Reading
  2. Scroll down to the TL;DR Settings section
  3. Configure your TL;DR preferences:
    • Enable on specific post types
    • Customize the default prompt
    • Set button text and descriptions
    • Configure rate limiting
  4. Test your AI connection
  5. Save settings

πŸ“– How It Works

User Publishes Post β†’ TLDRWP Detects New Content β†’ WordPress AI Client Processes Content β†’ AI Platform Generates Summary β†’ Summary Displayed on Frontend

🎯 Use Cases

Use Case Description Benefits
Bloggers Improve reader engagement Higher time-on-page, better retention
Content Creators Increase content accessibility Better user experience, wider audience
News Sites Quick content overviews Faster information consumption
Educational Sites Content summaries Better learning outcomes
E-commerce Product description summaries Improved conversion rates

πŸ” Screenshots

Admin Settings

TLDRWP Settings

Frontend Display

Frontend Summary

WordPress AI Plugin Integration

WordPress AI Config

❓ Frequently Asked Questions

What is a TL;DR summary?

TL;DR stands for "Too Long; Didn't Read." It's a brief summary that captures the main points of a longer piece of content, helping readers quickly understand what the content is about.

Do I need the WordPress AI plugin?

Yes, TLDRWP requires the WordPress AI plugin to function. This plugin provides the AI integration capabilities that TLDRWP uses to generate summaries.

Which AI platforms are supported?

TLDRWP works with any AI platform supported by the WordPress AI plugin, including:

  • OpenAI (GPT-3.5, GPT-4)
  • Anthropic (Claude)
  • Google AI (Gemini)
  • And many others

The WordPress AI plugin automatically selects the best available provider and model for optimal performance.

Can I customize how summaries appear?

Yes! You can choose where summaries are displayed and customize their appearance through the plugin settings.

Is my content sent to AI services?

Yes, your post content is sent to the AI service you've configured to generate summaries. Please review your chosen AI service's privacy policy.

Can I edit generated summaries?

Currently, summaries are generated automatically. Future versions may include manual editing capabilities.

How can I track TL;DR generations in analytics?

TLDRWP dispatches a custom JavaScript event tldrwp_generated when a summary is successfully generated. You can listen for this event to track generations in Google Analytics, Plausible, or any other analytics tool.

Google Analytics 4:

document.addEventListener('tldrwp_generated', function(e) {
    gtag('event', 'tldr_generated', {
        article_id: e.detail.articleId,
        article_title: e.detail.articleTitle
    });
});

Plausible Analytics:

document.addEventListener('tldrwp_generated', function(e) {
    plausible('TLDR Generated', {
        props: {
            article_id: e.detail.articleId,
            article_title: e.detail.articleTitle
        }
    });
});

The event includes: articleId, articleTitle, timestamp, and platform data.

πŸ—οΈ Architecture

TLDRWP follows a clean, modular architecture:

tldrwp/
β”œβ”€β”€ includes/
β”‚   β”œβ”€β”€ class-tldrwp.php          # Main plugin class
β”‚   β”œβ”€β”€ class-tldrwp-admin.php    # Admin functionality
β”‚   β”œβ”€β”€ class-tldrwp-public.php   # Frontend functionality
β”‚   β”œβ”€β”€ class-tldrwp-ai-service.php # AI service integration
β”‚   └── class-tldrwp-settings.php # Settings management
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ css/
β”‚   └── js/
β”œβ”€β”€ tldrwp.php                    # Main plugin file
└── readme.txt                    # WordPress.org readme

πŸ§ͺ Testing

To test the plugin:

  1. Enable Debug Mode: Add define('WP_DEBUG', true); to your wp-config.php
  2. Check Logs: Monitor wp-content/debug.log for any errors
  3. Test Connection: Use the "Test Connection" button in settings
  4. Create Test Post: Publish a new post and check for summary generation

🀝 Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Setup

# Clone the repository
git clone https://github.com/mattcromwell/tldrwp.git

# Navigate to the plugin directory
cd tldrwp

# Install dependencies (if any)
composer install

πŸ“ Changelog

[0.1.0] - 2024-01-XX

Added

  • Initial release
  • AI-powered summary generation
  • Integration with WordPress AI plugin
  • Customizable display options
  • Admin settings page
  • Test connection functionality
  • Clean, modular architecture
  • Automatic provider and model selection via WordPress AI Client
  • Styled settings wrapper for better UI

Technical

  • Class-based architecture with component separation
  • Conditional loading for performance optimization
  • Proper WordPress coding standards compliance
  • Comprehensive error handling and debugging
  • WordPress AI Client API integration

πŸ“„ License

This project is licensed under the GPL v2 or later - see the LICENSE file for details.

πŸ™ Acknowledgments

  • WordPress AI Plugin for AI integration capabilities
  • WordPress community for best practices and standards
  • All contributors and beta testers

πŸ“ž Support


Made with ❀️ by Matt Cromwell

WordPress GitHub Website

About

A WP plugin to allow viewers of a post click an AI button to generate a TLDR summary with your custom CTA messaging.

Resources

License

Stars

Watchers

Forks

Packages

No packages published