During december of 2010 it seemed Yahoo was going to pull the plug on my favorite bookmarking service Delicious. It was later revealed that they are going to sell it instead. But, before that was known the web went into an uproar with blogs about how to salvage your bookmarks and move inte another service. Not only that, A LOT of developers have stepped up trying to fill the gap with new services such as liink.it.
Personally I’ve been wanting to try out CouchDB as a bookmark handler for some time. Couch with it’s ability to bundle a webapp with the database and simple replication (backup!?) seems like a potentially great fit for bookmarks in the cloud. Said and done, when it seemed like Delicious was going away I took the step out into the wild with Jan-Piet Mens CouchApp Scrumptious.
As the icing on the cake it’s possible to get the bookmarks back into the cloud using Scrumptious with a free hosted database from CouchOne. Read on to learn how.
As it happens, I’m not the first person that thought CouchDB would be a good place to put bookmarks. Jan-Piet Mens has already created a CouchApp called Scrumptious. Scrumptious is a web-application that lives inside CouchDB.
Scrumptious features: * Bookmarklet for saving bookmarks * Listing bookmarks by date or tag * Export as bookmarks html for import into the browser of your choice * Inline-editing of bookmarks
Scrumptious is a cool app but it’s in no way ready for non-techies (as you will probably figure out during the install, if not earlier). The bookmarklet doesn’t work in Firefox 3.x currently and the search-functionality isn’t finished. Scrumptious also lacks all of the social functionality of Delicious. If this puts you off maybe you’d be better off looking at something like Pinboard or Tagli.us.
You could go to Github and get the code for Scrumptious and install it into the CouchDB of your choice using couchapp, all of this is documented in Jan-Piet’s post about the tool.
But, there is an easier way. To get you started quickly, I’ve put up a clean Scrumptious app on CouchOne. The only thing you need to do is create your own database and replicate my clean install of Scrumptious. I’ve done one minor change in my version of Scrumptious to secure the bookmarks and that is to require that the user posting and updating bookmarks is logged into the CouchDB administration ui. This is just to add a little security so someone else cant come in and remove all your bookmarks.
https://[chosen-subdomain].couchone.com/_utils](important as your database will be completely open otherwise)
Replicate my empty scrumptious database into your newly created database using the Replicator part of the admin ui
Take some time to play around with the ui, add the Bookmarklet to your bookmarks bar and try it out. One thing you should know about CouchOne hosting is that I don’t know much about it and what it will cost in the long run. At this point its free and completely without guarantees so I’d really suggest you install CouchDB locally to take backups of your database from time to time (once again using the replication feature).
Well, we still have one thing to do, and that’s to export our bookmarks from Delicous and move them into our cloud. We’re gonna use curl to get all your bookmarks, so open up your terminal and enter the following (replace username with your delicious account). curl should already be available if you run Mac OS X or a linux-flavor. If you’re stuck with Windows cygwin is problably your best option to get hold of curl.
Download bookmarks using curl:
curl -sf -u username -o mine.xml
To use my script you need groovy installed, available from Codehaus.
groovy del2scrumptious.groovy -in mine.xml -out mine.json
At this point we only need to push the bookmarks up to your couch in the cloud, once again using curl.
curl -u admin -H "Content-Type: application/json" -X POST \ http://[chosen subdomain].couchone.com/[newly_created_database]/_bulk_docs -d @mine.json
Head back to the web application; you bookmarked it in the last step right? All your bookmarks should be available now. A word of warning though, it might take a little while for the page to load the first time you request it after uploading your bookmarks as that’s when CouchDB internally builds its view of the bookmarks that will be used to list them.
Good luck with your cloud-hosted bookmarks!