Skip to content

Commit

Permalink
add winners to database & fix open error
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeldaZach committed Aug 18, 2018
1 parent fcab763 commit 14ea48c
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ build/
dist/
*.pyc
*.csv
winners/
.*_cache/
.tox/
test_results/
2 changes: 1 addition & 1 deletion ScryfallCardGolf/card_golf.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def download_and_save_card_images(cards: List[Dict[str, Any]]) -> None:
for card in cards:
card_image_url: str = card['image_uris']['png']
request_image = download_contents(card_image_url, 'image')
with open(os.path.join(TEMP_CARD_DIR, '{}.png'.format(card['name'].replace('//', '_')), 'wb')) as out_file:
with open(os.path.join(TEMP_CARD_DIR, '{}.png'.format(card['name'].replace('//', '_'))), 'wb') as out_file:
shutil.copyfileobj(request_image.raw, out_file)
logging.info('Saving image of card {}'.format(card['name']))

Expand Down
12 changes: 12 additions & 0 deletions winners/winners_2018-08-14_23:30:58.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"length": 35,
"name": "DoubleFried",
"query": "name:/^w.{9}$/ o:/re.... .*ar.\\./ d"
},
{
"length": 62,
"name": "charlequin",
"query": "name:/^w.*d/ name:/r.?.?$/ c:w o:han a:i r e year<2009 t:/r.$/"
}
]
12 changes: 12 additions & 0 deletions winners/winners_2018-08-15_23:41:51.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"length": 32,
"name": "cjcsuhta",
"query": "o:+ ft:/\u2014[rk]a.*?a.*?d/ ft:/d\\./"
},
{
"length": 41,
"name": "charlequin",
"query": "o:gets a:p ci:gb ft:/w.{4,6}i.{4,6}d/ t:r"
}
]
37 changes: 37 additions & 0 deletions winners/winners_2018-08-16_02:15:00.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[
{
"length": 25,
"name": "AlexisJanson",
"query": "is:promo a:j t:en in ne d"
},
{
"length": 30,
"name": "DelverGoGaming",
"query": "is:promo a:j a:el ne -c:c -a:k"
},
{
"length": 34,
"name": "Avangrd",
"query": "is:promo a:j o:/hat.{26,29}\\./ ne "
},
{
"length": 37,
"name": "charlequin",
"query": "name:/in.{2,5}o..$/ t:en a:j is:promo"
},
{
"length": 40,
"name": "DoubleFried",
"query": "is:promo name:/i.*in.* .?o..$/ o:arg t:c"
},
{
"length": 43,
"name": "charlequin",
"query": "a:j is:prere name:/i.*in.*o/ type:/en.*a.t/"
},
{
"length": 53,
"name": "Franckie__",
"query": "o is:promo id:rb -c:C a:j a:el ( o:target o:\"to the\")"
}
]
42 changes: 42 additions & 0 deletions winners/winners_2018-08-16_20:40:01.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[
{
"length": 14,
"name": "NilsEnevoldsen",
"query": "ft:/rp.*ar\./h"
},
{
"length": 15,
"name": "DoubleFried",
"query": "ft:/rp.*ar\./ h"
},
{
"length": 16,
"name": "Nobodi64",
"query": "ft:ar. ft:rp c:r"
},
{
"length": 16,
"name": "TTMiguelTT",
"query": "ft:/ds.*ay.*har/"
},
{
"length": 16,
"name": "NilsEnevoldsen",
"query": "ft:/k.*rp.*ar\./"
},
{
"length": 21,
"name": "DoubleFried",
"query": "name:/a.h/ ft:/ar\.$/"
},
{
"length": 22,
"name": "distilledhijinx",
"query": "ft:ar. o:en ft:way c:r"
},
{
"length": 53,
"name": "patricklickman",
"query": "c:r o:er -t:an -o:ny ft:ay ft:ar ft:is date>2013 -o:,"
}
]

0 comments on commit 14ea48c

Please sign in to comment.