Skip to content

Instantly share code, notes, and snippets.

@mgratch
Last active August 3, 2018 16:26
Show Gist options
  • Save mgratch/1e06984b3a11c7bd36c65e19b852fee7 to your computer and use it in GitHub Desktop.
Save mgratch/1e06984b3a11c7bd36c65e19b852fee7 to your computer and use it in GitHub Desktop.
create 25 posts with fake yet identical content, using wp-cli, pipes, curl, wget, xargs, npm json
// create 25 posts with fake & identical content
curl http://loripsum.net/api/5 | \
wp post generate --post_content --count=25 --format=ids | \
xargs -d ' ' -I % wp post meta add % _thumbnail_id \
$(wp media import \
$(wget -O - -q -t 1 http://api.giphy.com/v1/gifs/random?api_key=dc6zaTOxFJmzC | \
json data.images.original.url) --porcelain);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment