diff --git a/chtoto.cbp b/chtoto.cbp index e39e670..8165589 100644 --- a/chtoto.cbp +++ b/chtoto.cbp @@ -31,7 +31,12 @@ + + + + + diff --git a/main.cpp b/main.cpp index aec7f45..cce3745 100644 --- a/main.cpp +++ b/main.cpp @@ -3,6 +3,7 @@ #include #include "histogram.h" #include "text.h" +#include using namespace std; struct Input { @@ -30,7 +31,19 @@ Input input_data(istream& in, bool prompt) return inn; } -int main() { +int main(int argc, char*argv[]) { + curl_global_init(CURL_GLOBAL_ALL); + if (argc > 1) + { + CURL *curl = curl_easy_init(); + if(curl) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, argv[1]); + res = curl_easy_perform(curl); + curl_easy_cleanup(curl); + } + } + auto in = input_data(cin, true); auto bins = make_histogram(in.numbers, in.bin_count); show_histogram_svg(bins);