annotation_specs import#
Description#
アノテーション仕様の情報をJSON形式でインポートします。
annotation_specs export コマンドで出力したJSONを利用できます。
ラベルの削除など既存アノテーションに影響する変更の場合は、デフォルトではインポートできません。
既存アノテーションに影響することを理解した上でアノテーション仕様を変更する場合は、 --allow_affecting_annotations を指定してください。
Examples#
基本的な使い方#
$ annofabcli annotation_specs import --project_id prj1 --annotation_specs_json_file annotation_specs.json
annotation_specs export と組み合わせる場合#
$ annofabcli annotation_specs export --project_id src_prj --output annotation_specs.json --format pretty_json
$ annofabcli annotation_specs import --project_id dest_prj --annotation_specs_json_file annotation_specs.json
既存アノテーションに影響する変更を許可する場合#
$ annofabcli annotation_specs import --project_id prj1 --annotation_specs_json_file annotation_specs.json --allow_affecting_annotations
Usage Details#
アノテーション仕様の情報をJSON形式でインポートします。
usage: annofabcli annotation_specs import [-h] [--yes]
[--endpoint_url ENDPOINT_URL]
[--annofab_user_id ANNOFAB_USER_ID]
[--annofab_password ANNOFAB_PASSWORD]
[--annofab_pat ANNOFAB_PAT]
[--logdir LOGDIR] [--disable_log]
[--debug] -p PROJECT_ID
--annotation_specs_json_file
ANNOTATION_SPECS_JSON_FILE
[--comment COMMENT]
[--allow_affecting_annotations]
Named Arguments#
- -p, --project_id
対象のプロジェクトのproject_idを指定します。
- --annotation_specs_json_file
インポートするアノテーション仕様JSONファイルを指定します。
annotation_specs exportコマンドで出力したJSONファイルを指定してください。- --comment
アノテーション仕様の変更内容を説明するコメント。未指定の場合、自動でコメントが生成されます。
- --allow_affecting_annotations
指定すると、既存アノテーションに影響する変更でもアノテーション仕様をインポートします。
global optional arguments#
- --yes
処理中に現れる問い合わせに対して、常に
yesと回答します。- --endpoint_url
Annofab WebAPIのエンドポイントを指定します。
Default:
'https://annofab.com'- --annofab_user_id
Annofabにログインする際のユーザーID
- --annofab_password
Annofabにログインする際のパスワード
- --annofab_pat
Annofabにログインする際のパーソナルアクセストークン
- --logdir
ログファイルを保存するディレクトリを指定します。
Default:
.log- --disable_log
ログを無効にします。
- --debug
HTTPリクエストの内容やレスポンスのステータスコードなど、デバッグ用のログが出力されます。