/ root / pages / uzbl_bookmarks.html
You're using an old link! - Thankfully, you no longer need to specify a nonstandard port (8080) to access my site. You could've used the more standard: http://pbrisbin.com/pages/uzbl_bookmarks.html.
My personal way of handling bookmarks: recreate a folder structure to organize urls via text files. Then dynamically create an html page from these files, open it and go. Arch and/or Uzbl users only.
Sat, 05 Dec 2009 18:50:44 -0500
Uzbl is a nice browser to play with. The whole idea is that it simply browses webpages. It's up to you to extend the browser's functionality yourself with short scripts for things like history, cookies, and bookmarks.
I've written a short script to handle bookmarks that I like quite a bit. It gives me full control over how they're organized and allows for easy sharing and backups.
It does come with some disadvantages. Right now my bookmarks are simply a list of links, no comments or descriptions. I'm ok with this, but I could see how some wouldn't be. I do this to keep it simple for now as I iron out the kinks with the system of bookmarking. Eventually, I may add descriptions and whatnot. It shouldn't be too hard.
The script builds an html page comprised of category headings and clickable links, then opens that page in a new browser window. You can then access any bookmark from there as if it were any other link on any other page.
[click to see my actual bookmarks page]
Inserting bookmarks is achieved through zenity. You're presented with a listing of existing categories in which you can append the current url. You can also hit NEW and create a new category on the fly. New categories are entered as folder paths from the perspective of your parent bookmarks directory (i.e. ./new_category or ./existing_category/new_subcategory).

The script requires that your bookmarks be organized in a particular way (a way which I find very beneficial in general).
Basically the categories are just folders that reside under one parent "bookmarks" directory. In each category/folder is a single text file called "bookmarks". In this file is just a list of your bookmarked URLs in the "category" that is its parent directory.
Directories (categories) can obviously be nested in any shape or form and everything should act as expected. For instance, one could have bookmarks/linux/bookmarks for general linux bookmarks and also have bookmarks/linux/mutt/bookmarks for those that are specific to both linux and mutt. The bookmark page will appear with a /linux section and a /linux/mutt section, and both will appear as choices in the "insert bookmark" dialog. It's very intuitive and basically just replaces a standard bookmarks toolbar with a folder on your actual system.
Here's my current bookmarks folder tree as an example:
# change to my $bookmarks directory cd ~/.my_bookmarks # show me all the individual text files so # you can see the structure find ./ -type f ./linux/mutt/bookmarks ./linux/security/bookmarks ./linux/reference/bookmarks ./linux/cli/bookmarks ./linux/programs/bookmarks ./linux/themes/bookmarks ./linux/arch/bookmarks ./linux/sharing/bookmarks ./linux/howto/bookmarks ./torrents/bookmarks ./mac/reference/bookmarks ./mac/programs/bookmarks ./mac/howto/bookmarks ./bin/bookmarks ./work/bookmarks ./politics/bookmarks # show me the last three lines of one as # an example tail -3 ./linux/mutt/bookmarks http://shreevatsa.wordpress.com/2007/07/31/using-gmail-with-mutt-the-minimal-way/ http://mychael.gotdns.com/blog/2008/09/mutt-and-multiple-email-addresses/ http://mychael.gotdns.com/blog/2008/11/mutt-imap-and-exchange/
To start using this method: get some bookmarks organized as above, then download my script from here (or find the updated version here), then add two keybinds to your uzbl config:
@cbind B = spawn /path/to/uzbl_bookmarks.sh insert @cbind u = spawn /path/to/uzbl_bookmarks.sh
The updated version has different usage.
Now, B will insert the current url as a new bookmark, and u will open that html page full of your bookmarks.
AND... if you're like me and have a server, you can serve up this html bookmarks page to be used anywhere regardless of platform, OS, or browser. The ultimate in cross-browser bookmark sharing.
You'll need to edit the script a bit to tailor it to your setup, mainly just the bookmarks and tmp_page variables.
Enjoy!
I took a brief hiatus from uzbl and used chromium for a while. It's a great browser, but I missed the fun of scripting uzbl's behavior so I did come back.
While I was gone, I tweaked the uzbl_bookmarks script into a general bookmark script that would be called just from the commandline to append, search for, or list out entries. One could still open bookmarks (in $BROWSER ofcourse) and I even wrote a bash completion function that would auto-complete category names if I passed the -a (add) flag.
Now that I'm back with uzbl, I've re-updated this generic bookmark script to call my still present and slightly re-worked uzbl-specific version wherever possible (i.e. generating the bookmark page and opening the $BROWSER). This gives me the best of both worlds for now.
The updated uzbl-specific script can be found on my uzbl scripts page here.
The updated generic bookmark script can be downloaded here.
My bash completion function is also available, you can download that here, place it in /etc/bash_completion.d/ and re-login or re-source your shell's profile file.
Here's hoping you can sort out some form of the above that works for you.
pbrisbin dot com 2010