The Hickensian

Sidebar links with de.licio.us

Update – For various reasons I’ve decided to keep going with my Textpattern version, but the information is here if you need it. Word of warning though – make sure you know what you’re doing with the cache.

I’ve just moved my sidenotes links from the inbuilt textpattern system to de.licio.us, a service I’ve been using more and more over the last couple of months. There was nothing wrong with the Textpattern method, its just that using de.licio.us makes these links a little easier to find again. Now I post my sidenotes using Cocoalicious, a beautfully simple cocoa interface to the de.licio.us api. If the site I want to post is in Safari, I just select ‘New post from Safari’ in Cocoalicious, and it pre-populates the fields. Each tag in de.licio.us can have its own RSS feed, so all that was left was how to integrate the links on my journal pages.

This was solved by an article by Richard Eriksson, and here are the steps I took:

  1. Started adding links with the tag ‘notes’, making sure that I added a wee description at the same time.
  2. Uploaded the Magpie RSS Parser to my server, adding a sub-folder called ‘cache’. By default, Magpie will cache the rss feed (if you’ve setup a cache folder) for an hour, so the de.licio.us server doesn’t get hit at every page load.
  3. Uploaded a new php file with Richard Erikssons’ code. All I had to add was the correct username (in this case, adding /notes/ on after that), and ensuring the path to the Magpie parser was right.
  4. include the php file into journal pages. job done.

Comments | RSS

No.1

Oscar said 1689 days ago:

on a scale of 1 – 10 how easy was this switch?
No.2

Jeff Croft said 1689 days ago:

Very cool, Jon. I might give this a try, myself…
No.3

Jon Hicks said 1689 days ago:

On a scale of 1-10, I’d say 8!
No.4

Izzy said 1689 days ago:

When I saw del.icio.us this was the only thing I could think of using it for. A low-tech version of a sidelink bar can be achieved by using the del.icio.us feed with a javascript RSS sydicator. Now if I could just figure out a way to get a comment system in place…
No.5

andrew said 1689 days ago:

Kick ass, jon. I’ve been putting off my switch to del.icio.us, and in the process have amassed over 15 pages of links in Textpattern. I’m not really sure how I’m going to transfer all that over; there’s gotta be a clever way to do it. The only thing I’d really be concerned with maintaining is the chronological order.
No.6

Tom said 1689 days ago:

Magpie is great, it even has a cool name.
No.7

Buzz Andersen said 1689 days ago:

Congrats on the switch, and thanks for the kind words about Cocoalicious!
No.8

dave said 1689 days ago:

i was wondering where things like magpie are best kept on os x ?
No.9

Jeremy Flint said 1689 days ago:

I recently started using my del.icio.us account more as well. I am using mine more as a remote bookmark collection, and to make it easier to share the information I find with co-workers and peers.

Who knows, I may end up dropping it into my site at some point.

The del.icio.us homepage is quite addictive. All that information, so little time.
No.10

neilio said 1689 days ago:

What I’d like to know is, can you import existing bookmarks (say, from Firefox or OmniWeb) into del.icio.us?
No.11

Ren said 1689 days ago:

Have you check out “bsd_fetch_headlines” plugin?
If using TxP, this plugin will turn Richard Eriksson’s long PHP code into one single line like code below. And does almost same thing as magpie.

<txp:bsd_fetch_headlines cachetime=”120” rssurl=”http://del.icio.us/rss/jonhicks/notes” lastRSS=”lastRSS.php” limit=”10” showtitle=”1” cachedir=”/tmp” />

* Aggregator for Textpattern
No.12

andrew said 1689 days ago:

I realize this is a silly question, but I’ve seen some interesting del.icio.us hacks floating around so I thought perhaps someone would know the answer: Is there a way to post links to a specific del.icio.us date in the past? I’d like to try and maintain the chronological order in which I entered my links in TXP and it seems silly to re-enter everything.

How did you manage all the past sidenotes from hicksdesign? Did you just ditch them and call it a loss?
No.13

andrew said 1689 days ago:

I jJust found this in del.icio.us’ API docs:

function: http://del.icio.us/api/posts/add?
&url= url for post
&description= description for post
&extended= extended for post
&tags= space-delimited list of tags
&dt= datestamp for post, format “CCYY-MM-DDThh:mm:ssZ”

makes a post to delicious.
the datestamp requires a LITERAL “T” and “Z” like in ISO8601 at
http://www.cl.cam.ac.uk/~mgk25/iso-time.html. for example:
“1984-09-01T14:21:31Z”

Btw, it’s hearly impossible to insert code in TXP comments
No.14

Jon Hicks said 1689 days ago:

Andrew – Richard has done that too, and says he’ll blog about it very soon.

Dave – put Magpie on the same server as your site. You can run it on you personal OSX server, but that would only be useful to other scripts on your mac.

As for mass importing of bookmarks in de.licio.us, I think that would be quite hard, as you’d still have to set tags manually. I’m sure some boffin somewhere will work it out.
No.15

Ant Dickens said 1689 days ago:

Del.icio.us is a great service, collective links, :D

There is already a nice extention for FireFox, check it out at: http://dietrich.ganx4.com/foxylicious/

enjoy :)
No.16

matthew said 1688 days ago:

if its any help, you can set up a cron job to save an html file you can then include with php – thats what id do.

heres my cron job i run every 6 hours.

wget ‘http://del.icio.us/html/username/?count=10&extended=body&rssbutton=no&bullet=&tags=no’ -O /path/to/delicious.html
No.17

Mary said 1688 days ago:

I do something similar: I use 2 cronjobs.

1. to fetch my 5 most recent delicious links as xml on my server:
wget—http-user=username—http-passwd=password -O delicious.xml http://del.icio.us/api/posts/recent?count=5

2. to run my own php script (its actually a lot easier than it sounds ) to parse the xml exactly how I want it to look, then save that as an .txt file to include wherever I want it.
/usr/bin/php /home/username/simply-delicious.php
No.18

Blair Millen said 1688 days ago:

Jon,

I’m not sure how the Textpattern system worked for your links but I found that with my previous sidelinks (entitled lowercase on my personal site) when looking for handy links that I’d made was a bit of a pain in the arse. So I built a wee search engine… works fine too. Was this not a consideration for yourself? Handy for your site visitors too…
No.19

kellan said 1687 days ago:

Jon, still having trouble with caching?
No.20

dave said 1687 days ago:

if you are still not getting it to cache (thanks for pointing that out – I was running somthing similar – with it making a request every page load), I think i got mine working by putting:

define(‘MAGPIE_CACHE_ON’, 1);
define(‘MAGPIE_CACHE_DIR’, ’/tmp’);
define(‘MAGPIE_CACHE_AGE’,1800);

in the actual php that formats the code in txp, not in the magpie files. In the code you used that would be ater the “require_once” and before the first ”$yummy”.

I am not knowledgeable enuff to know if that is a secure solution ,or even a good place to send the cache files (i just knew that would be a place that would be writable to on my mac)... but it works.
No.21

andrew said 1685 days ago:

So have you pretty much decided to forego delicious links in favor of more stability?
No.22

Jon Hicks said 1685 days ago:

Not just stability, but thats a good reason in itself. I still use de.licio.us for all my bookmarks, and I though I would leave this post up to show others how its possible.
No.23

nick said 1685 days ago:

I’ve got the same thing going on my weblog (linked – though I’m working on moving it over to TxP in the near future…),
though a different way of posting my del.icio.us bookmarks.

I’m using RSS Digest, which is a 3rd party (out of my hands) solution. I tried magpierss w/o success (i’m sure just user error), so went to RSS Digest.
basically put in your rss feed (from del.icio.us in this case) and choose a couple options (javascript or php for your use, formatting, etc) and it gives you the line(s) of code to paste into your page. you can set the refresh rate and everything, so it doesn’t hit del,.icio.us conmstantly. So mine updates about every 4 hours I believe.

I don’t love that it’s not 100% under my control (like magpierss would be) but for now, it works well, and I don’t have to think about it.
No.24

Marshall Potter said 1676 days ago:

I have written a plugin for textpattern that displays del.icio.us links just like the txp:linklist tag, with some additional options. It’s called TXP.icio.us, and questions can be emailed to me or asked on the TXP forum

Elsewhere

The Rissington Podcast - weekly shenanigans with Jon Oxton Hicksmade - unique handmade goods by Leigh Hicks

Hickr | RSS