diff --git a/data/municipios-con-islas-no-normalizado.csv b/data/municipios-sti.csv similarity index 100% rename from data/municipios-con-islas-no-normalizado.csv rename to data/municipios-sti.csv diff --git a/data/municipios-con-islas-no-normalizado.json b/data/municipios-sti.json similarity index 100% rename from data/municipios-con-islas-no-normalizado.json rename to data/municipios-sti.json diff --git a/scripts/Readme.md b/scripts/Readme.md index 0ffc70c..72b16cb 100644 --- a/scripts/Readme.md +++ b/scripts/Readme.md @@ -46,8 +46,7 @@ Si se invoca sin subcomandos o argumentos, executa: all Procesa todas las fuentes (por defecto). - convert-to-json Convierte todo los archivos .csv en /data a .json. - + convert-to-json Convierte todos los archivos .csv almacenados en /data a .json. update Actualiza el archivo datapackage.json diff --git a/scripts/lib/UpdateCommand.php b/scripts/lib/UpdateCommand.php index 680cf77..8e69181 100644 --- a/scripts/lib/UpdateCommand.php +++ b/scripts/lib/UpdateCommand.php @@ -14,6 +14,8 @@ class UpdateCommand extends ConsoleKit\Command /** * Actualiza datapackage.json * + * @opt nojson no incluye los recursos .json + * */ public function execute(array $args, array $options = array()) { @@ -21,6 +23,7 @@ class UpdateCommand extends ConsoleKit\Command $datapackageNew['last_updated']=date('Y-m-d '); + // Comprobobamos si hay que omitir JSON if (!isset($options['nojson']) && !isset($options['n'])){ foreach ( Config::$datapackage['resources'] as $resource){ $resource['format'] = 'json'; @@ -30,7 +33,7 @@ class UpdateCommand extends ConsoleKit\Command } - //Nueva version + // Actualizamos versiĆ³n if (file_exists(BASE_PATH . DS . "datapackage.json")) { $datapackageOld = json_decode(file_get_contents(BASE_PATH . DS . "datapackage.json")); if (!empty($datapackageOld->version)) {