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
npm install
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.
recreate-elastic-indices copy database data to elastic search.
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:./excel/
-o, --overwrite overwrite existing Excel files, default: false
See LICENSE file.