Long-form content that nobody has time to read
Your blog has 200 published posts averaging 2,000 words. A new team member needs to get up to speed on editorial voice and topics you've covered. They're not going to read 400,000 words of archive. A product manager wants a one-page brief on each of the twenty SKUs in a category. Nobody prints every product page. You need a summary, fast, preferably PDF so it travels.
What most people do instead
A better way: one command, summary in PDF
Run ai summarize -post_id=247. TrueCommander reads the post, sends title + content to AI, gets a summary back, renders it as a DOMPDF-generated PDF saved to uploads/tp-ai-pdfs/. The navigator shows a download link. The PDF is portable, shareable, and sized right for a one-page brief.
Post + product together = linked-entity summary. Pass both -post_id AND -product_id and AI receives both contexts. The summary ties the blog post to the product it reviews — ideal for long-form product launches where you want a one-page brief covering both the story and the SKU.
How it works
The handler validates at least one of -post_id or -product_id is provided and numeric. For posts, it pulls post_title + post_content; for products (requires WooCommerce), it pulls name + formatted price. These build a prompt like "Summarize this WordPress blog post: Title: {X}, Content: {Y}". AI returns the summary. The response() method takes over: creates uploads/tp-ai-pdfs/ if needed, builds minimal HTML with the summary text, runs it through DOMPDF (bundled in the plugin — no server package needed), saves as summary-{id}-{timestamp}.pdf, returns the download URL.
uploads/tp-ai-pdfs/summary-{id}-{timestamp}.pdf. Download link in the navigator output.| Parameter | Value |
|---|---|
-post_id | WordPress post ID — required if -product_id is not provided |
-product_id | WooCommerce product ID — required if -post_id is not provided. Both can be used together. |
| Output file | PDF saved to uploads/tp-ai-pdfs/ with timestamped filename — URL returned in navigator |
| PDF engine | DOMPDF, bundled with the plugin — no external service, no server-side package required |
| Requires | WooCommerce is only needed if -product_id is used — post-only summaries work without it |
| Can be used in |
Real example
You hired a new content editor. You want them to read your archive — but you have 200 posts totalling 400,000 words. You build a macro: filter post -status=publish -category=editorial → for_each: ai summarize -post_id={{item.id}} → collect every pdf_url. Run it Friday afternoon.
Monday morning, the new editor has 200 one-page PDFs in a folder. They skim 200 summaries in two hours instead of reading 400,000 words in two weeks. They show up to the first editorial meeting with actual opinions on your voice and prior coverage.
Goes further with TrueCommander
pdf_url from a summarize step into send template email. Stakeholders get a PDF, not a link.generate-pdf using the template builder. Summary becomes the body.filter post into a for_each summarize. One macro run generates a folder of summaries.