Import pension "single asset" files into unified DB.
Prerequisites
ssconvert
sudo apt-get install gnumeric
Clone and initialize submodules
git clone ...
git submodule init
git submodule update
and then run (must be node ~v10.x..)
npm install
switch node versions easily with nvm
Usage: $ node op.js [command] [options]
Commands:
convert-files [options] convert excel files to csv
db-create-table [options] create table in database
db-empty-table [options] truncate table in database
db-load-files [options] load csv files to database
fetch-google [options] download files in Google Doc.
Usage: $ node op.js convert-files [options]
Options:
-y, --year <year> year
-q, --quarter <quarter> quarter
-b, --body <body> body
-f, --fund <fund number> fund
-s, --srcdir <name> path of Excel files, default:./excel/
-t, --trgdir <name> path of CSV files, default:./csv/
-o, --overwrite overwrite existing CSV files, default: false
Usage: $ node op.js db-create-table [options]
Options:
-t, --table <name> table name
Usage: $ node op.js db-empty-table [options]
Options:
-t, --table <name> table name
Usage: $ node op.js db-load-files [options]
Options:
-y, --year <year> year
-q, --quarter <quarter> quarter
-b, --body <body> body
-f, --fund <fund number> fund number
-t, --table <name> table name
-s, --srcdir <name> path of CSV files, default:./csv/
-c, --concurrency <number> number of concurrent DB connections, defaults to 4
Usage: $ node op.js fetch-google [options]
Options:
-y, --year <year> year
-q, --quarter <quarter> quarter
-b, --body <body> body
-f, --fund <fund number> fund number
-t, --trgdir <name> path of Excel files, default:/Users/shakhallevinson/duvdev/OpenPension/excel/
-o, --overwrite overwrite existing Excel files, default: false
See LICENSE file.