droath / harvest-toolkit
从命令行界面(CLI)交互 Harvest 时间跟踪服务。
1.0.6
2020-04-19 16:13 UTC
Requires
- php: >=7.2
- php-http/guzzle6-adapter: ^2.0
- symfony/cache: ^3.0|^4.0|^5.0
- symfony/config: ^3.0|^4.0|^5.0
- symfony/console: ^3.0|^4.0|^5.0
- symfony/dependency-injection: ^3.0|^4.0|^5.0
- symfony/yaml: ^3.0|^4.0|^5.0
- wearerequired/harvest-api-php-client: ^0.1.1
Requires (Dev)
- phpmd/phpmd: ^2.8
- squizlabs/php_codesniffer: ^3.0
README
Harvest Toolkit 是一个命令行工具,用于简化时间条目的报告和操作。随着项目的成熟,其责任将不断扩大。请在问题队列中提交功能请求。
快速入门
使用 composer 安装 Harvest Toolkit。
composer global req droath/harvest-toolkit
您需要通过 Harvest 服务进行身份验证。输入您的账户 ID 和 个人 API 令牌。
ht login
命令文档
登录
使用账户 ID 和个人 API 令牌登录到 Harvest 服务。
ht login
选项
--reauthentication: Set if you need to reauthenticate using a different Harvest account.
注意:所有命令都需要先进行身份验证。
时间表调整
调整 Harvest 中存储的时间条目。
ht timesheet:adjust
参数
timespan - The timespan on which to adjust the time sheet. [default: "today"]
选项
--max-hours=MAX-HOURS Set the required amount of hours needed per day. [default: 8]
示例
调整所有从现在到昨天之间的时间条目。
ht timesheet:adjust yesterday
调整所有从现在到 1 周前的时间条目。
ht timesheet:adjust "1 week ago"
时间表报告
显示 Harvest 中存储的所有时间条目。
参数
timespan - The timespan to show the time sheet report for. [default: "today"]
选项
--only-billable Only show time entries that are billable in the report.
--oneline Show the total time entries report in a condensed line.
--copy Copy last output to clipboard (only supported when used with --oneline).
示例
在一行中显示并复制从昨天开始的全部可收费时间条目。
ht timesheet:report yesterday --only-billable --oneline --copy
显示从 1 周前开始的全部可收费/不可收费时间条目。
ht timesheet:report "1 week ago"