main.cpp
957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "stdafx.h"
#include "PaperGraphWidget.h"
#include "MainWindow.h"
int main(int argc, char *argv[]) {
if (1) {
_curl_processor.set_url("http://dblp.uni-trier.de/rec/bib1/conf/sbrn/WedemannCD06");
_curl_processor.perform();
printf("%s", _curl_processor.get_buffer().c_str());
_bibtex_processor.read(_curl_processor.get_buffer());
std::string doi;
_bibtex_processor.get_value("doi", doi);
std::string address = std::string("http://api.crossref.org/works/")+doi;
_curl_processor.set_url(address.c_str());
_curl_processor.perform();
printf("json: %s\n", _curl_processor.get_buffer().c_str());
//rapidjson test
rapidjson::Document d;
d.Parse(_curl_processor.get_buffer().c_str());
return 0;
}
QApplication app(argc, argv);
MainWindow m;
try {
m.make_graph(PAPER_FILENAME);
} catch (const std::exception& e) {
qDebug() << "Error: " << e.what();
return EXIT_FAILURE;
}
m.show();
return app.exec();
}