summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorAndrés M <andmarti1424@users.noreply.github.com>2020-02-05 10:26:53 -0300
committerGitHub <noreply@github.com>2020-02-05 10:26:53 -0300
commitaeacf49e67bde5736becfc6a41d8a4735592a4d2 (patch)
tree61092b5695de9971a5e0f4e45bdcadd60906eacb /src/main.c
parent1fb58ab6be1f9312c829f81f7c563b30983cb33c (diff)
parente5be9cf182f280665d93a95575f7765e2218792d (diff)
Merge pull request #360 from earthshrink/cmdline_export
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);