Changed gmi download to pick oldest file rather than guess its name.
This commit is contained in:
1 parent
6148a08b62
commit
2ec7aa5f3f
8 files changed
+117
-90
No files matched your search
@@ -7,10 +7,12 @@
|
||||
#include "lib/utils/datetime.h"
|
||||
|
||||
#include "lib/domain_model/sod.h"
|
||||
#include "lib/utils/datetime.h"
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/date_time/gregorian/gregorian.hpp>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <iostream>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <regex>
|
||||
|
||||
namespace bts {
|
||||
namespace cmd {
|
||||
@@ -18,33 +20,18 @@ using namespace bts::orderman;
|
||||
|
||||
int QuickTest::execute(std::vector<std::string> const &) {
|
||||
|
||||
auto src =
|
||||
"P,A,,ACC A,F1,.A020044019L, ,201912, ,F,C, ,4.4,20191122, "
|
||||
" , ,20190701,0.2125,2, , , ,9G01 CNH70,200, , "
|
||||
" , , , , , , ,US,C, ,12345, , ,TEST ACCOUNT "
|
||||
" , , , , , , , , ,0,1, "
|
||||
"1-,0,0,0,0,0,0,0,1,CALL DEC 19 CORN 440, "
|
||||
" , ,0, "
|
||||
" , , "
|
||||
",-1581.25,0,5000,20190701,1,0,0,0,0,0.552,20191122, "
|
||||
",US,1,2,O, , , ,1A,0, .21 1/4,0,0.31625,20190708, .31 "
|
||||
"5/8,4.4375, ,0.315,0,440,212,2,8,USD,US, , J, , , , "
|
||||
",H,FA,O, , F1,0,9J5L ,99HMC, , , , , ,124Q, "
|
||||
" , ,C,C,4, , ,115701, , , ,2, , "
|
||||
" , , , , ,0,-518.75,0,0, , , ,M, , , , , , , , "
|
||||
",-2,0,-1.95,-0.02,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,F1,F1,F1,F1,F1,F1,F1,"
|
||||
"F1,F1,F1,F1,F1,F1,F1,F1,F1,F1,F1,M,C,E,N,X,Z, , , , , "
|
||||
",B,T,Y,F,D,W,K,C,C,C,M,M,M,M,M,M, "
|
||||
",C,M,M,M,M,M,M,1,0,0,0,-2,0,0,0,ATO,BAU,911,162054300,&,19, , , , "
|
||||
",1,31,TESTACCT ,ATESDGMIMC,115616,B, ,0,0,1, ,0, ,0,A,A,A,USD,USD,US";
|
||||
auto sftp_file_name = std::string("2019-08-05.adatmny.csv");
|
||||
std::regex rx("(\\d\\d\\d\\d)");
|
||||
std::smatch matches;
|
||||
if (!std::regex_match(sftp_file_name, matches, rx))
|
||||
return {};
|
||||
auto y = std::stoi(matches[0]);
|
||||
auto m = std::stoi(matches[1]);
|
||||
auto d = std::stoi(matches[2]);
|
||||
|
||||
std::vector<std::string> values;
|
||||
boost::algorithm::split(values, src ,boost::algorithm::is_any_of(","));
|
||||
|
||||
for (auto v : values)
|
||||
std::cout << v << "\n";
|
||||
|
||||
return 0;
|
||||
const auto &sod = config::get<config::SODTime>();
|
||||
std::cout << datetime::make_ptime(y, m, d, sod.sod_hh(), sod.has_sod_mm(), 0, 0) << "\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::string QuickTest::help() {
|
||||
|
||||
Reference in new issue
Block a user