kopia lustrzana https://gitlab.com/tomaszg/geostat
26 wiersze
539 B
C++
26 wiersze
539 B
C++
|
#include "powertrail.h"
|
||
|
#include "debug.h"
|
||
|
|
||
|
#include <fstream>
|
||
|
|
||
|
#include <nlohmann/json.hpp>
|
||
|
|
||
|
using json = nlohmann::json;
|
||
|
|
||
|
// void to_json(json& j, const Powertrail& item) {
|
||
|
// j = json{ { "name", item.name }, { "date", item.date_str }, { "treshold", item.treshold_perc }, { "caches", item.caches } };
|
||
|
// }
|
||
|
|
||
|
int main() {
|
||
|
Debug::set_debug_level(5);
|
||
|
PowertrailDB T;
|
||
|
|
||
|
for (int i = 1; i < 1675; i++)
|
||
|
T.get_trail(i);
|
||
|
|
||
|
Caches_in_Powertrails cc(T);
|
||
|
|
||
|
cc.save_to_json("caches_in_power.json");
|
||
|
T.save_to_json("powertrails.json");
|
||
|
}
|