Browse Source

Removing UF code to cities to json

master
GabrielTrettel 3 years ago
parent
commit
3f5dd36348
  1. 54
      src/app/assets/cities_states.js
  2. 2
      utils/cities_to_JSON.py

54
src/app/assets/cities_states.js

@ -1,31 +1,31 @@
const states = [
{ value: "AC", label: "Acre (AC)" },
{ value: "AL", label: "Alagoas (AL)" },
{ value: "AM", label: "Amazonas (AM)" },
{ value: "AP", label: "Amapá (AP)" },
{ value: "BA", label: "Bahia (BA)" },
{ value: "CE", label: "Ceará (CE)" },
{ value: "DF", label: "Distrito Federal (DF)" },
{ value: "ES", label: "Espírito Santo (ES)" },
{ value: "GO", label: "Goiás (GO)" },
{ value: "MA", label: "Maranhão (MA)" },
{ value: "MG", label: "Minas Gerais (MG)" },
{ value: "MS", label: "Mato Grosso do Sul (MS)" },
{ value: "MT", label: "Mato Grosso (MT)" },
{ value: "PA", label: "Pará (PA)" },
{ value: "PB", label: "Paraíba (PB)" },
{ value: "PE", label: "Pernambuco (PE)" },
{ value: "PI", label: "Piauí (PI)" },
{ value: "PR", label: "Paraná (PR)" },
{ value: "RJ", label: "Rio de Janeiro (RJ)" },
{ value: "RN", label: "Rio Grande do Norte (RN)" },
{ value: "RO", label: "Rondônia (RO)" },
{ value: "RR", label: "Roraima (RR)" },
{ value: "RS", label: "Rio Grande do Sul (RS)" },
{ value: "SC", label: "Santa Catarina (SC)" },
{ value: "SE", label: "Sergipe (SE)" },
{ value: "SP", label: "São Paulo (SP)" },
{ value: "TO", label: "Tocantins (TO)" },
{ value: "AC", label: "Acre" },
{ value: "AL", label: "Alagoas" },
{ value: "AM", label: "Amazonas" },
{ value: "AP", label: "Amapá" },
{ value: "BA", label: "Bahia" },
{ value: "CE", label: "Ceará" },
{ value: "DF", label: "Distrito Federal" },
{ value: "ES", label: "Espírito Santo" },
{ value: "GO", label: "Goiás" },
{ value: "MA", label: "Maranhão" },
{ value: "MG", label: "Minas Gerais" },
{ value: "MS", label: "Mato Grosso do Sul" },
{ value: "MT", label: "Mato Grosso" },
{ value: "PA", label: "Pará" },
{ value: "PB", label: "Paraíba" },
{ value: "PE", label: "Pernambuco" },
{ value: "PI", label: "Piauí" },
{ value: "PR", label: "Paraná" },
{ value: "RJ", label: "Rio de Janeiro" },
{ value: "RN", label: "Rio Grande do Norte" },
{ value: "RO", label: "Rondônia" },
{ value: "RR", label: "Roraima" },
{ value: "RS", label: "Rio Grande do Sul" },
{ value: "SC", label: "Santa Catarina" },
{ value: "SE", label: "Sergipe" },
{ value: "SP", label: "São Paulo" },
{ value: "TO", label: "Tocantins" },
];

2
utils/cities_to_JSON.py

@ -12,7 +12,7 @@ def main():
JSON = "const states = [\n"
for name, _ in uf_to_city:
UF, state_name = name
JSON += "\t\t"+O_OBJ+ " value: \"" +UF+"\", " + "label: \"" + f"{state_name} ({UF})" + "\" " + C_OBJ + ",\n"
JSON += "\t\t"+O_OBJ+ " value: \"" +UF+"\", " + "label: \"" + f"{state_name}" + "\" " + C_OBJ + ",\n"
JSON += "];"

Loading…
Cancel
Save