10kticketstat 中文文档教程

发布于 5年前 浏览 15 项目主页 更新于 3年前

10kticketstat

基于与票证模式匹配的时间条目聚合 10000ft.com (10K) 统计数据的脚本

Prerequisites

  1. Node.js
  2. A 10000ft.com API key

Installation

npm install --global 10kticketstat

Usage

有关使用详细信息,请运行 10kticketstat 不带参数:

% 10kticketstat

usage: 10kticketstat projectId outputPath apiKey
       [--api-url] [--start-iso-date] [--end-iso-date] [--ticket-pattern]

为了减少过度下载,--start-iso-date 默认为脚本运行前一年。

projectId 是任何项目或项目阶段的 ID。 当您导航到 Projects > [项目]> 工作清单> [Phase] 在 Web 界面中,URL 应如下所示:

https://app.10000ft.com/projects/1401981/worklist/phase/1401987

在本例中,1401981 是项目,1401987 是阶段。 请注意,记录到该阶段的任何小时数都不会包含在整个项目的结果中。 如果您需要跨多个阶段的数据,则由您来聚合该数据。

这是一个带有参数的示例:

% 10kticketstat 1401987 ~/Desktop $TENK_API_KEY

Downloaded data chunk #1 from 10K.
Downloaded data chunk #2 from 10K.
Downloaded data chunk #3 from 10K.
Downloaded data chunk #4 from 10K.
Downloaded data chunk #5 from 10K.
Downloaded data chunk #6 from 10K.
Download complete.
Done. Analysis saved to: /Users/adamshaylor/Desktop/10kticketstat.csv

我之前将 API 密钥存储为环境变量 $TENK_API_KEY。 如果您愿意,可以替换实际的原始密钥。 输出应如下所示:

'test'

10kticketstat

A script to aggregate 10000ft.com (10K) statistics based on time entries matching a ticket pattern

Prerequisites

  1. Node.js
  2. A 10000ft.com API key

Installation

npm install --global 10kticketstat

Usage

For usage details, run 10kticketstat without arguments:

% 10kticketstat

usage: 10kticketstat projectId outputPath apiKey
       [--api-url] [--start-iso-date] [--end-iso-date] [--ticket-pattern]

To mitigate excessive downloads, --start-iso-date defaults to one year prior to the moment the script is run.

The projectId is the id for any project or phase of a project. When you navigate to Projects > [Project] > Worklist > [Phase] in the web interface, the URL should look like this:

https://app.10000ft.com/projects/1401981/worklist/phase/1401987

In this case, 1401981 is the project and 1401987 is the phase. Note that any hours logged to the phase will not be included in the results for the project as a whole. It’s up to you to aggregate that data if you need data across multiple phases.

Here’s an example with arguments:

% 10kticketstat 1401987 ~/Desktop $TENK_API_KEY

Downloaded data chunk #1 from 10K.
Downloaded data chunk #2 from 10K.
Downloaded data chunk #3 from 10K.
Downloaded data chunk #4 from 10K.
Downloaded data chunk #5 from 10K.
Downloaded data chunk #6 from 10K.
Download complete.
Done. Analysis saved to: /Users/adamshaylor/Desktop/10kticketstat.csv

I had previously stored the API key as an environment variable $TENK_API_KEY. You can substitute the actual raw key if you prefer. The output should look something like this:

'test'

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文