summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorV. Guruprasad <prasad@inspiredresearch.com>2019-10-06 19:44:17 -0400
committerV. Guruprasad <prasad@inspiredresearch.com>2019-10-06 19:46:59 -0400
commit007b26e67ed1a03c31a7d2344f832c77b12b5f43 (patch)
tree455cd8b223823d153b70d64bbff044249ae91fa1 /src/main.c
parent9beb5c0a7b24f4fe05e2ad6b0b0c24c5939c3fe3 (diff)
command line option to export
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 473946e..594ab0b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -321,6 +321,18 @@ int main (int argc, char ** argv) {
lastbackup_tv = (struct timeval) {0};
#endif
+ if (get_conf_value("export_csv")) {
+ export_delim(NULL, ',', 0, 0, maxrow, maxcol, 0);
+ }
+
+ if (get_conf_value("export_tab")) {
+ export_delim(NULL, '\t', 0, 0, maxrow, maxcol, 0);
+ }
+
+ if (get_conf_value("export") || get_conf_value("export_txt")) {
+ export_plain(NULL, 0, 0, maxrow, maxcol);
+ }
+
while ( ! shall_quit && ! atoi((char *) get_conf_value("quit_afterload"))) {
// save current time for runtime timer
gettimeofday(&current_tv, NULL);