Get gdal development libraries:
$ sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
$ sudo apt-get update
$ sudo apt-get install libgdal-dev
Create and activate a virtual environment:
| { | |
| "intrinsic_fields" : { | |
| "idno" : "TEST-123", | |
| "type_id" : 43 | |
| }, | |
| "preferred_labels" : [ | |
| { | |
| "locale" : "en_US", | |
| "forename" : "Walter", | |
| "middlename" : "H.", |
| #!/usr/bin/env python3 | |
| # ircecho.py | |
| # Copyright (C) 2011 : Robert L Szkutak II - http://robertszkutak.com | |
| # | |
| # This program is free software; you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation; either version 3 of the License, or | |
| # (at your option) any later version. | |
| # |
| #!/usr/bin/env python | |
| import re | |
| from subprocess import call | |
| def load_csv_psql(db, infile, table, tmpdir='/tmp'): | |
| tmpfile = '%s/%s' % (tmpdir, infile) | |
| call(['cp', infile, tmpfile]) | |
| columns = map(variablize, file(infile).readline().split(',')) |