MTGDB adalah alat yang ditulis di Go untuk membuat dan mengisi database dengan semua kartu ajaib yang tersedia dari Scryfall. MTGDB juga mengunduh gambar setiap kartu.
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
Sebelum menggunakan MTGDB, Anda harus mengatur 2 variabel lingkungan (juga .env
File Works):
DB_CONNECTION
-> string koneksi database (contoh user@tcp(127.0.0.1:3306)/mtgdb?charset=utf8mb4&parseTime=True
)DATA_PATH
-> path di mana unduhan aset seperti gambar kartu (contoh ./data
)Pertama kali Anda menjalankan MTGDB, itu akan bermigrasi juga database yang membuat tabel.
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
Jika Anda memiliki masalah, silakan tambahkan masalah di GitHub atau garpu proyek dan kirim permintaan tarik.
Hak Cipta (C) 2020 Enrico Pilotto (@pioz). Lihat lisensi untuk detailnya.