MTGDBは、Scryfallから利用可能なすべてのマジックThe Gatheringカードを作成して入力するためにGoで作成されたツールです。 MTGDBは、各カードの画像もダウンロードします。
go install github.com/pioz/mtgdb/cmd/mtgdb@latest
mtgdb -h
git clone github.com/pioz/mtgdb
cd mtgdb
# go test
go build -o mtgdb ./cmd/mtgdb/main.go
./mtgdb -h
MTGDBを使用する前に、2つの環境変数を設定する必要があります( .env
ファイルが機能します):
DB_CONNECTION
>データベース接続文字列(例user@tcp(127.0.0.1:3306)/mtgdb?charset=utf8mb4&parseTime=True
)DATA_PATH
>カード画像のような資産をダウンロードするパス(例./data
)MTGDBを初めて実行すると、テーブルを作成するデータベースも移行します。
mtgdb -h
Usage of mtgdb:
-download-concurrency int
Set max download concurrency
-en
Download card images only in EN language (default true)
-f Force re-download of card images
-fsha1
Force re-download of card images, but only if the sha1sum is changed
-ftime
Force re-download of card images, but only if the modified date is older
-h Print this help
-only string
Import some sets (es: -only eld,war)
-p Display progress bar
-skip-assets
Skip download of set and card images
-u Update Scryfall database
問題がある場合は、GitHubに問題を追加するか、プロジェクトをフォークして、プルリクエストを送信してください。
Copyright(c)2020 Enrico Pilotto(@pioz)。詳細については、ライセンスを参照してください。