removing racist cards upstream

this way we don't have to store the cards in the json
This commit is contained in:
marsteralex 2022-09-09 03:04:08 +02:00
parent 4be4c72362
commit 1c76d79760
6 changed files with 10 additions and 8 deletions

View File

@ -158,8 +158,8 @@ function determineIfSkip(card) {
if (card.flavor_name) { if (card.flavor_name) {
return true return true
} }
// don't include racist cards
return card.content_warning return false
} }
function putIntoMap(data) { function putIntoMap(data) {

View File

@ -91,11 +91,13 @@ def fetch_special(query):
def to_compact_write_form(smallJson, art_names, response): def to_compact_write_form(smallJson, art_names, response):
fieldsInCard = ['name', 'image_uris', 'content_warning', 'flavor_name', 'reprint', 'frame_effects', 'digital', fieldsInCard = ['name', 'image_uris', 'flavor_name', 'reprint', 'frame_effects', 'digital', 'set_type']
'set_type']
data = [] data = []
# write all fields needed in card # write all fields needed in card
for card in response['data']: for card in response['data']:
# do not include racist cards
if 'content_warning' in card and card['content_warning'] == True:
continue
# do not repeat art # do not repeat art
if 'illustration_id' not in card or card['illustration_id'] in art_names: if 'illustration_id' not in card or card['illustration_id'] in art_names:
continue continue

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long