Experiment: Hack the Flock browser to support Scuttle

Note: this is dangerous. you could loose all your data! and not all features are working!

Flock is a nice browser but only supports del.icio.us and shadows as social bookmarking sites. Since Scuttle offers more or less the same web-api as del.icio.us it should be possible to use it as a replacement when we just hack a different hostname into the Flock. Should. But let’s have a look:

Prepare yourself. Install Scuttle on your webserver or use scuttle.org as your service (not recommended, it’s just a demo of scuttle). Install Flock. Backup all your data. Register at your prefered scuttle-site.

Find the file flockFavoritesWebServiceDelicious.js of your Flock installation. Patch it like this:

centia:/Applications/Flock.app/Contents/MacOS/components sk$ diff flockFavoritesWebServiceDelicious.js flockFavoritesWebServiceDelicious.js.orig
77,80c77,80
< const DELICIOUS_PROT = 'http'
< const DELICIOUS_HOST = 'my.scuttle.url';
< const DELICIOUS_PORT = 80;
< const DELICIOUS_PATH = '/api/';
---
> const DELICIOUS_PROT = 'https'
> const DELICIOUS_HOST = 'api.del.icio.us';
> const DELICIOUS_PORT = 443;
> const DELICIOUS_PATH = '/v1/';
204c204
< zeropad (d.getUTCDate (), 2) + ' ' +
---
> zeropad (d.getUTCDate (), 2) + 'T' +
207c207
< zeropad (d.getUTCSeconds (), 2)
---
> zeropad (d.getUTCSeconds (), 2) + 'Z'

The first code change is for the different URL. The function isoDate needs to be tweaked because scuttle is not API-conform (ISO8601), it just needs a date which goes through php’s strtodate function. so, no „T“ and no „Z“ are allowed.

What works?

  • posting of bookmarks
  • tagging

What doesn’t work:

  • registering within Flock’s Preferences
  • editing of bookmarks (scuttle do not support replaces)
  • adding new tags to existing bookmarks

Comments welcome.

2 Responses to “Experiment: Hack the Flock browser to support Scuttle”

  1. When Flock 1.0 comes out later this year we’ll have a stable and documented favorites API so it will be easy to build Flock extensions that allow you to use other bookmarking services.

    Cheers,

    Will Pate
    Community Ambassador, Flock

  2. Wow, found you through technorati – just fyi: Ⅰ did something similar, details posted at http://www.psyc.us/node/35

Discussion Area - Leave a Comment