MTGDB เป็นเครื่องมือที่เขียนขึ้นเพื่อสร้างและเติมฐานข้อมูลด้วยเวทมนตร์ทั้งหมด The Gathering Cards ที่มีให้จาก Scryfall MTGDB also download the image of each card.
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
Before using MTGDB you have to set 2 environment variables (also .env
file works):
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 หรือส้อมโครงการและส่งคำขอดึง
ลิขสิทธิ์ (c) 2020 Enrico Pilotto (@pioz) ดูใบอนุญาตสำหรับรายละเอียด