annotation_specs list_attribute_restriction

Description

アノテーション仕様の属性の制約情報を出力します。

Examples

基本的な使い方

属性の制約を自然言語で出力します。

$ annofabcli annotation_specs list_attribute_restriction --project_id prj1
'comment' DOES NOT EQUAL ''
'comment' MATCHES '[abc]+'
'comment' MATCHES '[0-9]' IF 'unclear' EQUALS 'true'
'type' EQUALS 'b690fa1a-7b3d-4181-95d8-f5c75927c3fc' IF 'unclear' EQUALS 'true'
'link' HAS LABEL 'bike', 'bus'

--format detaield_text を指定すると、属性IDなどの詳細情報も出力されます。

$ annofabcli annotation_specs list_attribute_restriction --project_id prj1 --format detailed_text
'comment' (id='54fa5e97-6f88-49a4-aeb0-a91a15d11528', type='comment') DOES NOT EQUAL ''
'comment' (id='54fa5e97-6f88-49a4-aeb0-a91a15d11528', type='comment') MATCHES '[abc]+'
'comment' (id='54fa5e97-6f88-49a4-aeb0-a91a15d11528', type='comment') MATCHES '[0-9]' IF 'unclear' (id='f12a0b59-dfce-4241-bb87-4b2c0259fc6f', type='flag') EQUALS 'true'
'type' (id='71620647-98cf-48ad-b43b-4af425a24f32', type='select') EQUALS 'b690fa1a-7b3d-4181-95d8-f5c75927c3fc'(name='medium') IF 'unclear' (id='f12a0b59-dfce-4241-bb87-4b2c0259fc6f', type='flag') EQUALS 'true'
'link' (id='15235360-4f46-42ac-927d-0e046bf52ddd', type='link') HAS LABEL 'bike' (id='40f7796b-3722-4eed-9c0c-04a27f9165d2'), 'bus' (id='22b5189b-af7b-4d9c-83a5-b92f122170ec')

Usage Details

アノテーション仕様の属性の制約情報を出力します。

usage: annofabcli annotation_specs list_attribute_restriction
       [-h] [--yes] [--endpoint_url ENDPOINT_URL] [--logdir LOGDIR]
       [--disable_log] [--debug] -p PROJECT_ID
       [--history_id HISTORY_ID | --before BEFORE]
       [--attribute_name ATTRIBUTE_NAME [ATTRIBUTE_NAME ...]]
       [--label_name LABEL_NAME [LABEL_NAME ...]] [-o OUTPUT]
       [-f {text,detailed_text}]

Named Arguments

-p, --project_id

対象のプロジェクトのproject_idを指定します。

--history_id

出力したいアノテーション仕様のhistory_idを指定してください。 history_idは annotation_specs list_history コマンドで確認できます。 指定しない場合は、最新のアノテーション仕様が出力されます。

--before

出力したい過去のアノテーション仕様が、最新よりいくつ前のアノテーション仕様であるかを指定してください。 たとえば 1 を指定した場合、最新より1個前のアノテーション仕様を出力します。 指定しない場合は、最新のアノテーション仕様が出力されます。

--attribute_name

指定した属性名(英語)の属性の制約を出力します。

--label_name

指定したラベル名(英語)のラベルに紐づく属性の制約を出力します。

-o, --output

出力先のファイルパスを指定します。未指定の場合は、標準出力に出力されます。

-f, --format

Possible choices: text, detailed_text

出力フォーマット

  • text: 英語名のみ出力する形式

  • detailed_text: 属性IDや属性種類などの詳細情報を出力する形式

Default: "text"

global optional arguments

--yes

処理中に現れる問い合わせに対して、常に yes と回答します。

--endpoint_url

Annofab WebAPIのエンドポイントを指定します。

Default: "https://annofab.com"

--logdir

ログファイルを保存するディレクトリを指定します。

Default: .log

--disable_log

ログを無効にします。

--debug

HTTPリクエストの内容やレスポンスのステータスコードなど、デバッグ用のログが出力されます。