Showing posts with label Firefox add-ons. Show all posts
Showing posts with label Firefox add-ons. Show all posts

06 January 2008

Why can't del.icio.us do A to Z?

I struggled through the alphabet as if it had been a bramble-bush; getting considerably worried and scratched by every letter. After that, I fell among those thieves, the nine figures, who seemed every evening to do something new to disguise themselves and baffle recognition. But, at last I began, in a purblind groping way, to read, write, and cipher, on the very smallest scale. ~ Charles Dickens, Great Expectations, Chapter 7
My alphabet starts with this letter called yuzz. It's the letter I use to spell yuzz-a-ma-tuzz. You'll be sort of surprised what there is to be found once you go beyond 'Z' and start poking around! ~ Dr. Seuss, On Beyond Zebra
Librarians are perhaps overly given to the love of alphabetical order, and many of us have a hard time with today's casual lack of concern about whether McTavish should precede or follow Macdonald, or whether St. Boniface should interfile with Saint Boniface. We still cringe internally when we watch an analphabetic patron fumbling through a dictionary or encyclopedia. Anti-alphabeticists like Mortimer Adler have complained that resorting to the alphabet is an evasion of intellectual responsibility. In his new book, Everything is miscellaneous, David Weinberg fondly recollects Adler's pique in his description of the digitized and "miscellanized" third order of information, in which alphabetization is quickly going the way of Ptolemaic cosmography.

Everyone still likes a good list, and the fact remains that many lists are easier to use when they are alphabetized, like the phone book (despite its making a hash of initialisms), or Wikipedia's List of countries, or Google Reader's list of subscriptions. For the users of these tools it is second nature to find items according to the arbitrary order of our alphabet. del.icio.us itself recognizes this archaic institution, by default providing its users with its famous alphabetical array of tags. The mega-cool tag cloud is fundamentally alphabetical. Finding a tag is much simpler when you can do it at a glance rather than typing blindly into a search box. That is why I find so irksome the complete inability of del.icio.us to alpha sort links within tags or without. When del.icio.us was being coded it was decided that the list default would be reverse chronological order, with no alternatives allowed. It's absolutely crazy-making. Alphabetical sorting is on most users' wish lists, and it has been promised by the folks at del.icio.us. Perhaps 2008 will see the release of the new Delicious 2.0.

What to do in the meantime? I have a simple need. I want to be able to sort a list of blogs by student nurses that I have gathered under the tag blogs.nurschool. There are about 50 items that I would like to list alphabetically by blog title. A simple matter it seems, but impossible for del.icio.us. I could copy the chronological list I get when I click on the tab and do the sort manually. But that's silly. Surely there is some other way, I thought; and I set out to find it.


A Greasemonkey approach to sorting del.icio.us bookmarks: Del.icio.us alpha sort

As a user of the Firefox add-on Greasemonkey, I immediately started searching for a script that might do the job. Greasemonkey allows users to install scripts that add new functionality to web pages. (If scripts are not your thing, move on the next section.) I quickly found one called Del.icio.us alpha sort, which places a control at the top of the page permitting the user to toggle between alphabetical and chronological sorting of links — something del.icio.us programmers should have added in the first place. The problem is that it doesn't work properly. When I tried the script it would do the alphabetical sort only for one page — which works up to a point, that is, if you have 25 items or less in that tag. But, in all fairness, should the user be required continually to adjust the number of items appearing on a del.icio.us page to accommodate for this programming deficiency? The maximum number of bookmarks on one page is one hundred. What if you have more than one hundred bookmarks to be sent to a list? I quickly uninstalled Del.icio.us alpha sort without experimenting further. This script is not ready for prime time (it also slows down del.icio.us) and I don't have the hacking ability to improve on it. It really is time for del.icio.us programmers to incorporate alphabetical sorting into their code.

It occurred to me later that Del.icio.us alpha sort might conflict with Pagerization, my favourite Greasemonkey script, which turns a website's page-by-page results into an unbroken scrolling list with no annoying "next page" links needing to be clicked in order to proceed. Some of the sites that can be "pagerized" are Google (Search, Image, News, Group, Video), Yahoo, Wikipedia, YouTube, del.icio.us, Twitter, and digg. Sadly, PubMed does not allow itself to be pagerized. For my tenosynovitic forearm's sake I would never give up Pagerization. This extraordinary bit of code is worth the small effort of installing Greasemonkey. I did try Del.icio.us alpha sort with Pagerization disabled; but it still failed to alphabetize more than the first page. Having wasted an hour or two on this futile experiment, I moved on.

Turning to the del.icio.us Help pages

I went to the Developer section of del.icio.us Help. There we are promised the ability to "access data and build cool stuff." I must say, in most cases the del.icio.us help pages truly are helpful. Sure enough, under the HTML section I found something I could work with.

A simple URL with a few added "arguments" creates a reasonably attractive bulleted list in reverse chronological order of your most recent del.icio.us bookmarks. In the following simply replace USERNAME with your del.icio.us identity, and replace XXX with the number of links you want to list:

http://del.icio.us/html/USERNAME/?count=XXX&extended=body&extendeddiv=yes
&tags=no&rssbutton=no&bullet=bull

The count is limited by default to 15. To list more items add the appropriate number after "?count=".

I used these arguments to refine my results:

&extended=body : includes the full descriptive note for each bookmark
&extendeddiv=yes : starts the note on a separate line under the bookmark link &rssbutton=no : removes the default orange RSS button at the bottom of the bookmark list
&bullet=bull : adds a standard round bullet before each bookmark link (I prefer this to the del.icio.us help site's suggestion of "&bullet=raquo", which produces a right-pointing quotation mark or guillemet (»))

Using the above URL you get a result that looks like this:

• BioMed Central | Abstract | 1471-2105-8-487 | Userscripts for the Life Sciences
Discusses userscripts that aggregate information from web resources. Examples of enriching web pages from other resources, and how information from web pages can be used to link to, search, and process information in other resources.
• 2008 Web Predictions - ReadWriteWeb
Like, yeah! "People engaged in the new web will do some really awesome stuff that we'll all be in awe of."
• M A B - Mozilla Amazon Browser
Can now be run as a remote application. http://www.faser.net/mab/chrome/content/mab.xul
• Partners in a pandemic - www.universityaffairs.ca
May 2005. Medical researchers from Winnipeg helped discover how the AIDS virus is transmitted in Kenya because they were in the right place at the right time.
• Top 10 Medical Breakthroughs - 50 Top 10 Lists of 2007 - TIME
University of Manitoba researchers involved in the #1 medical breakthrough. Circumcized men in Africa 50% less likely to be infected by HIV.
• MedlinePlus: Health Literacy
"... the ability to understand health information and to use that information to make good decisions about your health and medical care."
• Show me the data -- Rossner et al. -- The Journal of Cell Biology 17 Dec 2007
Critique of impact factors. "We hope this account will convince some scientists and funding organizations to revoke their acceptance of impact factors as an accurate representation of the quality—or impact—of a paper published in a given journal."
• Web 3.0 and medicine -- Giustini 335 (7633): 1273 -- BMJ
Logically, web 3.0 should bring order to the 21st century web in the same way that Dr John Shaw Billings’s Index Medicus brought order to medical research back in the 19th century.

If you want to a list of bookmarks for a particular tag, then simply add the tag name after your user name:

http://del.icio.us/html/USERNAME/TAGNAME?count=XXX
&extended=body&extendeddiv=yes&tags=no&rssbutton=no&bullet=bull


This hack allowed me to gather all 50 or so nursing school blogs together in an unalphabetized list. Not bad, but still offensive to my instinctive need for this list to be alphabetized.

No help from del.icio.us Export (but good for a complete backup)
Another way to get a list of links is the standard export procedure found in del.icio.us Settings. Unfortunately, you can only create an enormous list of all your bookmarks, and there is no option as to their order, which is reverse chronological. This feature is useful if you ever want a good backup of your bookmarks, however, or if you want to import them back into a browser (heaven forbid). Go to Settings, and click on "export/backup" under the Bookmarks heading. You are given the option of including your tags and notes. del.icio.us will generate an HTML file of all your bookmarks that you can save to your computer. Eminently simple, but frustrating for my purposes.

Finally getting an alphabetical list (but is it worth the trouble?)

The URL for producing a bulleted list was helpful, but del.icio.us provided no method for getting my list in alphabetical order. I remarked above how in our "miscellanized" world alphabetical order is terribly passé. I can only continue to demur. I live by the English alphabet, and could not tolerate the loss of the time-honoured sequence of its 26 letters. I cannot fathom why the del.icio.us designers left out the alpha sort. Of course, I can alphabetize any list manually, including the tag-delimited list that del.icio.us provides. But what if I had hundreds of items, instead of fifty? Surely there is some way out of the tedious omnium-gatherum of just-one-damn-link-after-another.
After considerable effort, here is one method I found to get a set of my del.icio.us bookmarks into a usable alphabetical list. This goes beyond the hobbled and unavailing alphabetical listings for tags allowed by the new del.icio.us Firefox extension.

In del.icio.us Help, under the section for Developers, click on API, then click on posts. This section is marked by a rather ascetic and elitist assumption that the intrepid enquirer who has ventured this far needs no further condescending explanations or instructions. We are sternly informed that del.icio.us APIs are done over https and require HTTP-Auth. Furthermore, "this document and the APIs herein are subject to change at any time." Accepting my subordinate status and having informed myself a bit better about APIs, I persisted and found something I could use.

The first https URL in the posts section allows you to "get" all the bookmarks for a certain tag. (At least I assume it gets all of them. There is another URL that also returns all your bookmarks, but which can be filtered by tag. I used both and the results were the same for my selected tag. However, each URL returns information in a slightly different order. The "get" URL works better for my purposes, which I will explain below.)

Use this URL to create an XML file for your specified tag, adding your chosen tag name after the equals sign:

https://api.del.icio.us/v1/posts/get?&tag=TAGNAME

Type the URL into your browser. After you press Enter you will be prompted to enter your del.icio.us ID and password. The next step is to save the resulting XML file to your hard disk and then import it into Excel. (I used my old home-computer version of Excel XP for this experiment, but any version of Excel will do the job.) Using the Data|Import External Data|Import Data command, I brought the contents of the XML file, correctly separated into columns for each data field, into a spreadsheet.

Once the title of each bookmark is in an Excel cell, it is a simple matter to use Excel's Sort command to alphabetize the list. Delete columns with extraneous material. I chose only three columns to use: bookmark title, URL, and accompanying note.

Highlight the data and copy it to the Clipboard. You can then paste the spreadsheet data into most word processors. In Microsoft Word use Paste Special to copy the data into a formatted table. A little more fussing will be required, but at least the list is alphabetical. The downside is that your bookmark titles are no longer hyperlinked, but have their URL hived off into a separate cell. To get anything like the bulleted list illustrated above, you must now highlight each bookmark title and manually create the link by pasting in the appropriate URL.

That seems like a lot of trouble. In fact, it's hardly worth the effort, and actually makes manual alphabetization of the HTML output start to look attractive. With all my best efforts exhausted, I found I really hadn't come very far. For all its benefits, del.icio.us makes it extremely difficult to create alphabetized link lists. If I have missed a glaringly obvious hack or a deus ex machina solution, will some kind reader let me know? Otherwise, I shall just have to wait until del.icio.us delivers on its promise to include alphabetical sorting in its long awaited new user interface.


Ten enhancements on my del.icio.us wish list

It has been four months since the new version of Delicious (finally dumping the trendy but annoying internal punctuation) was announced. Alphabetical sorting was promised and is eagerly awaited by the faithful. Here is my wish list for ten more improvements to what has become an indispensable tool. Do you have any others to add?

1. Increase the character limit on descriptive notes. They are never quite long enough to hold the text I want to include. I have to waste time trimming and editing. And fix the bugs, please. My cursor occasionally disappears in a note field.

2. Number all pages instead of only including 'earlier' and 'later', which forces us to click through every page. In the alphabetical sort, provide a clickable alphabet selection list for quick navigation.

3. Allow unfettered scrolling through all bookmarks, with no page divisions.

4. On-the-fly bundle creation and allocation. Call them categories instead. We're grown up now.

5. We should be permitted to set a permanent or session-defined defaults. Example, a setting for not sharing as well as sharing our links. Sometimes I want to bookmark a series of daily-use links that would be of no use or interest to anyone else. It's tiresome to be forced to click the do not share checkbox for each. In the same way, we should be able to set permanent or session-only default tags that are applied to each new bookmark.

6. Deleting items should be easier. Allow users to delete with only one click, or with a keyboard shortcut. (In the meantime I am using an excellent Greasemonkey script called del.icio.us delete now.) Highly recommended if you are the type who likes to clean house from time to time.

7. Importing any del.icio.us list into a spreadsheet or word processor should be simplified.

8. Allow users to set desired text, background and highlighting colours.

9. Let's see contextual search implemented in the new version. If I don't specify what I want, del.icio.us should search whatever I am currently looking at — my own bookmarks, bookmarks from my network, or all bookmarks.

10. Reduce the amount of clicking required by introducing a range of keyboard shortcuts for searching, bundle creation, tag renaming, easy deletion, etc.
Clover learnt the whole alphabet, but could not put words together. Boxer could not get beyond the letter D. He would trace out A, B, C, D, in the dust with his great hoof, and then would stand staring at the letters with his ears back, sometimes shaking his forelock, trying with all his might to remember what came next and never succeeding. On several occasions, indeed, he did learn E, F, G, H, but by the time he knew them, it was always discovered that he had forgotten A, B, C, and D. Finally he decided to be content with the first four letters, and used to write them out once or twice every day to refresh his memory. Mollie refused to learn any but the six letters which spelt her own name. She would form these very neatly out of pieces of twig, and would then decorate them with a flower or two and walk round them admiring them. None of the other animals on the farm could get further than the letter A. George Orwell, Animal farm. Chapt. 3. Penguin Books; 1968.

10 August 2007

Big Science


Another Web 2.0 twist in the trail has left me slapping my forehead again. Why didn't I think of that? Sometimes it's like I live on the wrong side of a one-track mind. What grabbed my attention today was a script for Greasemonkey, the Firefox add-on that continues to delight me with its inventive web mash-inations. This elegant and irresistibly useful bit of code brings new interest to the routine activity of browsing e-journal tables of contents. If you don't want to read any further, get the Quotes from Chemical Blogspace and Postgenomic Greasemonkey script at userscripts.org. Chemical Blogspace and Postgenomic are wonderful websites that tumble together hundreds of blogs in a kind of omnium gatherum of scientific communication. What if you could connect all that procreative blogosphere superabundance to the dry tables of contents provided by scientific publishers on their e-journal sites? Is somebody blogging about an article in Nature? The script knows.


Why should I care about this? How often am I going to plough through the TOCs of PNAS or BioMed Central just because this cool script exists? Let me explain. I'm happy with RSS syndicating, del.icio.us bookmarking, Flickr tagging, RefWorksing, PubMed alerting, blog browsing, podcasting, YouTubing, Facebook fiddling, listserv lurking — all the 'ings' my passions and my profession involve me in, those convenient Librarian 2.0 competencies I posted about a while ago. I think I'm pretty well informed, but sometimes I feel I'm in a bit of a rut. Information science is one thing, but what about Science with a capital S? From the staid confines of my library, peering out from behind these ranks of medical texts shelved in the W's, I am confronted by the frenetic world of scientific endeavour.

I am fascinated by Science, but only in its less formal garb, unencumbered by the starch and stays of mathematical rigour. As a student of science I have always been a flop. I was flummoxed by Newton's laws, easily fazed by trigonometry, and I fizzled entirely trying to calculate moles and masses. One could say that I have a limited grasp of science's myriad complexities. I prefer the simple approach: if it squirms it's biology; if it stinks it's chemistry; if it explodes it's physics; if it's incomprehensible it's mathematics; if it doesn't work it's engineering.


I gravitate to the more popular sources of science information: Scientific American, PBS's Nova, radio programs like CBC's Quirks and Quarks (also available as a podcast), and some wonderful websites and blogs. One thing I have always enjoyed is browsing through journals like Nature, awed by the stunning fecundity of scientific research. Now, with my new script installed, I have easy access to bloggers' opinions about articles in Nature directly from the journal's TOC. It's everything Web 2.0 is supposed to be about, injecting a bit of jaunty twoness into a method of presenting information that hasn't changed much since books were copied by hand. The script does not interfere with the publisher's site in any way. It overlays a 'Pg' or 'Cb' logo onto a table of contents item, indicating that someone has blogged on that article. On mouseover an excerpt of the blog post pops up. The reader merely clicks on the link to get to the blogger's post.

A footnote in an article on scholarly communication (1) led me to a discussion of the script on the Blue Obelisk wiki and a link to download the latest version. Noel O'Blog (Noel O'Boyle, University of Cambridge) extended the script, originally created by Pedro Beltrão to work automatically on a number of popular sites, including Nature, PLoS, PNAS and BioMed Central. His version, posted on userscripts.org, is the one to get.

Here is a list of the sites covered in Noel's script. (The list is taken directly from the script, hence the asterisk storm. It should be possible to edit the script to add other sites, and the author encourages this.)

http://pubs*.acs.org/*
http://www.rsc.org/*
http://www*.interscience.wiley.com/*
http://www.nature.com/*
http://*.oxfordjournals.org/* (Added 01/May/07)
http://*.plosjournals.org/*
http://www.pnas.org/*
http://www.biomedcentral.com/*
http://www.citeulike.org/*

This non-scientist must express his appreciation for a truly innovative way to enhance communication in the scientific community. It's a very cool Web 2.0 tool, which I'm sure will evolve into something even more interesting over time. And it doesn't explode.


References

1. Martinsen DP. Scholarly communication 2.0: evolution or design? ACS Chem.Biol. 2007 Jun 15;2(6):368-371.

25 July 2007

The Q's: Mouseless Browsing and Pagerization (for Firefox)

My inner geek must come out, and today I'm blogging on something that's normally shelved in the Q's.

Lately PubMed has been driving me snaky. I nearly lost a big search when, for whatever reason, it decided to go and commune with the ancestors for a few minutes. No amount of clicking would revive the My NCBI Collections create box. Having lost my Clipboard in mid-search a number of times this summer, I braced myself for the annihilation of more than a hundred carefully gleaned citations on CPOE. Miraculously, PubMed recovered and I lost only my temper, not my search results.

Seeking to forget how sore my arm had become after hours spent in my PubMed click-a-thon, I decided to investigate Mouseless Browsing more thoroughly. This is a Firefox add-on I mentioned in a recent post. It works by adding small numbered boxes (called IDs) beside every important link, frame and form element in the browser. Instead of further inflaming the tendons of my right forearm, I can now type a number with my left hand, never having to leave the keyboard. And it works in PubMed.

By combining the new add-on with a couple of other tricks, I have been able to reduce my daily mouse use by more than half. Here’s how to do it:

1. Install Mouseless Browsing (for Firefox only) and enable IDs. There are various options. I prefer to use my keyboard’s Pause key to turn the program on only when I need it.

2. Go to the Google home page and select Preferences. Change the “Number of Results” to 100 (the maximum). This supposedly slows Google down, but I have noticed no appreciable difference.

3. Install the Greasemonkey add-on for Firefox. (More on Greasemonkey in another post.)

4. Install the Pagerization script.

By the way, all this is freely available on the web. You don’t need any programming skills to use Greasemonkey, and the installations are accomplished with a click or two.

Pagerization does one thing and it does it well. It automatically appends the results of the "next page" button to the bottom of the web page you are currently on. Pagerization works on most sites (including Google, Google Image Search, Flickr, Yahoo!, del.icio.us, and YouTube) by automatically rendering the next results at the bottom of the current page. This saves a healthy amount of browsing time and tendon abuse.

Here is how Mouseless Browsing and Pagerization work together in a Google search:



Sadly, I can't pagerize PubMed, but with the database's ability to display up to 500 citations, I'll live. I will voice a small complaint, however. Why can't PubMed be modified permanently to display more than 20 citations at a time? This option should be added to the My NCBI user preferences.

Final hint: I select "Citation" for the "PubMed single citation display" in order to find relevant MeSH headings more quickly.

22 July 2007

My NCBI Collections: bricks and bouquets

The NLM Technical Bulletin has announced a four-minute Quick Tour, Editing Collections in My NCBI. I am a compulsive consumer of this kind of thing, because every now and then you actually learn something new. Not this time. The little presentation was reliably humdrum. I don't know if it will inspire new users.

But I am a total convert. Since its introduction I have adored the Collections feature. When I am working on a complex literature search it may end up requiring several sessions over a period of a few days. In the old days I used to grumble about not being able to set up more than one Clipboard. Then came My NCBI Collections and my cramped and crabby little search world was transformed. I now use Collections to create multiple clipboards, which I merge for the final product.

I enjoy the ease of the PubMed interface, although I hope to see some interface improvements in the future. I still have a major outstanding complaint. How about keyboard commands for PubMed? Google Mail and Google Reader have them in spades. Bloglines has them too. I suffer from tenosynovitis in my right forearm. PubMed is a total clickarama, and I spend a great deal of time with it. It may be one of America's greatest gifts to humankind, but it is killing me.

For relief I have turned to various solutions but settled on a Firefox add-on called Mouseless Browsing. This little program adds small boxes with unique number IDs beside every link and/or form element on a web page. Simply type in the number and press enter (there is also an automatic mode available) to trigger the appropriate action such as following a link, pressing a button, etc. I have it configured to work only when I call it up with the Pause/Break key. I don't always want to see dozens of little boxes with numbers on a web page, but for PubMed and Google searching the program is invaluable.