2022-07-12 10:54:56 +00:00
|
|
|
#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() {
|
2023-09-25 16:49:30 +00:00
|
|
|
// Debug::set_debug_level(5);
|
2022-07-12 10:54:56 +00:00
|
|
|
PowertrailDB T;
|
|
|
|
|
2023-03-27 18:51:41 +00:00
|
|
|
for (int i = 1; i < 2000; i++)
|
2022-07-12 10:54:56 +00:00
|
|
|
T.get_trail(i);
|
|
|
|
|
|
|
|
Caches_in_Powertrails cc(T);
|
|
|
|
|
2023-03-27 18:51:41 +00:00
|
|
|
cc.save_to_json("caches_in_power.json.new");
|
|
|
|
T.save_to_json("powertrails.json.new");
|
2022-07-12 10:54:56 +00:00
|
|
|
}
|