131
131
sc::Department::SPtr tag_department = sc::Department::create("Top Tags", query(), "Top Tags");
132
132
//////////TAGGGGGGGGGGGGGGGGGGGGGSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
133
sc::Department::SPtr appdev_department = sc::Department::create("Application-Development", query(), "Application-Development");
133
134
sc::Department::SPtr installation_department = sc::Department::create("Installation", query(), "Installation");
134
135
sc::Department::SPtr boot_department = sc::Department::create("Boot", query(), "Boot");
135
136
sc::Department::SPtr unity_department = sc::Department::create("Unity", query(), "Unity");
434
if (department == "Ubuntu") { ///DEPARTMENT
438
// If there is no search string...
439
cals = client_.add_cals("https://www.google.com/calendar/feeds/dno3ip0msg552dei3e3r7m8jl0%40group.calendar.google.com/public/basic", lang_sys, rest_sys);
440
// Register a category for the
441
auto cal_cat = reply->register_category("Cal",
442
_("Ubuntu on Air! Calendar"), "", sc::CategoryRenderer(LAUNCH_TEMPLATE));
443
// For each of the...
444
for (const auto &cal : cals.cal) {
446
sc::CategorisedResult res(cal_cat);
448
// We must have a URI
449
res.set_uri(cal.link);
451
res.set_title(cal.title);
452
//res.set_art(launch.icon);
453
// Set the rest of the attributes
454
res.set_art("http://www.google.com/s2/favicons?domain=" + cal.link);
455
res["subtitle"] = cal.link;
456
res["description"] = cal.content;
457
res["feed"] = ("https://www.google.com/calendar/feeds/dno3ip0msg552dei3e3r7m8jl0%40group.calendar.google.com/public/basic");
460
if (!reply->push(res)) {
461
// If we fail to push, it means the query has been cancelled.
462
// So don't continue;
471
if (department == "Ubuntu") { ///DEPARTMENT
475
// If there is no search string...
476
sums = client_.add_sums("http://pipes.yahoo.com/pipes/pipe.run?_id=5bd03dad3b420100acc1c22d29a2204a&_render=rss&googleCalendarUrl=http%3A%2F%2Fsummit.ubuntu.com%2Fuos-1411.ical", lang_sys, rest_sys);
477
// Register a category for the
478
auto sum_cat = reply->register_category("Sum",
479
_("UOS November 2014"), "", sc::CategoryRenderer(LAUNCH_TEMPLATE));
480
// For each of the...
481
for (const auto &sum : sums.sum) {
483
sc::CategorisedResult res(sum_cat);
485
// We must have a URI
486
res.set_uri(sum.link);
488
res.set_title(sum.title);
489
//res.set_art(launch.icon);
490
// Set the rest of the attributes
491
res.set_art("http://www.google.com/s2/favicons?domain=" + sum.link);
492
res["subtitle"] = sum.publishedDate;
493
res["description"] = sum.content;
494
res["feed"] = ("http://pipes.yahoo.com/pipes/pipe.run?_id=5bd03dad3b420100acc1c22d29a2204a&_render=rss&googleCalendarUrl=http%3A%2F%2Fsummit.ubuntu.com%2Fuos-1411.ical");
497
if (!reply->push(res)) {
498
// If we fail to push, it means the query has been cancelled.
499
// So don't continue;
432
507
if (department == "Ubuntu") { ///DEPARTMENT
1000
if (department == "Application-Development") { ///DEPARTMENT
1002
Client::Appdevs appdevs;
1006
// If there is no search string, get the
1007
appdevs = client_.add_appdevs("http://askubuntu.com/feeds/tag/application-development", lang_sys, rest_sys);
1008
// Register a category for the
1009
auto appdev_cat = reply->register_category("Application-Development",
1010
_(""), "", sc::CategoryRenderer(LAUNCH_TEMPLATE));
1011
// For each of the forecast days
1012
for (const auto &appdev : appdevs.appdev) {
1014
sc::CategorisedResult res(appdev_cat);
1016
// We must have a URI
1017
res.set_uri(appdev.link);
1019
res.set_title(appdev.title);
1020
//res.set_art(installation.icon);
1021
// Set the rest of the attributes
1022
res.set_art("http://www.google.com/s2/favicons?domain=" + appdev.link);
1023
res["subtitle"] = appdev.author;
1024
res["date"] = appdev.publishedDate;
1025
res["description"] = appdev.content;
1026
res["feed"] = ("http://askubuntu.com/feeds/tag/application-development");
1029
if (!reply->push(res)) {
1030
// If we fail to push, it means the query has been cancelled.
1031
// So don't continue;
924
1040
if (department == "Installation") { ///DEPARTMENT