Yet Another DailyDelicious hack for WordPress

I wanted a nice simple way to mirror my daily bookmarks that I’ve added to [del.icio.us](http://del.icio.us) into [WordPress](http://www.wordpress.org)

Stephen Eyre’s [dailydelicious](http://www.dot-totally.co.uk/dailydelicious.txt) was close, but
not exactly they way I wanted it. He used the RSS feed, but that doesn’t give a good daily cutoff.

So, I present Yet Another Daily Delicious php script: [yadd.php](http://www.nozell.com/marc/blog/data/yadd-1.0.TXT).

It asks for just today’s bookmarks using the published api, parses the XML, generates nicely formatted HTML and creates a WordPress entry.

Here is the writeup from the code:
- - -

This is yadd.php V1.0 by Marc Nozell (marc@nozell.com) based on
Stephen Eyre's dailydelicious
(http://www.dot-totally.co.uk/dailydelicious.txt)

See http://www.nozell.com/blog/ for the latest version of
'yet another daily delicious' (yadd.php)

USAGE:

1) Edit the section below. At the very least use your del.icio.us
username and password ($del_user/$del_password)

2) Put there file somewhere on the server where you run WordPress.

3) Arrange for this page to be hit once a day, say 11:30ish your
local time. del.icio.us seems to track UTC so depending on which
timezone you live in, some bookmarks from your yesterday may show
up. Consider using a simple cronjob that looks like this:

30 23 * * * $HOME/bin/yadd.sh

where yadd.sh looks like this:

#!/bin/bash
curl http://www.yoursite.com/yadd.php

4) In the morning edit the entry if you wish. I've tried to generate
pretty HTML so it will be simple to edit the entry.

THINGS TO KEEP IN MIND

Anyone that hits the URL for this script will cause your current
bookmarks to be dumped into WordPress. Clearly this is not
desirable.

You have some options. The easiest is to keep this URL 'secret'.
Name it something unusual and put it in a non-obvious place.
Remember that if you display your web hit stats, the url will be
exposed. A better solution to use .htaccess to limit access. If
you do that remember to update the url wget uses to include the
username/password, something like this:
curl http://someuser:somepassword@www.yoursite.com/yadd.php

Enjoy,

-marc

Tags: , , , ,

67 Responses to “Yet Another DailyDelicious hack for WordPress”

  1. Prashant Says:

    Could this be modified to make the posts on a weekly basis rather than daily?

  2. samsonite Says:

    that is a great script. got it up and running fine. i want my daily bookmarks to display underneath any posts i make for a specific day, so if i set my cron to hit at, say, 12.01 am, can i make the yadd.php file fetch my links from the previous day? any help appreciated.

  3. The Sounds We Make » Blog Archive » New Meanders Set Up Says:

    […] he other solutions don’t rely on. Luckily, I stumbled across Marc Nozell’s DailyDelicious Hack that relies on […]

  4. snapping links » del.icio.us tools for wordpress Says:

    […] (plugin, posts all links once per day…could you set the script to run more often?) YADD (does the same thing, goes thru api inste […]

  5. The Printer Machine Says:

    Phrsnant , I think it can be modified that way … but… I would also like to know HOW

  6. Stratified Says:

    Yet Another DailyDelicious Patch
    I recently setup up Yet Another DailyDelicious hack (yadd) on stratified. Among all of the daily del.icio.us grabbers, it seemed the easiest to configure and use, and indeed it is. The only problem is that for those of us (all eyes on Zach) who don’…

  7. Stratified Says:

    Yet Another DailyDelicious Patch
    I recently setup Yet Another DailyDelicious hack (yadd) on stratified. Among all of the daily del.icio.us grabbers, it seemed the easiest to configure and use, and indeed it is. The only problem is that for those of us (all eyes on Zach) who don’t b…

  8. Zach Says:

    Extremely useful little script.

    I wrote a patch that prevents yadd.php from posting if there are no links for that day. It is available here.

  9. Marc Nozell's mini-blog » Updated Yet Another Daily del.icio.us hack Says:

    […] der: General blog useful — Marc Nozell @ 7:05 pm

    I’ve updated my Yet Another Daily del.icio.us (yadd.php) so it can be c […]

  10. Salim Fadhley Says:

    Nice plugin, if you get a chance to develop it, I would really like to see the following:

    Make no post at all in the case that there are no daily links - at the moment the plugin makes an empty entry that must be deleted.

    If there are a large number of posts (e.g, over a fixed threshold), could the plugin use the more tag, so that we dont get an excessivly long posting on the home page.

  11. Stodge Says:

    Enhanced Daily Del.icio.us plugin
    Working with PHP can be a bowel-churning experience; It is one of the most rubbish computer languages ever devised, because it encourages virtually every bad habit a developer could adopt. Its only saving grace is almost ubiquitous integration with Apa…

  12. Wyome Says:

    Daily Delicious and POP3Gateway

    I have created a module to grab the last week’s del.icio.us and automatically post them as a blog entry. The idea, and much of the code came from Marc Nozell’s WordPress plugin. I cleaned up the code for Xaraya to handle it just a bit better, and…

  13. EZblog » delicious linkdump Says:

    […] s heb je enorme bezwaren stel me dan op de hoogte Het update script is voor de liefhebber hier te vinden.

    Comments
    »

    […]

  14. Notes, links and conversation » Blog Archive » links for 2005-04-01 Says:

    […] Plugins Database (nice xhtml/javascript interface) (tags: wordpress plugins plugin) Marc Nozell’s mini-blog » Blog Archive » Yet Another Da […]

  15. aoiro_blog » Blog Archive » Yet Another DailyDelicious hack for WordPress Says:

    […] «å‰Šé™¤ï¼‰

    Yet Another DailyDelicious hack for WordPress

    Yet Another DailyDelicious hack for WordPress これを […]

  16. theory.isthereason » Asides for my Backside Says:

    […] that this made for an ideal “remaindered links” wordflow. This script, called Yet Another Daily Delicious (YADD), is quite robust in […]

  17. Blog of Leonid Mamchenkov » Blog Archive » del.icio.us link dumps Says:

    […] looking for (or, dare I to mention, write) the appropriate script. The one was available here. With small modifications I guess it will do the […]

  18. Amanita.net » Blog Archive » Quicklinks for 2005-07-01 Says:

    […] uicklinks for 2005-07-01
    Posted on Friday, July 1st, 2005 at 1:18 pm in Quicklinks

    Yet Another DailyDelicious Uses a cronjob to get the d […]

  19. Tutto a memoria: WP PLUGINS FEAST Says:

    […] daily bookmarks that I’ve added to del.icio.us into WordPress" // posted by t.a.l. @ 11:53 PM    Comments: Post a Comment <<Home […]

  20. knight Says:

    it seem like the script is broken due to delicious api issue ?

  21. lazopolis Says:

    I get the following errors:

    Warning: fopen(): URL file-access is disabled in the server configuration in /home/.jargon/lazopolis/yet.anotherblog.net/yadd.php on line 106

    Warning: fopen(http://…@del.icio.us/api/posts/get?dt=2005-08-29): failed to open stream: no suitable wrapper could be found in /home/.jargon/lazopolis/yet.anotherblog.net/yadd.php on line 106

    Warning: fread(): supplied argument is not a valid stream resource in /home/.jargon/lazopolis/yet.anotherblog.net/yadd.php on line 113

    Any idea on what’s wrong?

  22. Marc Nozell Says:

    lazopolis,

    It looks like from the writeup in the manual page for fopen (http://us2.php.net/fopen) that is could be a configuration issue.

    -marc

  23. Elsi’s Observations » Blog Archive » Social Bookmarking Says:

    […] Along the way, I stumbled over a link to Yet Another DailyDelicious hack for WordPress at Marc Nozell’s blog. It’s been a long time since I talked with Marc, back when he was active at RootsWeb. It was extremely nice to run across him again. […]

  24. elResbalónFluyó » Blog Archive » Com compartir marcadors (ii) Says:

    […] Aquest script s’encarrega de copiar al wordpress totes les entrades que s’hagi fet durant el dia a del.icio.us! L’he modificat de manera que ho faci com a mi m’interessa (en català, eliminant informació no necessària i adaptant-lo al servidor) i ja està rulant! […]

  25. Elana Says:

    I just modified the script to use the CURL libraries instead of fopen and fread. It seems to work fine. My host (Dreamhost) doesn’t allow the fopen() libraries any longer. This is what I came up with after a couple of hours hacking at it.

    I’ll probably take another look at it tonight and see if I can make it skip days it detects no entries. I believe this can be done by pulling a die() if the XML string does not contain a </posts> in it.

    For example, I created my del.icio.us account today. If I look at yesterday’s date for the string, I get the following returned:

    <posts dt=”20051017″ tag=”" user=”chiieddy”/>

    Nothing else.

    BTW, for those who are asking about changing the date, for yesterday just change this line:

    $date = mktime(0,0,0,$today[’mon’], $today[’mday’], $today[’year’]);

    New line should read:

    $date = mktime(0,0,0,$today[’mon’], $today[’mday’]-1, $today[’year’]);

    For those wanting a whole week, you’d have to create a recursive function to do so, the del.icio.us API only recognizes a single date at time. You’d have to set your cronjob to run weekly and then cycle through all the days of the week.

  26. CLAMP Campus Adventures Says:

    del.icio.us

    I’ve signed up for a del.icio.us account which allows me to mark links as I find them. This will allow me to quickly mark pages I want to come back to and share them as well. Once a day, this blog will update with the day’s links. I&#…

  27. Elana Says:

    Marc -

    Does the line:

    $del_showlink = true;

    (whether or not to show the link to your del.icio.us account) actually work? I can’t find any subsequent code in the php file using this variable.

  28. CLAMP Campus Adventures Says:

    del.icio.us Script Update

    Good morning. The del.icio.us script I’ve been working on has been updated again. It now does the following…

  29. Le blog » Blog Archive » WP-cron YADD Says:

    […] Here is my small contribution to the wonderful world of Wordpress : WP-cron YADD is an integration of YADD into WP-cron architecture. By this mean, no more hassle writing shell scripts and using system cron table. Instead … well, instead, nothing to do ! To install, put it in your plugins directory, provided YADD and WP-cron are installed, it will simply work. […]

  30. theory.isthereason » From Del.icio.us to WordPress: How to automatically post daily links Says:

    […] (YADD) hack for WordPress and a Cron job every night. Don’t get me started… Listen to this article| […]

  31. Mikkel Says:

    I get the following error message:

    Fatal error: Call to undefined function: current_time() in /var/www/mikkelwinther.dk/public_html/dagenslinks/yadd.php on line 91

    Any idea what’s wrong?

  32. Mikkel Says:

    I’m using Elana’s modified version, by the way. But I get the same error message using the original version, only with a different line number for obvious reasons.

  33. Mikkel Says:

    Never mind, I got it working. It seems I had a typo in the location of my Wordpress location.

    Thanks for a great hack!

  34. vrypan|net|log » It’s all about the feeds Says:

    […] FeedBurner already gives some of these services. You can easily “mix” your blog news, with your Flickr photostream and your del.icio.us bookmarks. You can even mix them in different ways, say gather all your weekly del.icio.us bookmarks in one single post in the new feed generated. Or you could create your own “video channel” of videos indexed by Yahoo! and tagged with a certain keyword, like “funny”, or “football”. Or automatically post your del.icio.us bookmarks as a single post in your blog on a daily basis using yadd. Or combine a GeoRSS blog feed with geo-tagged Flickr images. Or upcoming.org events with rsswether.com… […]

  35. Alice Hill’s Real Tech News - Independent Tech » It’s All About the Feeds Says:

    […] FeedBurner already gives some of these services. You can easily “mix” your blog news, with your Flickr photo stream and your del.icio.us bookmarks. You can even mix them in different ways, say gather all your weekly del.icio.us bookmarks in one single post in the new feed generated. Or you could create your own “video channel” of videos indexed by Yahoo! and tagged with a certain keyword, like “funny”, or “football”. Or automatically post your del.icio.us bookmarks as a single post in your blog on a daily basis using yadd. Or combine a GeoRSS blog feed with geo-tagged Flickr images. Or upcoming.org events with rsswether.com… […]

  36. arnet’s Blog » Blog Archive » links for 2005-11-27 Says:

    […] Nozell, rhymes with Oh Hell » Blog Archive » Yet Another DailyDelicious hack for WordPress (tags: del.icio.us wordpress tools) […]

  37. Vimes’s Garbled Nonsense » links for 2005-12-13 Says:

    […] Nozell, rhymes with Oh Hell » Blog Archive » Yet Another DailyDelicious hack for WordPress (tags: webtips) […]

  38. xtra’s blog » links for 2005-12-13 Says:

    […] Nozell, rhymes with Oh Hell » Blog Archive » Yet Another DailyDelicious hack for WordPress (tags: wordpress del.icio.us delicious plugin php plugins blog) […]

  39. The Website of Chris Drumgoole » links for 2005-12-13 Says:

    […] Yet Another DailyDelicious hack for WordPress This is another way to get daily del.icio.us links into Wordpress. It asks for just today’s bookmarks using the published api, parses the XML, generates nicely formatted HTML and creates a WordPress entry. (tags: wordpress del.icio.us plugins hacks) […]

  40. theory.isthereason » TheoryMail: How do I create “personalized” Daily Del.icio.us Posts? Says:

    […] Here’s how I do it Sorry to disappoint you Steve, it’s 50% automatic and 50% human labor. If you’re wondering why my link posts look different, it’s because I’m using a more complex way of doing this instead of the Daily Del.icio.us posts technique I mentioned last month. My method isn’t for the faint-hearted as it involves the Yet Another Daily Delicious (YADD) hack (secured) for WordPress and a unix cron job every night. I didn’t explain beyond this previously, but this is the link posting workflow: […]

  41. jcwinnie Says:

    Thanks.
    WFM (Works For Me) WordPress on a remote server

  42. links for 2005-12-25 at the Dogberry Patch Says:

    […] Yet Another DailyDelicious hack for WordPress a nice simple way to mirror my daily bookmarks that I’ve added to del.icio.us into WordPress (tags: wordpress 2Do plugin del.icio.us) […]

  43. Del.icio.us links for 12-24-2005 at the Dogberry Patch Says:

    […] Yet Another DailyDelicious hack for WordPress a nice simple way to mirror my daily bookmarks that I’ve added to del.icio.us into WordPress (tags: 2Do, del.icio.us, plugin, wordpress) […]

  44. links for 2006-01-01 at pedersondesigns Says:

    […] Nozell, rhymes with Oh Hell » Blog Archive » Yet Another DailyDelicious hack for WordPress I’m toying around with pulling in a “daily del.icio.us” feature into my blogging. We’ll see where that goes. (tags: del.icio.us) […]

  45. Nozell, rhymes with Oh Hell » Updated to Wordpress 2.0 Says:

    […] As with previous Wordpress upgrades this one was also painless.  My ‘Yet Another Daily Delicious‘ and ‘Yet Another Weekly Delicious‘ continue to work also. I’ve not yet restored the style sheet header (this one) or added back some of the other doodads. […]

  46. links for 2006-01-09 at legobuff.com Says:

    […] Yet Another DailyDelicious hack for WordPress (tags: blog wordpress tools) […]

  47. Bregt Blogt » Blog Archief » Yet Another DailyDelicious hack Says:

    […] Na een zoektocht met Google vond ik een php-script van Nozell, Yet Another DailyDelicious (yadd), waarmee je dagelijks een overzicht van je del.icio.us bladwijzers kunt laten publiceren. Het script wordt door de server op een vast tijdstip uitgevoerd, dus je hebt er verder geen omkijken meer naar en toch dagelijks automagisch een bericht op je blog. […]

  48. Grade Level Gold » Blog Archive » Today’s del.icio.us bookmarks Says:

    […] Nozell, rhymes with Oh Hell » Blog Archive » Yet Another DailyDelicious hack for WordPress – Tagged as: del.icio.us delicious […]

  49. Klintron Says:

    I’m having trouble setting up a chronjob to do this… I’ve googled for instructions on chronjobs, but I’m having trouble finding anything relevant. Am I understanding this right:

    Put the script in the same directory as WP on my server
    Also create a file called yadd.sh and put it there as well
    Set a chron job to yadd.sh

    I tried this and it didn’t seem to do anything.

    Any help would be appreciated.

    If it helps, my host is 1and1.com

  50. Klintron's Brain Says:

    Chronjob help?…

    Another plea for help from my readership:
    I’m trying to use this WordPress hack to import my del.icio.us bookmarks in WP: YADD.
    I’m having trouble figuring out how to setup the chronjob right. If anyone could help me out, or at least point…

  51. Marc Nozell Says:

    Try searching for ‘cron’ (not ‘chron’) or ‘crontab’. Wikipedia’s Crontab page does a good
    job of describing it. Also check your man pages (eg: man -k cron)

  52. Klintron Says:

    OK thanks… just to make sure, I am supposed to create a text file called yadd.sh on my server, correct? All told, I should have yadd.php, yadd.sh, and a crontab file?

  53. aoiro-blog » Yet Another DailyDelicious hack for WordPress Says:

    […] Yet Another DailyDelicious hack for WordPressこれをやってみようと思っているのですが・・思うだけで時間がない。 […]

  54. links for 2006-03-27 at Brandon’s Blog Says:

    […] Yet Another DailyDelicious hack for WordPress A complex hack for Delicious to create a daily post for WordPress (tags: blogging hack) […]

  55. lepard.org » Today’s del.icio.us bookmarks Says:

    […] Cannot Access Web Address – Tagged as: restricted unfiled Nozell, rhymes with Oh Hell » Yet Another DailyDelicious hack for WordPress – Tagged as: del.icio.us plugin wordpress The Several Habits of Wildly Successful del.icio.us Users » Slacker Manager – Tagged as: del.icio.us howto tips Spinning the Election – Tagged as: spintactics EasyBib: Free Automatic Bibliography Composer - MLA and APA formatting – Tagged as: tools writing Google Calendar – Tagged as: google del.icio.us tag cloud v1.0 » nickbouton.com – Tagged as: del.icio.us plugin wordpress WordPress › Error – Tagged as: dugg Wired News: The Man Behind Scrambled Hackz – Tagged as: music […]

  56. گزیر » روزی هر روز Says:

    […] این طوری فقط لازم است من زنده باشم Ùˆ هر روز در اینترنت چرخ بخورم Ùˆ علامت بزنم! بعد ساعت بیست Ùˆ سه Ùˆ پنجاه Ùˆ نه دقیقه یکی می‌آید اینجا Ùˆ تولید محتوی می‌کند! قابل توجه کسانی Ú©Ù‡ به کفگیرشان به ته دیگ خورده.  […]

  57. Hamid Reza Mohammadi Says:

    Please take a look at http://blog.del.icio.us/blog/2006/05/feel_secure.html in del.icio.us blog.

  58. BiZwiKi.CN - å–§é—¹ PK 噪音 » Blog Archive » 让Blog每天自动发布del.icio.us Says:

    […] 这里还有几篇del.icio.us 进阶应用的文章,欢迎阅读: Yet Another Daily Delicious The Several Habits of Wildly Successful del.icio.us Users Firefox del.icio.us bookmarklet […]

  59. nigel Says:

    Great post and I’ve introduced into my teamblog.

  60. herebox » archives » Yet another weekly del.icio.us with curl Says:

    […] You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your ownsite. […]

  61. elliptical . . . » Blog Archive » links for 2006-06-16 Says:

    […] Yet Another DailyDelicious hack for WordPress (tags: wordpress Tools plugin del.icio.us blogging) […]

  62. links for 2006-06-16 // willkoca Says:

    […] Nozell, rhymes with Oh Hell » Yet Another DailyDelicious hack for WordPress (tags: delicious wordpress blogging) […]

  63. willkoca » Archive » links for 2006-06-17 Says:

    […] Nozell, rhymes with Oh Hell » Yet Another DailyDelicious hack for WordPress (tags: delicious wordpress blogging) […]

  64. ThatchSpace » links for 2006-06-22 Says:

    […] Nozell, rhymes with Oh Hell » Yet Another DailyDelicious hack for WordPress Not tried yet (tags: blog Del.icio.us hacks php tech wordpress) […]

  65. links for 2008-07-31 | Digi blog Says:

    […] DailyDelicious hack Yet Another DailyDelicious hack for WordPress […]

  66. This is Tyler Fitch » Blog Archive » links for 2008-10-09 Says:

    […] Nozell, rhymes with Oh Hell » Blog Archive » Yet Another DailyDelicious hack for WordPress (tags: wordpress plugin del.icio.us blogging) Posted in del.icio.us | […]

  67. links for 2007-04-27 « artxtra Says:

    […] Nozell, rhymes with Oh Hell » Blog Archive » Yet Another DailyDelicious hack for WordPress (tags: wordpress del.icio.us plugin) […]

Leave a Reply