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) {
return true
}
// don't include racist cards
return card.content_warning
return false
}
function putIntoMap(data) {

View File

@ -91,11 +91,13 @@ def fetch_special(query):
def to_compact_write_form(smallJson, art_names, response):
fieldsInCard = ['name', 'image_uris', 'content_warning', 'flavor_name', 'reprint', 'frame_effects', 'digital',
'set_type']
fieldsInCard = ['name', 'image_uris', 'flavor_name', 'reprint', 'frame_effects', 'digital', 'set_type']
data = []
# write all fields needed in card
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
if 'illustration_id' not in card or card['illustration_id'] in art_names:
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