Skip to content

Instantly share code, notes, and snippets.

@caraya caraya/README.md
Last active Feb 20, 2019

Embed
What would you like to do?
#!/usr/bin/env bash
file_to_read=`cat $1`
wp @production post create \
--post_content=file_to_read \
--post_title=$2\
#!/usr/bin/env zsh
# Create post with content from given file
# $1 is the file we want to publish
# $2 is the title of the post.
wp @production post create \
--post_content="$(cat $1)" \
--post_title=$2\
#!/usr/bin/env zsh
# Create post with content from given file
# Date it in the future and set the status as a future post
#
# Positional parameters:
# $1 Name of the file
# $2 Title
# $3 Date for the post. Format 2019-02-07
# $4 Time for post. Format 07:00:00
wp @production post create \
--post_content="$(cat $1)" \
--post_title=$2\
--post_status=future \
--post_date="$3 $4"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.