ttskch/esa-cli

esa 命令行客户端

安装: 1

依赖项: 0

建议者: 0

安全: 0

星级: 1

关注者: 3

分支: 0

公开问题: 0

类型:项目

dev-master / 1.0.x-dev 2018-04-18 06:41 UTC

This package is not auto-updated.

Last update: 2024-09-15 03:55:11 UTC


README

要求

  • PHP 7.1.3+

安装

$ 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

使用方法

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

有关 -s 查询的更多信息,请参阅:https://docs.esa.io/posts/104

diff

仅打印 diff url 的 post,因为 esa 尚未提供修订 API

$ 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