annotation dump#
Description#
指定したタスク配下のアノテーション情報をディレクトリに保存します。アノテーションのバックアップなどに利用できます。
Examples#
基本的な使い方#
--task_id
に出力対象のタスクのtask_idを指定して、 --output_dir
に出力先ディレクトリのパスを指定してください。
$ annofabcli annotation dump --project_id prj1 --task_id file://task.txt --output_dir backup-dir/
出力先ディレクトリの構成は以下の通りです。
{input_data_id}.json
のフォーマットは、https://annofab.com/docs/api/#operation/getEditorAnnotation APIのレスポンスと同じです。
ルートディレクトリ/
├── {task_id}/
│ ├── {input_data_id}.json
│ ├── {input_data_id}/
│ ├── {annotation_id}............ 塗りつぶしPNG画像
アノテーション情報の復元は、 annofabcli annotation restore コマンドで実現できます。
Usage Details#
指定したタスク配下のアノテーション情報をディレクトリに保存します。アノテーションをバックアップしたいときなどに利用できます。
usage: annofabcli annotation dump [-h] [--yes] [--endpoint_url ENDPOINT_URL]
[--annofab_user_id ANNOFAB_USER_ID]
[--annofab_password ANNOFAB_PASSWORD]
[--logdir LOGDIR] [--disable_log] [--debug]
-p PROJECT_ID -t TASK_ID [TASK_ID ...] -o
OUTPUT_DIR [--parallelism PARALLELISM]
Named Arguments#
- -p, --project_id
対象のプロジェクトのproject_idを指定します。
- -t, --task_id
対象のタスクのtask_idを指定します。
file://
を先頭に付けると、task_idの一覧が記載されたファイルを指定できます。- -o, --output_dir
出力先ディレクトリのパス
- --parallelism
並列度。指定しない場合は、逐次的に処理します。
global optional arguments#
- --yes
処理中に現れる問い合わせに対して、常に
yes
と回答します。- --endpoint_url
Annofab WebAPIのエンドポイントを指定します。
Default: "https://annofab.com"
- --annofab_user_id
Annofabにログインする際のユーザーID
- --annofab_password
Annofabにログインする際のパスワード
- --logdir
ログファイルを保存するディレクトリを指定します。
Default: .log
- --disable_log
ログを無効にします。
- --debug
HTTPリクエストの内容やレスポンスのステータスコードなど、デバッグ用のログが出力されます。