Ubiquity Commands

From ArchWiki
Revision as of 00:11, 18 November 2008 by Ghost1227 (Talk | contribs) (New page: = Introduction = Due to my recent discovery of [http://labs.mozilla.com/2008/08/introducing-ubiquity/ Ubiquity] and MrGreen's suggestion on the [http://bbs.archlinux.org/viewtopic.php?pid...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

Due to my recent discovery of Ubiquity and MrGreen's suggestion on the forum, here's a place for collecting Ubiquity commands that people find of interest.

Arch Specific

AUR Search

CmdUtils.CreateCommand({
  name: "aur-packages",
  contributors: ["Mr Green", "deadrabbit"],
  license: "MPL",
  description: "Search the AUR for Packages.",
  help:  "Enter a string to search the AUR",
  takes:  {"Search string":  noun_arb_text},
  preview:  "Search the AUR for Packages.",
  icon: "http://wiki.archlinux.org/favicon.ico", 
  execute: function( search_string ) {
    var prefix_url = "http://aur.archlinux.org/packages.php?O=0&L=0&C=0&K=";
    var after_crap_url = "&SeB=nd&SB=n&SO=a&PP=25&do_Search=Go"
    var search_url = prefix_url + search_string.text + after_crap_url;
    Utils.openUrlInBrowser(search_url);
  }
})

BBS Search

CmdUtils.CreateCommand({
  name: "bbs-arch",
  contributors: ["Mr Green", "deadrabbit"],
  license: "MPL",
  description: "Search all of archlinux forums",
  help:  "Enter a string to search the archlinux forums",
  takes:  {"Search string":  noun_arb_text},
  preview:  "Search the archlinux forums.",
  icon: "http://wiki.archlinux.org/favicon.ico", 
  execute: function( search_string ) {
    var prefix_url = "http://bbs.archlinux.org/search.php?action=search&keywords=";
    var after_crap_url = "&author=&forum=-1&search_in=all&sort_by=0&sort_dir=DESC&show_as=topics&search=Submit"
    var search_url = prefix_url + search_string.text + after_crap_url;
    Utils.openUrlInBrowser(search_url);
  }
})

Bugtracker Search

CmdUtils.CreateCommand({
  name: "arch-bugs",
  contributors: ["Ghost1227", "Mr Green", "deadrabbit"],
  license: "MPL",
  description: "Search the Arch Bugtracker.",
  help: "Enter a string to search the Arch Bugtracker.",
  takes: {"Search string": noun_arb_text},
  preview: "Search the Arch Bugtracker.",
  icon: "http://bugs.archlinux.org/themes/Archer/favicon.ico",
  execute: function( search_string ) {
    var prefix_url = "http://bugs.archlinux.org/index.php?string=";
    var search_url = prefix_url + search_string.text;
    Utils.openUrlInBrowser(search_url);
  }
})

Wiki Search

CmdUtils.CreateCommand({
  name: "awiki",
  contributors: ["Mr Green", "deadrabbit"],
  license: "MPL",
  description: "Search all of archlinux wiki",
  help:  "Enter a string to search at archlinux wiki",
  takes:  {"Search string":  noun_arb_text},
  preview:  "Search all of archlinux wiki.",
  icon: "http://wiki.archlinux.org/favicon.ico",
  execute: function( search_string ) {
    var prefix_url = "http://wiki.archlinux.org/index.php/Special:Search?search=";
    var search_url = prefix_url + search_string.text;
    Utils.openUrlInBrowser(search_url);
  }
})

Web Lookup

Man Page Search

CmdUtils.CreateCommand({
  name: "man",
  contributors: ["Mr Green", "deadrabbit"],
  license: "MPL",
  description: "Search man pages",
  help:  "Enter a string to search the man pages",
  takes:  {"Search string":  noun_arb_text},
  preview:  "Search the man pages",
  execute: function( search_string ) {
    var prefix_url = "http://www.linuxmanpages.com/man1/";
    var after_crap_url = ".1.php"
    var search_url = prefix_url + search_string.text + after_crap_url;
    Utils.openUrlInBrowser(search_url);
  }
})

Whois Search

CmdUtils.CreateCommand({
  name: "whois",
  contributors: ["Mr Green", "deadrabbit"],
  license: "MPL",
  description: "whois domain lookup",
  help:  "Enter a domain to query.",
  takes:  {"Search string":  noun_arb_text},
  preview:  "Enter a domain to query.",
  execute: function( search_string ) {
    var prefix_url = "http://reports.internic.net/cgi/whois?whois_nic=";
    var after_crap_url = "&type=domain"
    var search_url = prefix_url + search_string.text + after_crap_url;
    Utils.openUrlInBrowser(search_url);
  }
})