You are not logged in.
Mozilla just released a cool plugin for interacting with the Internet with a CLI in Firefox - check it out here: http://labs.mozilla.com/2008/08/introducing-ubiquity/ . It's an offshoot of Aza Raskin's work with Enso.
I've created these scripts for searching the Arch Wiki, Arch BBS, and AUR Packages:
makeSearchCommand({
name: "archwiki",
url: "http://wiki.archlinux.org/index.php/Special:Search?search={QUERY}&go=Go",
icon: "http://wiki.archlinux.org/favicon.ico",
description: "Searches the Arch Wiki."
});
makeSearchCommand({
name: "archbbs",
url: "http://bbs.archlinux.org/search.php?action=search&keywords={QUERY}&author=&forum=-1&search_in=all&sort_by=0&sort_dir=DESC&show_as=topics&search=Submit",
icon: "http://wiki.archlinux.org/favicon.ico",
description: "Search the Arch Forums."
});
makeSearchCommand({
name: "aur-packages",
url: "http://aur.archlinux.org/packages.php?O=0&L=0&C=0&K={QUERY}&SeB=nd&SB=n&SO=a&PP=25&do_Search=Go",
icon: "http://wiki.archlinux.org/favicon.ico",
description: "Search the AUR for Packages."
});
To use them, install the plugin, and then open the command editor (in Ubiquity, type "command-editor" and hit enter). Then paste the above code in to the command editor. To search, hit your Ubiquity key (I set mine to Ctrl-Space), then type "archwiki foo", or whatever.
I'd love to see how people can improve on these! There's a way to have previews as you type, but I think it requires a preview API from the search engine, which I doubt the Arch sites have.
Offline
That's pretty cool. How does it differ from Firefox's keyword searches? I have Firefox set up so that I can type in the URL bar (well actually in Vimperator's command-line) "arch [terms]" to search the Arch wiki, "pacman [terms]" to search [core] and [extra], "aur [terms]" to search [unsupported] and [community], and "bbs [terms]" to search the forum.
Offline
That is awesome. Installed it and added your commands. Thanks, man!
Offline
I already have Opera set up to search the Arch wiki when I type "a what to search for", but I didn't think of an AUR one. Little shortcuts like this are really very useful, as it's faster than going to the actual page and searching through there
Offline
dsr:
How does it differ from Firefox's keyword searches?
I've never heard of keyword searches, that looks pretty cool! Search is about the most boring thing Ubiquity does, so I guess if you're going to use it for the cool stuff, you might as well use it for boring searches as well . I guess one small advantage is that you don't have to type out "arch" or "pacman" - with my setup, it figures out I'm going for "aur-search" after I've just typed "au".
BTW, please excuse the misspelled title, I spend too much time working with HD Radio (www.ibiquity.com) . . .
Offline
Wow, ubiquity is seriously awesome.
Offline
didn't bother setting it up yet, but i'm almost definitely sure vimperator does this
vimperator ftw
Offline
Yes, vimperator can do it too, I use it
Offline
To all the vimperator fans, I still think Ubiquity is still worth checking out, it really does a lot more than the simple search scripts I threw together. For example:
Type "we (zip code)", and it will automatically bring up a preview of current weather conditions as you type. Hit enter, and it opens a new tab with the full forecast from wunderground.com
Type "email this to (gmail contact name)", and it will send your current page (or selected text) to the contact name - they're going to add support for other email clients as well.
Select some text on a page, then type "trans this to sp", and the selected text will change to spanish instantly, without reloading the page
Type "map (place)" and it will open up a google map of the location.
It's really not comparable to vimperator, each tool is designed for different purposes, despite some overlaps. vimperator is designed to navigate the browser with the simplicity of vi commands (which I love as vi fan), and Ubiquity is designed to simplify access to various internet based services
Offline
I've been using ubiquity for two days now (quiet a long time, I know). Its a great tool. Im really looking forward to what that tool can emerge. However theres one thing I cant get used to: Auto-completion with tab doesnt work that would be very handy if you have to add some params to the command. Has someone an idea why it behaves that way? thanks in advance.
@deadrabbit: really like your commands, thanks for your effort
Offline
Wait, ubiquity? Is that not the name of Ubuntu's installer, or am I going crazy?
Offline
Wait, ubiquity? Is that not the name of Ubuntu's installer, or am I going crazy?
that was the first comment made on slashdot :
http://tech.slashdot.org/article.pl?sid … 27/1843222
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
I HAD to try this It is pretty cool, would help if I knew alot more javascript I think.
I did write 2 very simple ones just to see if I could.
CmdUtils.CreateCommand({
name: "vi",
icon: "http://www.usalug.org/favicon.ico",
preview: "The VI tutorial on usalug.org",
execute: function() {
openUrl( "http://usalug.org/vi.html" );
}
})
CmdUtils.CreateCommand({
name: "archmail",
icon: "http://bbs.archlinux.org/favicon.ico",
preview: "Archlinux.us email",
execute: function() {
openUrl( "https://www.google.com/a/archlinux.us/ServiceLogin?service=mail&passive=true&rm=false&continue=https%3A%2F%2Fmail.google.com%2Fa%2Farchlinux.us<mpl=default<mplcache=2" );
}
})
Offline
It's been a little while now since it came out. I'm asking myself rightnow: Are people using ubiquity in their daily life?
Speaking for myself: I do! Not all the time, but quiet often. Especially, searching the AUR with ubiquity and deadrabbit's scripts became even easier! I love it! The feature that I still miss is the lack of the Tab-completion! Has nobody an Idea on that?
Exitedly expacting your answers. Cheers.
Offline
It's been a little while now since it came out. I'm asking myself rightnow: Are people using ubiquity in their daily life?
Perhaps not surprisingly, since I was excited enough to start this thread, I'm using it all the time. In addition to Arch bbs and wiki searches, I use the google search, wikipedia, maps, and weather the most. I also wrote scripts for searching my company's intranet and documentation sites, which I use quite a bit. I went a bit crazy writing scripts - I wrote them for whois searches, man pages search, etymology, Newegg, and local food and entertainment searches.
Offline
I have just discovered this, it's an amazing extension!
Do you know if there is any way to change the fonts it uses? On my system they are a ugly roman type.
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Stickying....
Offline
Ok I found it :>
Go into:
~/.mozilla/firefox/YOURPROFILE/extensions/ubiquity@labs.mozilla.com/chrome/content/preview.css
and add:
font-family: helvetica, arial, sans-serif;
font-size: small;
to the body declaration (of course you can choose different fonts).
Source: http://getsatisfaction.com/mozilla/topi … quity_font
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
My Arch search scripts do no work in Ubiquity 0.1.2 - I haven't had a chance to figure out how to rewrite them for the new version yet.
Offline
CmdUtils.CreateCommand({
name: "awiki",
contributors: ["Mr Green"],
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.",
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);
}
})
Does that help.... still not sure myself... ok so I forgot icon hehe
Last edited by Mr Green (2008-11-05 15:15:29)
Mr Green
Offline
Thank you Mr Green! Here's the updated code for version 0.1.2, based on your work:
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);
}
})
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);
}
})
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);
}
})
And some generally linux-y stuff: whois and man page searches:
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);
}
})
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);
}
})
Offline
It may be a good idea to either start a wiki page ..... or pastebin this stuff
The possibilities are endless :-)
MrG
Mr Green
Offline
Modified deadrabbit's code to search the bugtracker... right now it searches all projects, but could easily be modified to search specific sections.
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);
}
})
Offline
Offline
Nice work Ghost1227!
The ideal way to distribute these scripts would be in external js files, which can be subscribed to in Ubiquity. If you visit a page with
<link rel="commands" href="ubiquitycommandfile.js" />
in the head, Firefox recognizes it as an Ubiquity feed, and asks if you'd like to subscribe to it. That way, updates to the scripts are automatic.
I don't have a place to host those myself, perhaps there's a place for this sort of thing on the Arch site.
In any case, the wiki page is a huge improvement, and I suppose copying and pasting commands is more secure than trusting an automatic feed of updates.
Offline