What Sorting Does

In the context of Bookdog and other computer databases, to sort a container of items means to look at some particular attribute, such as their name, and reorder them according to a lexical order, usually alpha-numerically.

Sorting Boundaries

Bookdog never moves items from the container where you have put them; it only re-orders items within each container.  Likewise, Bookdog sorts separately the items which are above and below a separator line.

Web Browsers and Bookmarks Storage Services

Installed web browsers such as Safari will maintain bookmarks in the order in which you (or Bookdog) arrange them.  However, bookmarks storage services such as Google Bookmarks™ do not.  Because of this, Bookdog sorts these bookmarks automatically whenever you open them, but this is only to facilitate viewing within Bookdog.

Sorting Order Preferences

Sort bookmarks by

Most people want things sorted by the "name" attribute but Bookdog can use others if you prefer...

name

When you add a bookmark to a site in Safari, you are prompted to give it a name.  The default name is the title of the page which is provided by the site.  For example, the title of Apple's iTunes page is "Apple - iTunes".  The name is also what appears in the Bookmarks Menu.  Most people choose this option, so that their menu appears in alphabetical order.

entire url

The entire url (uniform resource locator) is the "address" which appears in Safari's address bar, for example "http://www.apple.com/itunes".  This option may be useful for identifying duplicate pairs of bookmarks that have different names but in fact take you to the same place.  Note that this method sorts firstly by the scheme, which is the first "word" in the url, which in this example is "http".  This method will typically sort with all "ftp" bookmarks first, then all "http", then all "https:".

domain, host, path

If you choose domain, host, path, Bookdog reverses the URL, sorting firstly using the top-level domain (TLD).  If the TLDs are the same, it then sorts by 2nd-level domain, then 3rd-level domain, then 4th-level domain, etc.  More....

If Bookdog finds more than one bookmark in a subfolder with the same host, it then parses the path to determine the order among them.  (The path identifies the file on the remote host which is sent when you click on the bookmark.)

There may be other keys following the path, such as password and query.  Bookdog ignores these other keys.

If you have not been giving good names to your bookmarks, you may want to sort by domain, host, path until you get things straightened out.

Here is an example of a folder sorted with Folders above Bookmarks:

     

Here is the same folder sorted mixed:

     

Here is the same folder sorted with Bookmarks above Folders:

     

Note: This option is only available when bookmarks are sorted by name.


Ignore the following prefixes when sorting by name:

This option is only available when bookmarks are sorted by name.  It is useful it you have been using the default names (web page titles) when setting bookmarks to sites made by amateur web-page designers.

If you check this box, Bookdog will look at the prefixes in the list which follows, and ignore these prefixes if they are found at the beginnings of names when sorting bookmarks by name.  For example, the entry A in the list will cause a bookmark named A Big Bad Hockey Team to be sorted with other bookmarks whose names begins with B instead of those whose names begin with A.

Checking the box at the end of an entry tells Bookdog to append a space character to the entry.  This is usually desired; otherwise, for example, entering the word "A" would cause the name "Apple" to appear with names beginning with the letter p.  However, it is not usually desired when omitting a url-type prefix, such as "http://www", as indicated in the default prefixes.  (You could get the same effect by putting a space after the entry, but the checkbox is easier to see and understand.)

This feature can lead to unexpected results if more than one prefix in the list matches a name! If one prefix "contains" another, you should put the longer one first, because Bookdog parses the list from top to bottom.

(Lexical) Order of Sorting

Sorting is done by looking at the lexical order of the first character in each item, then the second character, etc.  Items beginning with most punctuation marks (such as .Mac) are put first, then names beginning with numbers, and finally names beginning with letters, A-Z.  The space character (what you get when you hit the spacebar) is the first character in the lexical order, and the tilde character (~) is the last character.  More...

Because you can name your bookmarks whatever you want to, you can use this information to alter the sorted order when sorting by name.  If you want a bookmark or folder to appear above all others in its hierarchical group, put a space characer at the beginning of its name, for example " Top Website".  If you want one to appear below all others, put a tilde character (~) at the beginning of its name, for example "~Bottom Website".  Bookdog's Selection menu has buttons to add these prefixes with a single click.  (Warning: When adding a new bookmark in Safari, if you begin the name with a blank space, Safari will ignore the space! To add a space prefix, you must use Bookdog's Main Window, or the "Show All Bookmarks" browser in Safari, after you have added the bookmark.)

Another tip is that if you have names beginning with numbers, use leading zeros so that, for example, 09 will appear before 10.  Without the leading zero, 10 will appear before 9.