
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Migration Script from Catastro files ( Catalog CP Backup - dBASE IV ) to Mongodb
Migration Script from Catastro files ( Catalog CP Backup - dBASE IV ) to Mongodb
$ pip install catastro-to-mongodb
Usage: catastro_to_mongodb.py [OPTIONS] CAT_FILE
Import a CAT FILE to MongoDB
Migration Script from Catastro files ( Catalog CP Backup - dBASE IV ) to Mongodb
More info: https://github.com/dcervantes/catastro-to-mongodb
Options:
-h, --help Show this message and exit.
-v, --version Show the version and exit.
-d, --database name Database name. [default: catastro]
-H, --host host Host name. [default: 0.0.0.0]
-p, --port port Port number. [default: 27017]
-t, --timeout sec Connection timeout (seconds). [default: 5]
Import catastro.CAT
to test
database:
$ catastro-to-mongodb --database test ./catastro.CAT
$ catastro-to-mongodb -d test ./catastro.CAT
Import catastro.CAT
to test
database with host: test.xyz:16014
and port: 16014
:
$ catastro-to-mongodb --database test --host test.xyz --port 16014 ./catastro.CAT
$ catastro-to-mongodb -d test -H test.xyz -p 16014 ./catastro.CAT
Structure definition of CAT file: http://www.catastro.minhap.es/documentos/formatos_intercambio/catastro_fin_cat_2006.pdf
How to download CAT file: http://www.catastro.minhap.es/ayuda/manual_descargas_cat.pdf
This error is caused by try to read the Ñ character encoded in ISO-8859-1 format instead of UTF-8 format.
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd1
Runing iconv we can fix the CAT file encoding.
$ iconv -f ISO-8859-1 -t UTF-8 ./catastro.CAT > ./catastro_fixed.CAT
Script de migración de datos del Catastro (en formato Catalog CP Backup - dBASE IV) a Mongodb
$ pip install catastro-to-mongodb
Usage: catastro_to_mongodb.py [OPTIONS] CAT_FILE
Import a CAT FILE to MongoDB
Migration Script from Catastro files ( Catalog CP Backup - dBASE IV ) to Mongodb
More info: https://github.com/dcervantes/catastro-to-mongodb
Options:
-h, --help Show this message and exit.
-v, --version Show the version and exit.
-d, --database name Database name. [default: catastro]
-H, --host host Host name. [default: 0.0.0.0]
-p, --port port Port number. [default: 27017]
-t, --timeout sec Connection timeout (seconds). [default: 5]
Importar catastro.CAT
a la base de datos test
:
$ catastro-to-mongodb --database test ./catastro.CAT
$ catastro-to-mongodb -d test ./catastro.CAT
Importar catastro.CAT
a la base de datos test
con host: test.xyz
y puerto: 16014
:
$ catastro-to-mongodb --database test --host test.xyz --port 16014 ./catastro.CAT
$ catastro-to-mongodb -d test -H test.xyz -p 16014 ./catastro.CAT
Definición de estructura del fichero CAT: http://www.catastro.minhap.es/documentos/formatos_intercambio/catastro_fin_cat_2006.pdf
Como descargar el fichero CAT: http://www.catastro.minhap.es/ayuda/manual_descargas_cat.pdf
Este error lo produce al intentar leer el caracter Ñ en formato ISO-8859-1 en vez de en formato UTF-8.
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd1
Ejecutando iconv podemos arreglar el fichero CAT.
$ iconv -f ISO-8859-1 -t UTF-8 ./catastro.CAT > ./catastro_fixed.CAT
GPL-3.0 License David Cervantes Caballero
FAQs
Migration Script from Catastro files ( Catalog CP Backup - dBASE IV ) to Mongodb
We found that catastro-to-mongodb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.