Exemplo n.º 1
0
                    #print(ncoord)
            if event == "Severe Thunderstorm Warning":
                color = "\"#f4ec04\""
            elif event == "Tornado Warning":
                color = "\"#e20202\""
            elif event == "Flood Warning":
                color = "\"#048202\""
            elif event == "Flash Flood Warning":
                color = "\"#08f404\""
        else:
            ncoord = ''
            color = "\"#ffffff\""

        for myevent in alerts.evs:
            if myevent == event:
                states = alerts.getZones(geoCodes)
                states = alerts.format_states(states)
                print(
                    template.render(coords=ncoord,
                                    color=color,
                                    instruction=instruction,
                                    description=description,
                                    i=i,
                                    ids=ids,
                                    cssClass=event,
                                    headline=headline,
                                    expires=expires,
                                    areaDesc=areaDesc,
                                    event=event,
                                    new="new",
                                    state=states))