kopia lustrzana https://gitlab.com/tomaszg/geostat
Move code for printing out footer html to common.h
rodzic
e96a2ded1e
commit
6cb9b771f8
14
common.cpp
14
common.cpp
|
@ -282,3 +282,17 @@ float sum(const Caches& cc, float Cache::*ptr) {
|
|||
int sum(const Caches& cc, int Cache::*ptr) {
|
||||
return std::accumulate(cc.begin(), cc.end(), 0, [&](const int& a, const Cache& b) { return std::move(a) + b.*ptr; });
|
||||
}
|
||||
|
||||
void footer_html() {
|
||||
std::cout << "<footer>\n";
|
||||
std::cout << "Stats generated by <a href=\"https://gitlab.com/tomaszg/geostat\">GeoStat</a>.<br>\n";
|
||||
std::cout << "Data obtained from Opencaching sites via <a href=\"https://github.com/opencaching/okapi/\">OKAPI</a>:<br>\n";
|
||||
std::cout << "<a href=\"https://www.opencaching.pl/\">Opencaching.pl</a>, ";
|
||||
std::cout << "<a href=\"https://www.opencaching.de/\">Opencaching.de</a>, ";
|
||||
std::cout << "<a href=\"http://www.opencaching.us/\">Opencaching.us</a>, ";
|
||||
std::cout << "<a href=\"http://www.opencaching.nl/\">Opencaching.nl</a>, ";
|
||||
std::cout << "<a href=\"http://www.opencaching.ro/\">Opencaching.ro</a>, ";
|
||||
std::cout << "<a href=\"https://www.opencache.uk/\">Opencaching.uk</a>.";
|
||||
std::cout << "</footer>\n";
|
||||
std::cout << "</body>\n</html>\n";
|
||||
}
|
||||
|
|
2
common.h
2
common.h
|
@ -22,3 +22,5 @@ void sum_html(const Caches& cc, float Cache::*ptr, const std::string& caption);
|
|||
void sum_html(const Caches& cc, int Cache::*ptr, const std::string& caption);
|
||||
float sum(const Caches& cc, float Cache::*ptr);
|
||||
int sum(const Caches& cc, int Cache::*ptr);
|
||||
|
||||
void footer_html();
|
||||
|
|
13
geostat.cpp
13
geostat.cpp
|
@ -961,16 +961,5 @@ int main(int argc, char** argv) {
|
|||
std::cout << "</div>\n";
|
||||
} // end of "owned" if
|
||||
|
||||
std::cout << "<footer>\n";
|
||||
std::cout << "Stats generated by <a href=\"https://gitlab.com/tomaszg/geostat\">GeoStat</a>.<br>\n";
|
||||
std::cout << "Data obtained from Opencaching sites via <a href=\"https://github.com/opencaching/okapi/\">OKAPI</a>:<br>\n";
|
||||
std::cout << "<a href=\"https://www.opencaching.pl/\">Opencaching.pl</a>, ";
|
||||
std::cout << "<a href=\"https://www.opencaching.de/\">Opencaching.de</a>, ";
|
||||
std::cout << "<a href=\"http://www.opencaching.us/\">Opencaching.us</a>, ";
|
||||
std::cout << "<a href=\"http://www.opencaching.nl/\">Opencaching.nl</a>, ";
|
||||
std::cout << "<a href=\"http://www.opencaching.ro/\">Opencaching.ro</a>, ";
|
||||
std::cout << "<a href=\"https://www.opencache.uk/\">Opencaching.uk</a>.";
|
||||
std::cout << "</footer>\n";
|
||||
|
||||
std::cout << "</body>\n</html>\n";
|
||||
footer_html();
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue