{"id":18432217,"url":"https://github.com/jaywood/jw-wpcli-random-posts","last_synced_at":"2025-04-07T18:33:31.302Z","repository":{"id":150107845,"uuid":"58835934","full_name":"JayWood/jw-wpcli-random-posts","owner":"JayWood","description":"A robust random post generator for WP CLI which supports multisite, post types, post counts, taxonomies, terms, term counts and featured images. Complete with a cleanup command to undo it all!","archived":false,"fork":false,"pushed_at":"2023-06-16T15:59:40.000Z","size":68,"stargazers_count":57,"open_issues_count":3,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-31T04:34:53.326Z","etag":null,"topics":["lorem-ipsum","multisite","wordpress","wp-cli"],"latest_commit_sha":null,"homepage":"http://plugish.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JayWood.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-05-15T00:06:49.000Z","updated_at":"2024-06-17T20:06:02.000Z","dependencies_parsed_at":"2024-01-15T16:30:34.807Z","dependency_job_id":"6b0a3867-6204-4800-bb6d-3f983a01639e","html_url":"https://github.com/JayWood/jw-wpcli-random-posts","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayWood%2Fjw-wpcli-random-posts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayWood%2Fjw-wpcli-random-posts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayWood%2Fjw-wpcli-random-posts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayWood%2Fjw-wpcli-random-posts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JayWood","download_url":"https://codeload.github.com/JayWood/jw-wpcli-random-posts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223289385,"owners_count":17120622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lorem-ipsum","multisite","wordpress","wp-cli"],"created_at":"2024-11-06T05:27:54.392Z","updated_at":"2024-11-06T05:27:54.883Z","avatar_url":"https://github.com/JayWood.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WP CLI Random Posts Generator\n\nThis WP CLI posts generator, unlike the core generator in WP CLI, supports the following:\n\n* Terms\n* Term Counts\n* Taxonomies\n* Post Types\n* Post Counts\n* Post Author\n* Post Status\n* Featured Images\n* Image Download sizes\n* Multi-site ( specify site id if necessary )\n\n**NEW** - using `wp jw-random cleanup \u003coptions\u003e` this script now cleans up after itself.\n\n\u003e Thanks to @fzaninotto for the [Faker](https://github.com/fzaninotto/Faker) library.\n\n## What this does NOT do\nCurrently this CLI command does not support meta-data, mainly due to the amount of commands you would need to run for large sites. Still a great script if you need to generate some placeholder posts fast, especially with featured images and terms.\n\n## Installation\nInstalling the random post generator is SUPER easy, for the latest and greatest, do the following:\n* `wp package install jaywood/jw-wpcli-random-posts:dev-master`\n\nIf you'd like a specific version, say 2.0, it's this simple:\n* `wp package install jaywood/jw-wpcli-random-posts:2.0`\n\n## Sample Commands\n\n### Generate 50 posts, no feature image\nPossibly the simplest way to use the generator.\n* `wp jw-random generate 50`\n\n### Create 10 posts with featured business images for an author\nFirst find the author you want to attach the Post to\n* `wp user list`\n\nNow you know the author ID just use the `--author` flag like so:\n* `wp jw-random generate 10 --author=13 --featured-image`\n\nThe author field also supports **slug** ( login ), and **email**.\n\n### Create 10 posts with categories, tags, and featured images ( the usual stuff )\n_( `--term-count` tells the script to also add 15 terms to each taxonomy )_\n* `wp jw-random generate 10 --featured-image --taxonomies=category,post_tag --term-count=15`\n\n### Clean up posts, terms, and media that was generated\n_( `--force-delete` permanently deletes posts and media instead of just trashing them )_\n* `wp jw-random cleanup --tax=post_tag,category --force-delete`\n\n## Options\n\nIn the interest of keeping this readme slim, all options have been moved [to the Wiki](https://github.com/JayWood/jw-wpcli-random-posts/wiki).\n\n## Changelog\n\n### 2.0\n* A bit of house cleaning.\n* Moved generate and cleanup commands to separate files.\n* Renamed a lot of CLI arguments to make more sense.\n* Now using the Faker library instead of relying on API calls.\n* Author now supports email, slug ( login ), or ID.\n* Removed the media flag, no sense in having it if post type is empty it defaults to all.\n* Removed the `--site` option, use `--url` instead.\n* Made use of `md5_file()` to prevent image duplication within the media library.\n\n### 1.4\n* Removed some CLI default values causing the script to complain when it shouldn't have.\n* Cleaned up get_post_content() a bit.\n* Ignore some PHPCS complaints about @unlink\n* Small message updates.\n* Some PHPCS fixes ( alignment, assignments, etc.. )\n\n### 1.3\n* Changed ipsum generator to loripsum.net, fixes #11\n* Update API url for random word getter ( setgetgo )\n* Remove dependancy on exif PHP library.\n\n### 1.2\n* Fixed - [#6](https://github.com/JayWood/jw-wpcli-random-posts/issues/6) - Error message duplication\n* Fixed - [#10](https://github.com/JayWood/jw-wpcli-random-posts/issues/10) - Removed a lot of log messages, added progress bars in their place.\n* Changed - `posts` command to `generate` - makes more sense.\n* Remove the flag `--n` for specfying post count, make post count required positional argument instead.\n* Significant readme updates.\n\n### 1.1\n* Fixed possible bug with `post_type_exists` checks on multisite installs.\n* Added cleanup method to allow users to undo/remove posts, terms, and media that was added via this generator. _This is not backwards compatible, with earlier versions, sorry guys!_\n* Added `post_status` flag for generating posts, you can now set your own status.   \n**Note:** status does not validate, so you can technically set this to anything, its up to you as a developer to expose custom statuses in the admin.\n* Added taxonomy validation: Script will now validate if a taxonomy is even registered, and allow you to continue if you want.\n\n### 1.0\nInitial Release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaywood%2Fjw-wpcli-random-posts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaywood%2Fjw-wpcli-random-posts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaywood%2Fjw-wpcli-random-posts/lists"}