xwp / stream

🗄️ Stream plugin for WordPress

Home Page:https://wordpress.org/plugins/stream/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduce WP-CLI stream command

westonruter opened this issue · comments

It would be really cool if Stream data could be queried via WP-CLI, and if settings could be updated.

For example, there should be a wp stream log command that takes the filter arguments like --author=1 or --context=sidebars.

Also, a cool use case would be something like wp stream log --tail which would output a continual stream of entries as they come in. The PHP process would keep running until Ctrl-C. Basically like Heartbeat on the command line. You could then pipe the results into something else.

Not sure how this would mesh with the Stream Data Exporter plugin, i.e. which would be responsible for what.

@westonruter Can't see an intersection unless you're talking about a wp stream export command.

Just that wp stream log really would do the exact same thing as the exporter, but just at the CLI level.

I've created a Query Reference in our Wiki that can be used as a guide when using the WP-CLI command.

Released in 2.0.3

Could you please include the Query Ref. as PHP-doc?
E.g. https://github.com/wp-cli/wp-cli/blob/master/php/commands/post.php#L218-L278

Hi @szepeviktor, thanks for the suggestion.

Would you be willing to provide a pull request for this?

We have Query Parameters documented in the wiki. Otherwise we will just add these to the docblock when we get around to it.