alleyinteractive / alleyinteractive/wp-seo
Meta Description Generator: CLI Command
- Ngôn ngữ chính
- PHP
- Star
- 45
- Fork
- 13
- Merge trung bình
- 12 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 5
Mô tả
### Description
>[!TIP]
>[Meta Description Generator feature reference document for Alley devs](https://l.alley.dev/0e3715e20a)
Set up a CLI command to generate meta descriptions for posts in bulk. It should loop through posts, find any without a meta description (meta key is not set or empty), generate them, and update the post.
The CLI command:
- Should have a **query parameter** to allow the user to configure the WP_Query for posts it should query. By default, it will query all public post types with show_ui true. This should be filterable (this same functionality is used in the post admin component).
- Should have a **limit parameter** that defaults to 100, so that posts are processed in batches, not all at once. Only a number value should be allowed (e.g. no "all"). This should also be filterable.
- Should have a **fault tolerance parameter** (default 5%) which is filterable. Utilize it and the limit command parameter to check how many errors occurred in a batch of requests. If a certain number of bad responses are received, the command exits and the user is notified.
- Should prompt the LLM for one description, and if the response is good, it should update the post meta description and move on.
- Should handle a warning/error response from the LLM query and prevent bad data from being written to the database. If bad data is received (empty response, bad status code, timeout, over quota, too many characters, etc.), log the post and warning/error and continue without updating the post.
- If the AI Connector reports that the user is over quota or has made too many requests in too short a period, the command should exit rather than trying to process additional posts.
### Use Case
When a developer would like to generate meta descriptions for a posts without them, they should be able to do so via the CLI.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.