Changeset 34919


Ignore:
Timestamp:
02/24/21 00:29:11 (2 weeks ago)
Author:
davidb
Message:

Additional metadata now stored

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/voting-excel/xlsx-tocountry-jsonmetadata.py

    r34910 r34919  
    9797    # metadata about the votes cast 'To country'
    9898    tl_rec = to_country_year_votes[0]
     99
    99100    tl_to_country = tl_rec.get('To country')
    100101    tl_year       = tl_rec.get('Year')
    101     # tl_vote_type  = tl_rec.get('Jury or Televoting')
     102    tl_final      = tl_rec.get("(semi-) final") == "f"   
     103
    102104    tl_to_country_id = re.sub(r'\s+', '', tl_to_country) + str(tl_year)
    103    
     105
     106    metadata_array.append({ "name": "Final","content": tl_final })
     107       
    104108    for to_country_year_vote in to_country_year_votes:
    105109        to_country   = to_country_year_vote.get('To country')
     
    134138        metadata_array.append({ "name": "TeleVotesTotal", "content": to_country_tele_total})
    135139                         
    136     # id_to_country = to_country_year_votes[0].get('To country')
    137     # id_to_country = re.sub(r'\s+', '', id_to_country)   
    138     #id_year = to_country_year_votes[0].get('Year');
    139     #id = id_to_country + str(id_year);
    140 
    141140    filename_id = tl_to_country_id + "\\.nul"
    142141
Note: See TracChangeset for help on using the changeset viewer.