/usr/share/xul-ext/ubiquity/standard-feeds/debian.js is in xul-ext-ubiquity 0.6.4~pre20140729-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 | // NOTE: GPL in the license field means "GPL version 2 or above"
var noun_type_debian_release = new CmdUtils.NounType("release",
["any", "experimental", "stable",
"testing", "unstable", "oldstable",
"sid", "lenny", "etch", "squeeze"]);
var noun_type_texttile = new CmdUtils.NounType("text or title", ["Title", "Text"]);
var bugno_re = new RegExp("^#([0-9]+)");
// http://github.com/garyhodgson/ubiquity-rtm-api/blob/7299e60eab828fa89d76ce3c927faa1ad4064a23/ubiquity-rtm-api.js
function isParser2() {
var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
var branch = prefs.getBranch("extensions.ubiquity.");
return (branch.getPrefType("parserVersion") != 0) ? branch.getIntPref("parserVersion") == 2 : false;
}
// XXX role location first suggestion is near, tweak so it displays "in"
if (isParser2()) {
CmdUtils.CreateCommand({
names: ["debian-pts-search", "pts", "pkgtrack", "debtrack"],
author: {name: "Filippo Giunchedi", email: "filippo@debian.org"},
homepage: "http://people.debian.org/~filippo/ubiquity-commands/ubiquity-commands.html",
contributors: ["Jonathan E. Magen - http://yonkeltron.com"],
icon: "http://debian.org/favicon.ico",
license: "GPL",
arguments: [{role: 'object', nountype: noun_arb_text, label: 'package'}],
help: "Searches Debian package tracking system.",
description: "Searches the Debian Package Tracker at tracker.debian.org",
preview: function (pblock, args) {
if (!args.object || args.object.text.length < 1) {
pblock.innerHTML = this.help;
return;
}
var data = {package: args.object.text};
pblock.innerHTML = _("Search Debian package tracking system for: <b>${package}</b>", data);
},
execute: function (args) {
var data = {package: args.object.text};
var url = CmdUtils.renderTemplate("https://tracker.debian.org/pkg/${package}", data);
Utils.openUrlInBrowser(url);
}
});
CmdUtils.CreateCommand({
names: ["debian-pkg-search", "pkg", "debpackage", "debpkg"],
author: {name: "Jonathan E. Magen"},
homepage: "http://yonkeltron.com",
contributors: ["Filippo Giunchedi - http://people.debian.org/~filippo"],
icon: "http://debian.org/favicon.ico",
license: "GPL",
arguments: [{role: 'object', nountype: noun_arb_text, label: 'package'},
{role: 'location', nountype: noun_type_debian_release, label: 'release'}],
help: "Searches Debian package repositories for a package and, optionally, ",
description: "Searches the Debian package repositories at packages.debian.org",
preview: function(pblock, args) {
if (!args.object || args.object.text.length < 1) {
pblock.innerHTML = this.help;
return;
}
var msg = "Search Debian package tracking system for: <b>${package}</b>";
var values = {package: args.object.text};
if (args.location && args.location.text.length > 0) {
msg += " in <b>${release}</b>";
values.release = args.location.text;
}
pblock.innerHTML = _(msg, values);
},
execute: function(args) {
var url = "http://packages.debian.org/search?keywords=${package}&suite=${release}";
var values = {package: args.object.text, release: "all"};
if (args.location && args.location.text.length > 0) {
values.release = args.location.text;
}
var urlString = CmdUtils.renderTemplate(url, values);
Utils.openUrlInBrowser(urlString);
}
});
CmdUtils.CreateCommand({
names: ["debian-bts-search", "bts", "debbug"],
author: {name: "Filippo Giunchedi", email: "filippo@debian.org"},
homepage: "http://people.debian.org/~filippo/ubiquity-commands/ubiquity-commands.html",
contributors: ["Jonathan E. Magen - http://yonkeltron.com"],
icon: "http://debian.org/favicon.ico",
license: "GPL",
arguments: [{role: 'object', nountype: noun_arb_text, label: 'query'}],
help: "Searches Debian bug tracking system.",
description: "Searches the Debian bug tracking system at bugs.debian.org",
preview: function(pblock, args) {
if (!args.object || args.object.text.length < 1) {
pblock.innerHTML = this.help;
return;
}
pblock.innerHTML = _("Search Debian bug tracking system for: <b>${query}</b>", {query: args.object.text});
},
execute: function(args) {
var url = "http://bugs.debian.org/${query}";
var values = {query: args.object.text};
var match = args.object.text.match(bugno_re);
if (match) {
values.query = match[1];
}
var urlString = CmdUtils.renderTemplate(url, values);
Utils.openUrlInBrowser(urlString);
}
});
CmdUtils.CreateCommand({
names: ["debian-message-id", "msgid"],
author: {name: "Filippo Giunchedi", email: "filippo@debian.org"},
homepage: "http://people.debian.org/~filippo/ubiquity-commands/ubiquity-commands.html",
contributors: ["Jonathan E. Magen - http://yonkeltron.com"],
icon: "http://debian.org/favicon.ico",
license: "GPL",
arguments: [{role: 'object', nountype: noun_arb_text, label: 'msgid'}],
help: "Searches Debian mailing list archives for a given message-id",
description: "Searches the Debian mailing list archives at lists.debian.org for messages corresponding to a message-id",
preview: function(pblock, args) {
if (!args.object || args.object.text.length < 1) {
pblock.innerHTML = this.help;
return;
}
pblock.innerHTML = _("Search Debian mailing lists for message-id <b>${msgid}</b>", {msgid: args.object.text});
},
execute: function(args) {
var url = "http://lists.debian.org/msgid-search/${query}";
var urlString = CmdUtils.renderTemplate(url, {query: args.object.text});
Utils.openUrlInBrowser(urlString);
}
});
CmdUtils.CreateCommand({
names: ["debian-buildd", "buildd"],
author: {name: "Filippo Giunchedi", email: "filippo@debian.org"},
homepage: "http://people.debian.org/~filippo/ubiquity-commands/ubiquity-commands.html",
contributors: ["Jonathan E. Magen - http://yonkeltron.com"],
icon: "http://debian.org/favicon.ico",
license: "GPL",
arguments: [{role: 'object', nountype: noun_arb_text, label: 'package'}],
help: "Shows the buildd status for a given package",
description: "Shows the buildd status for a given package as listed on buildd.debian.org",
preview: function(pblock, args) {
if (!args.object || args.object.text.length < 1) {
pblock.innerHTML = this.help;
return;
}
pblock.innerHTML = _("See buildd status for: <b>${pkg}</b>", {pkg: args.object.text});
},
execute: function(args) {
var url="http://buildd.debian.org/${query}";
var urlString = CmdUtils.renderTemplate(url, {query: args.object.text});
Utils.openUrlInBrowser(urlString);
}
});
CmdUtils.CreateCommand({
names: ["debian-debtags", "debtags"],
author: {name: "Filippo Giunchedi", email: "filippo@debian.org"},
homepage: "http://people.debian.org/~filippo/ubiquity-commands/ubiquity-commands.html",
contributors: ["Jonathan E. Magen - http://yonkeltron.com"],
icon: "http://debian.org/favicon.ico",
license: "GPL",
arguments: [{role: 'object', nountype: noun_arb_text, label: 'query'}],
help: "Edits the Debtags of a given package",
description: "Edits the Debtags for a given package registered on debtags.alioth.debian.org",
preview: function(pblock, args) {
if (!args.object || args.object.text.length < 1) {
pblock.innerHTML = this.help;
return;
}
pblock.innerHTML = _("Edit DebTags for: <b>${query}</b>", {query: args.object.text});
},
execute: function(args) {
var url = "http://debtags.alioth.debian.org/edit.html?pkg=${query}";
var urlString = CmdUtils.renderTemplate(url, {query: args.object.text});
Utils.openUrlInBrowser(urlString);
}
});
CmdUtils.CreateCommand({
names: ["debian-ddpo", "ddpo"],
author: {name: "Filippo Giunchedi", email: "filippo@debian.org"},
homepage: "http://people.debian.org/~filippo/ubiquity-commands/ubiquity-commands.html",
contributors: ["Jonathan E. Magen - http://yonkeltron.com"],
icon: "http://debian.org/favicon.ico",
license: "GPL",
arguments: [{role: 'object', nountype: noun_arb_text, label: 'query'}],
help: "Show the Debian Developer's Packages Overview corresponding to the provided login or email address",
description: "Shows the Debian Developer Packages Overview for a given developer identified by their login or email address",
preview: function(pblock, args) {
if (!args.object || args.object.text.length < 1) {
pblock.innerHTML = this.help;
return;
}
pblock.innerHTML = _("See the Debian Developer's Packages Overview for: <b>${query}</b>", {query: args.object.text});
},
execute: function(args) {
var url = "http://qa.debian.org/developer.php?login=${query}";
var urlString = CmdUtils.renderTemplate(url, {query: args.object.text});
Utils.openUrlInBrowser(urlString);
}
});
CmdUtils.CreateCommand({
names: ["debian-wiki-search", "debwiki", "dwiki"],
author: {name: "Jonathan E. Magen"},
homepage: "http://yonkeltron.com",
contributors: ["Filippo Giunchedi - http://esaurito.net"],
icon: "http://wiki.debian.org/favicon.ico",
license: "GPL",
arguments: [{role: 'object', nountype: noun_arb_text, label: 'query'},
{role: 'location', nountype: noun_type_texttile, label: 'where'}],
help: "Search the Debian wiki at wiki.debian.org",
description: "Searches wiki.debian.org",
preview: function(pblock, args) {
if (!args.object || args.object.text.length < 1) {
pblock.innerHTML = this.help;
return;
}
var msg = "Search the Debian wiki for: <b>${query}</b>";
var values = {query: args.object.text};
if (args.location && args.location.text.length > 0) {
msg += " in <b>${where}</b>";
values.where = args.location.text;
}
pblock.innerHTML = _(msg, values);
},
execute: function(args) {
var url = "http://wiki.debian.org/?action=fullsearch&context=180&fullsearch=${where}&value=${query}";
var values = {query: args.object.text, where: "Title"};
if (args.location && args.location.text.length > 0) {
values.where = args.location.text;
}
var urlString = CmdUtils.renderTemplate(url, values);
Utils.openUrlInBrowser(urlString);
}
});
} else { // old ubiquity version
CmdUtils.CreateCommand({
name: "debian-pts-search",
synonyms: ["pts", "pkgtrack", "debtrack"],
author: {name: "Filippo Giunchedi", homepage: "http://people.debian.org/~filippo/ubiquity-commands/ubiquity-commands.html"},
contributors: ["Jonathan E. Magen - http://yonkeltron.com"],
icon: "http://debian.org/favicon.ico",
license: "GPL",
takes: {"the package name": noun_arb_text},
modifiers: {},
help: "Searches Debian package tracking system.",
description: "Searches the Debian Package Tracker at tracker.debian.org",
preview: function(pblock, pkgname) {
if (!pkgname || pkgname.text.length < 1) {
pblock.innerHTML = this.help;
return;
}
pblock.innerHTML = "Search debian package tracking system for: <b>" + pkgname.text + "</b>";
},
execute: function(pkgname) {
var url = "https://tracker.debian.org/pkg/{QUERY}";
var urlString = url.replace("{QUERY}", pkgname.text);
Utils.openUrlInBrowser(urlString);
}
});
CmdUtils.CreateCommand({
name: "debian-pkg-search",
synonyms: ["pkg", "debpackage", "debpkg"],
author: {name: "Jonathan E. Magen", homepage: "http://yonkeltron.com"},
contributors: ["Filippo Giunchedi - http://people.debian.org/~filippo"],
icon: "http://debian.org/favicon.ico",
license: "GPL",
takes: {"the package name": noun_arb_text},
modifiers: {"in": noun_type_debian_release},
help: "Searches Debian package repositories for a package and, optionally, ",
description: "Searches the Debian package repositories at packages.debian.org",
preview: function(pblock, pkgname, mods) {
if (!pkgname || pkgname.text.length < 1) {
pblock.innerHTML = this.help;
return;
}
var msg = "Search debian package tracking system for: <b>${package}</b>";
var values = {package: pkgname.text};
if (mods["in"] && mods["in"].text.length > 0) {
msg += " in <b>${release}</b>";
values.release = mods["in"].text;
}
pblock.innerHTML = CmdUtils.renderTemplate(msg, values);
},
execute: function(pkgname, mods) {
var url = "http://packages.debian.org/search?keywords=${package}&suite=${release}";
var values = {package: pkgname.text};
if (mods["in"] && mods["in"].text.length > 0) {
values.release = mods["in"].text;
} else {
values.release = "all";
}
var urlString = CmdUtils.renderTemplate(url, values);
Utils.openUrlInBrowser(urlString);
}
});
CmdUtils.CreateCommand({
name: "debian-bts-search",
synonyms: ["bts", "debbug"],
author: {name: "Filippo Giunchedi", homepage: "http://people.debian.org/~filippo/ubiquity-commands/ubiquity-commands.html"},
contributors: ["Jonathan E. Magen - http://yonkeltron.com"],
icon: "http://debian.org/favicon.ico",
license: "GPL",
takes: {"the package name": noun_arb_text},
modifiers: {},
help: "Searches Debian bug tracking system.",
description: "Searches the Debian bug tracking system at bugs.debian.org",
preview: function(pblock, pkgname) {
if (!pkgname || pkgname.text.length < 1) {
pblock.innerHTML = this.help;
return;
}
pblock.innerHTML = "Search debian bug tracking system for: <b>" + pkgname.text + "</b>";
},
execute: function(pkgname) {
var url = "http://bugs.debian.org/{QUERY}";
var match = pkgname.text.match(bugno_re);
if (match) {
var urlString = url.replace("{QUERY}", match[1]);
} else {
var urlString = url.replace("{QUERY}", pkgname.text);
}
Utils.openUrlInBrowser(urlString);
}
});
CmdUtils.CreateCommand({
name: "debian-message-id",
synonyms: ["msgid"],
author: {name: "Filippo Giunchedi", homepage: "http://people.debian.org/~filippo/ubiquity-commands/ubiquity-commands.html"},
contributors: ["Jonathan E. Magen - http://yonkeltron.com"],
icon: "http://debian.org/favicon.ico",
license: "GPL",
takes: {"message-id": noun_arb_text},
modifiers: {},
help: "Searches Debian mailing list archives for a given message-id",
description: "Searches the Debian mailing list archives at lists.debian.org for messages corresponding to a message-id",
preview: function(pblock, msgid) {
if (!msgid || msgid.text.length < 1) {
pblock.innerHTML = this.help;
return;
}
pblock.innerHTML = "Search debian mailing lists for message-id <b>" + msgid.text + "</b>";
},
execute: function(msgid) {
var url = "http://lists.debian.org/msgid-search/{QUERY}";
var urlString = url.replace("{QUERY}", msgid.text);
Utils.openUrlInBrowser(urlString);
}
});
CmdUtils.CreateCommand({
name: "debian-buildd",
synonyms: ["buildd"],
author: {name: "Filippo Giunchedi", homepage: "http://people.debian.org/~filippo/ubiquity-commands/ubiquity-commands.html"},
contributors: ["Jonathan E. Magen - http://yonkeltron.com"],
icon: "http://debian.org/favicon.ico",
license: "GPL",
takes: {"the package name": noun_arb_text},
modifiers: {},
help: "Shows the buildd status for a given package",
description: "Shows the buildd status for a given package as listed on buildd.debian.org",
preview: function(pblock, pkgname) {
if (!pkgname || pkgname.text.length < 1) {
pblock.innerHTML = this.help;
return;
}
pblock.innerHTML = "See buildd status for: <b>" + pkgname.text + "</b>";
},
execute: function(pkgname) {
var url="http://buildd.debian.org/{QUERY}";
var urlString = url.replace("{QUERY}", pkgname.text);
Utils.openUrlInBrowser(urlString);
}
});
CmdUtils.CreateCommand({
name: "debian-debtags",
synonyms: ["debtags"],
author: {name: "Filippo Giunchedi", homepage: "http://people.debian.org/~filippo/ubiquity-commands/ubiquity-commands.html"},
contributors: ["Jonathan E. Magen - http://yonkeltron.com"],
icon: "http://debian.org/favicon.ico",
license: "GPL",
takes: {"the package name": noun_arb_text},
modifiers: {},
help: "Edits the DebTags of a given package",
description: "Edits the DebTags for a given package registered on debtags.alioth.debian.org",
preview: function(pblock, pkgname) {
if (!pkgname || pkgname.text.length < 1) {
pblock.innerHTML = this.help;
return;
}
pblock.innerHTML = "Edit DebTags for: <b>" + pkgname.text + "</b>";
},
execute: function(pkgname) {
var url = "http://debtags.alioth.debian.org/edit.html?pkg={QUERY}";
var urlString = url.replace("{QUERY}", pkgname.text);
Utils.openUrlInBrowser(urlString);
}
});
CmdUtils.CreateCommand({
name: "debian-ddpo",
synonyms: ["ddpo"],
author: {name: "Filippo Giunchedi", homepage: "http://people.debian.org/~filippo/ubiquity-commands/ubiquity-commands.html"},
contributors: ["Jonathan E. Magen - http://yonkeltron.com"],
icon: "http://debian.org/favicon.ico",
license: "GPL",
takes: {"login / email address": noun_arb_text},
modifiers: {},
help: "Show the Debian Developer's Packages Overview corresponding to the provided login or email address",
description: "Shows the Debian Developer Packages Overview for a given developer identified by their login or email address",
preview: function(pblock, login) {
if (!login || login.text.length < 1) {
pblock.innerHTML = this.help;
return;
}
pblock.innerHTML = "See the Debian Developer's Packages Overview for: <b>" + login.text + "</b>";
},
execute: function(login) {
var url = "http://qa.debian.org/developer.php?login={QUERY}";
var urlString = url.replace("{QUERY}", login.text);
Utils.openUrlInBrowser(urlString);
}
});
CmdUtils.CreateCommand({
name: "debian-wiki-search",
synonyms: ["debwiki", "dwiki"],
author: {name: "Jonathan E. Magen", homepage: "http://yonkeltron.com"},
contributors: ["Filippo Giunchedi - http://esaurito.net"],
icon: "http://wiki.debian.org/favicon.ico",
license: "GPL",
takes: {"search term": noun_arb_text},
modifiers: {"in": noun_type_texttile},
help: "Search the Debian wiki at wiki.debian.org",
description: "Searches wiki.debian.org",
preview: function(pblock, searchTerm, mods) {
if (!searchTerm || searchTerm.text.length < 1) {
pblock.innerHTML = this.help;
return;
}
var msg = "Search the Debian wiki for: <b>${query}</b>";
var values = {query: searchTerm.text};
if (mods["in"] && mods["in"].text.length > 0) {
msg += " in <b>${where}</b>";
values.where = mods["in"].text;
}
pblock.innerHTML = CmdUtils.renderTemplate(msg, values);
},
execute: function(searchTerm, mods) {
var url = "http://wiki.debian.org/?action=fullsearch&context=180&fullsearch=${where}&value=${query}";
var values = {query: searchTerm.text};
if (mods["in"] && mods["in"].text.length > 0) {
values.where = mods["in"].text;
} else {
values.where = "Title";
}
var urlString = CmdUtils.renderTemplate(url, values);
Utils.openUrlInBrowser(urlString);
}
});
} // if (isparser2())
// this hasn't changed between parser1 and parser2
CmdUtils.makeSearchCommand({
name: "debian-manual-page",
author: {name: "Stefano Zacchiroli", homepage: "http://upsilon.cc/~zack"},
synonyms: ["man", "debman"],
url: "http://man.cx/?page={QUERY}",
icon: "http://man.cx/favicon.ico",
description: "Searches Debian manual page on man.cx"
});
// vim:et:ts=4
|