]> git.sesse.net Git - pkanalytics/blobdiff - main.cpp
Implement JSON export. (For the time being, automatically on startup only, and nothin...
[pkanalytics] / main.cpp
index 2a756495397f2df983e8f633db86a62782e53daa..0a6819b2d3587396e7a4f563df4d34c12f23c5a9 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -15,6 +15,7 @@
 #include "ui_mainwindow.h"
 #include "events.h"
 #include "players.h"
+#include "json.h"
 
 using namespace std;
 
@@ -555,6 +556,9 @@ int main(int argc, char *argv[])
        QApplication app(argc, argv);
        sqlite3 *db = open_db("ultimate.db");
 
+       // TODO: do this on-demand instead, from a menu
+       export_to_json(db, "ultimate.json");
+
        int requested_match = -1;
        if (argc >= 2) {
                requested_match = atoi(argv[1]);