grep(, sed, etc) command for esa
Switch branches/tags
Nothing to show
Clone or download
Latest commit 734e970 Apr 18, 2018

README.md

esa-cli

Requirements

  • PHP 7.1.3+

Installation

$ composer create-project ttskch/esa-cli:@dev
$ cd esa-cli
$ cp app/parameters.php{.placeholder,}
$ vi app/parameters.php   # tailor to you env
$ ln -s $(pwd)/app/esa /usr/local/bin/esa

Usage

grep

$ esa grep -s 'on:category/subcategory #tag1' -e '^#' -l
category/subcategory/post1:1:# foo
category/subcategory/post1:3:## bar
category/subcategory/post1:5:### baz
category/subcategory/post2:1:# foo
category/subcategory/post2:3:## bar

$ esa grep -h   # see help

Learn about queries for -s at https://docs.esa.io/posts/104

diff

Just print diff url for the post because esa doesn't provide Revision API yet.

$ esa diff <post_id> <base_revision_number>
https://team_name.esa.io/posts/<post_id>/revisions/compare/<compare_revision_number>...<base_revision_number>/diff

$ esa diff -h   # see help

sed

// todo