-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from datosgobar/279-units_from_json_file
units from json file
- Loading branch information
Showing
4 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
[ | ||
"ARS corrientes", | ||
"ARS", | ||
"ARS/USD", | ||
"Australes", | ||
"Automóviles", | ||
"Becas", | ||
"Beneficiarios", | ||
"Cabezas", | ||
"Cantidad de pasajeros", | ||
"Centavos de dólar por kilogramo", | ||
"Coeficiente", | ||
"Empresas", | ||
"GWh", | ||
"Grados centígrados", | ||
"Habitantes", | ||
"Hectáreas", | ||
"Kbbl/d", | ||
"M3", | ||
"MW", | ||
"Metros cúbicos", | ||
"Metros", | ||
"Miles de M2", | ||
"Miles de USD CIF", | ||
"Miles de USD FOB", | ||
"Miles de UTEq", | ||
"Miles de cabezas", | ||
"Miles de dólares FOB", | ||
"Miles de hectolitros", | ||
"Miles de litros", | ||
"Miles de litros", | ||
"Miles de llamadas", | ||
"Miles de líneas", | ||
"Miles de metros cúbicos", | ||
"Miles de minutos", | ||
"Miles de pasajeros", | ||
"Miles de pasajes", | ||
"Miles de personas", | ||
"Miles de teléfonos", | ||
"Miles de toneladas", | ||
"Miles de unidades", | ||
"Miles de vehículos", | ||
"Millones de Litros", | ||
"Millones de USD corrientes", | ||
"Millones de USD de 2004", | ||
"Millones de USD", | ||
"Millones de cabezas", | ||
"Millones de dólares de 1993", | ||
"Millones de metros cúbicos", | ||
"Millones de paquetes", | ||
"Millones de pesos a precios de 1993", | ||
"Millones de pesos a precios de 2004", | ||
"Millones de pesos corrientes", | ||
"Millones de pesos", | ||
"Millones de unidades", | ||
"Paquetes de 20 unidades", | ||
"Pasajeros", | ||
"Pasajes", | ||
"Personas por sala", | ||
"Personas", | ||
"Porcentaje de hogares", | ||
"Porcentaje de población", | ||
"Porcentaje del PBI", | ||
"Porcentaje del total de exportaciones", | ||
"Porcentaje", | ||
"Pozos", | ||
"Prestaciones", | ||
"Puestos de trabajo", | ||
"Reales por dólar", | ||
"Reales", | ||
"Salas", | ||
"Tasa", | ||
"Toneladas", | ||
"USD corrientes", | ||
"USD corrientes", | ||
"USD por tonelada", | ||
"USD", | ||
"USD/GBP", | ||
"USD/KG", | ||
"USD/M3", | ||
"USD/millón de BTU", | ||
"Unidades", | ||
"Variación interanual", | ||
"Variación intermensual", | ||
"Variación mensual", | ||
"Variación porcentual", | ||
"Índice 17 Diciembre 2015 = 100", | ||
"Índice 1993 = 100", | ||
"Índice 1997 = 100", | ||
"Índice 1999 = 100", | ||
"Índice 2004 = 100", | ||
"Índice 2005 = 100", | ||
"Índice 2012 = 100", | ||
"Índice Abril 2008 = 100", | ||
"Índice Diciembre 2001 = 100", | ||
"Índice Diciembre 2016 = 100", | ||
"Índice Noviembre 2015 = 100" | ||
] |
12 changes: 12 additions & 0 deletions
12
base_portal/roles/portal/templates/scripts/config/updates/0008_specify_units_json_path.sh.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
units_json_path=/app/roles/portal/templates/ckan/units.json.j2 | ||
units_json_final_path={{ CKAN_DIST_CONFIG }}/units.json | ||
config_file="{{ CKAN_CONFIG }}/{{ CKAN_CONFIG_FILE }}"; | ||
|
||
if ! grep -q "units_url" "$config_file"; then | ||
var=$(grep -n '\[app:main\]' $config_file | awk -F ":" '{print $1}') | ||
let "var=var+1" | ||
sed -i "${var}i units_url = $units_json_final_path" $config_file | ||
cp $units_json_path $units_json_final_path | ||
fi |