comment list¶
Description¶
コメント一覧を出力します。
Examples¶
基本的な使い方¶
以下のコマンドを実行すると、コメント(検査コメントまたは保留コメント)の一覧が出力されます。
$ annofabcli comment list --project_id prj1 --task_id task1 task2
--comment_type
を指定すると、コメントの種類で絞り込めます。
# 検査コメントを出力
$ annofabcli comment list --project_id prj1 --task_id task1 task2 \
--comment_type inspection
# 保留コメントを出力
$ annofabcli comment list --project_id prj1 --task_id task1 task2 \
--comment_type onhold
デフォルトでは返信コメントも出力されます。返信コメントを除去する場合は、 --exclude_reply
を指定してください。
$ annofabcli comment list --project_id prj1 --task_id task1 task2 \
--exclude_reply
出力結果¶
JSON出力¶
$ annofabcli comment list --format pretty_json --output out.json
[
{
"project_id": "project1",
"task_id": "task1",
"input_data_id": "input_data1",
"comment_id": "comment1",
"phase": "acceptance",
"phase_stage": 1,
"account_id": "account1",
"comment_type": "onhold",
"phrases": [],
"phrase_names_en": [],
"phrase_names_ja": [],
"comment": "画像が間違っている",
"comment_node": {
"data": null,
"annotation_id": "8ec9417b-abef-47ad-af7d-e0a03c680eac",
"label_id": "8ec9417b-abef-47ad-af7d-e0a03c680eac",
"label_name_en": "car",
"label_name_ja": "自動車",
"status": "open",
"_type": "Root"
},
"datetime_for_sorting": "2022-07-05T11:45:21.968+09:00",
"created_datetime": "2022-07-05T11:45:32.88+09:00",
"updated_datetime": "2022-07-05T11:45:32.88+09:00"
},
{
"project_id": "project1",
"task_id": "task1",
"input_data_id": "input_data1",
"comment_id": "comment2",
"phase": "acceptance",
"phase_stage": 1,
"account_id": "account2",
"comment_type": "inspection",
"phrases": [],
"phrase_names_en": [],
"phrase_names_ja": [],
"comment": "枠がずれています",
"comment_node": {
"data": {
"x": 62,
"y": 137,
"_type": "Point"
},
"annotation_id": "8ec9417b-abef-47ad-af7d-e0a03c680eac",
"label_id": "8ec9417b-abef-47ad-af7d-e0a03c680eac",
"label_name_en": "car",
"label_name_ja": "自動車",
"status": "open",
"_type": "Root"
},
"datetime_for_sorting": "2022-07-05T11:45:08.506+09:00",
"created_datetime": "2022-07-05T11:45:32.88+09:00",
"updated_datetime": "2022-07-05T11:45:32.88+09:00"
}
]
Usage Details¶
コメント一覧を出力します。
usage: annofabcli comment list [-h] [--yes] [--endpoint_url ENDPOINT_URL]
[--logdir LOGDIR] [--disable_log] [--debug] -p
PROJECT_ID -t TASK_ID [TASK_ID ...]
[--comment_type {inspection,onhold}]
[--exclude_reply]
[-f {csv,json,pretty_json,comment_id_list}]
[-o OUTPUT] [--csv_format CSV_FORMAT]
Named Arguments¶
- -p, --project_id
対象のプロジェクトのproject_idを指定します。
- -t, --task_id
対象のタスクのtask_idを指定します。
file://
を先頭に付けると、task_idの一覧が記載されたファイルを指定できます。- --comment_type
Possible choices: inspection, onhold
コメントの種類で絞り込みます。
inspection: 検査コメント
onhold: 保留コメント
- --exclude_reply
返信コメントを除外します。
- -f, --format
Possible choices: csv, json, pretty_json, comment_id_list
出力フォーマットを指定します。
Default: "csv"
- -o, --output
出力先のファイルパスを指定します。未指定の場合は、標準出力に出力されます。
- --csv_format
CSVのフォーマットをJSON形式で指定します。
--format
がcsv
でないときは、このオプションは無視されます。file://
を先頭に付けると、JSON形式のファイルを指定できます。 指定した値はpandas.DataFrame.to_csv
の引数として渡されます。
global optional arguments¶
- --yes
処理中に現れる問い合わせに対して、常に
yes
と回答します。- --endpoint_url
Annofab WebAPIのエンドポイントを指定します。
Default: "https://annofab.com"
- --logdir
ログファイルを保存するディレクトリを指定します。
Default: .log
- --disable_log
ログを無効にします。
- --debug
HTTPリクエストの内容やレスポンスのステータスコードなど、デバッグ用のログが出力されます。