instruction download

Description

作業ガイドのHTMLファイルをダウンロードします。

Examples

基本的な使い方

$ annofabcli instruction download --project_id prj1 --output_dir out_dir/

作業ガイド画像もダウンロードする場合は、--download_image を指定してください。 その場合、img要素のsrc属性値はローカルの画像を参照します。

$ annofabcli instruction download --project_id prj1 --output_dir out_dir/ --download_image

デフォルトでは最新の作業ガイドをダウンロードします。過去のアノテーション作業ガイドをダウンロードする場合は、--before または --history_id を指定してください。 history_idは、annofabcli instruction list_history コマンドで取得できます。

以下のコマンドは、最新より1つ前の作業ガイドを出力します。

$ annofabcli instruction download --project_id prj1 --before 1

以下のコマンドは、history_idが"xxx"のアノテーション仕様を出力します。

$ annofabcli instruction download --project_id prj1 --history_id xxx

出力結果

htmlファイルのみダウンロードする場合

$ annofabcli instruction download --project_id prj1 --output_dir out_dir
out_dir
└── index.html

画像ファイルもダウンロードする場合

$ annofabcli instruction download --project_id prj1 --output_dir out_dir --download_image
out_dir
├── img
│   ├── aaeeabee-9403-4ad9-a221-16a0c37cdfc0
│   └── d48fb417-8d20-4f00-9c50-d35e27b760e2
│   ...
└── index.html

Usage Details

作業ガイドをダウンロードします。HTMLファイルにはbodyタグの内部が記載されています。

usage: annofabcli instruction download [-h] [--yes]
                                       [--endpoint_url ENDPOINT_URL]
                                       [--logdir LOGDIR] [--disable_log]
                                       [--debug] -p PROJECT_ID
                                       [--history_id HISTORY_ID | --before BEFORE]
                                       [--download_image] -o OUTPUT_DIR

Named Arguments

-p, --project_id

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

--history_id

ダウンロードしたい作業ガイドのhistory_idを指定してください。 history_idは`$ annofabcli instruction list_history`コマンドで確認できます。 指定しない場合は、最新の作業ガイドが出力されます。

--before

ダウンロードしたい作業ガイドが、最新版よりいくつ前の作業ガイドであるかを指定してください。 たとえば`1`を指定した場合、最新より1個前の作業ガイドをダウンロードします。 指定しない場合は、最新の作業ガイドをダウンロードします。

--download_image

作業ガイド画像もダウンロードします。指定した場合、img要素のsrc属性はローカルのファイルを参照するようになります。

-o, --output_dir

出力先ディレクトリのパスを指定してください。

global optional arguments

--yes

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

--endpoint_url

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

Default: "https://annofab.com"

--logdir

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

Default: .log

--disable_log

ログを無効にします。

--debug

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

オーナロールを持つユーザで実行してください。