MTGDB는 GO에 작성된 도구로 Scryfall에서 이용할 수있는 모든 Magic과 함께 데이터베이스를 만들고 채 웁니다. 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에 문제를 추가하거나 프로젝트를 포크하고 풀 요청을 보내십시오.
저작권 (C) 2020 Enrico Pilotto (@pioz). 자세한 내용은 라이센스를 참조하십시오.