|
|
|
@ -50,6 +50,25 @@ string exec(string command) {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void upload_file(){
|
|
|
|
|
std::string command = "curl --include --request POST https://flightlessmango.com/logs -F 'log[game_id]=26506' -F 'log[user_id]=176' -F 'attachment=true' -A 'mangohud' ";
|
|
|
|
|
command += " -F 'log[uploads][]=@" + logFiles.back() + "'";
|
|
|
|
|
|
|
|
|
|
command += " | grep Location | cut -c11-";
|
|
|
|
|
std::string url = exec(command);
|
|
|
|
|
exec("xdg-open " + url);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void upload_files(){
|
|
|
|
|
std::string command = "curl --include --request POST https://flightlessmango.com/logs -F 'log[game_id]=26506' -F 'log[user_id]=176' -F 'attachment=true' -A 'mangohud' ";
|
|
|
|
|
for (auto& file : logFiles)
|
|
|
|
|
command += " -F 'log[uploads][]=@" + file + "'";
|
|
|
|
|
|
|
|
|
|
command += " | grep Location | cut -c11-";
|
|
|
|
|
std::string url = exec(command);
|
|
|
|
|
exec("xdg-open " + url);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void writeFile(string filename){
|
|
|
|
|
logFiles.push_back(filename);
|
|
|
|
|
out.open(filename, ios::out | ios::app);
|
|
|
|
@ -86,4 +105,4 @@ void logging(void *params_void){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
writeFile(params->output_file + get_current_time());
|
|
|
|
|
}
|
|
|
|
|
}
|