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
Could this be modified to make the posts on a weekly basis rather than daily?
ReplyDeletethat 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.
ReplyDelete[...] he other solutions don’t rely on. Luckily, I stumbled across Marc Nozell’s DailyDelicious Hack that relies on [...]
ReplyDelete[...] (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 [...]
ReplyDeletePhrsnant , I think it can be modified that way ... but... I would also like to know HOW
ReplyDeleteYet Another DailyDelicious Patch
ReplyDeleteI 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'...
Yet Another DailyDelicious Patch
ReplyDeleteI 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...
Extremely useful little script.
ReplyDeleteI wrote a patch that prevents yadd.php from posting if there are no links for that day. It is available here.
[...] der: General blog useful — Marc Nozell @ 7:05 pm
ReplyDeleteI’ve updated my Yet Another Daily del.icio.us (yadd.php) so it can be c [...]
Nice plugin, if you get a chance to develop it, I would really like to see the following:
ReplyDeleteMake 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.
Enhanced Daily Del.icio.us plugin
ReplyDeleteWorking 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...
Daily Delicious and POP3Gateway
ReplyDeleteI 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...
[...] s heb je enorme bezwaren stel me dan op de hoogte Het update script is voor de liefhebber hier te vinden.
ReplyDeleteComments
»
[...]
[...] Plugins Database (nice xhtml/javascript interface) (tags: wordpress plugins plugin) Marc Nozell’s mini-blog » Blog Archive » Yet Another Da [...]
ReplyDelete[...] that this made for an ideal “remaindered links” wordflow. This script, called Yet Another Daily Delicious (YADD), is quite robust in [...]
ReplyDelete[...] 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 [...]
ReplyDeleteit seem like the script is broken due to delicious api issue ?
ReplyDeleteI get the following errors:
ReplyDeleteWarning: 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?
lazopolis,
ReplyDeleteIt looks like from the writeup in the manual page for fopen (http://us2.php.net/fopen) that is could be a configuration issue.
-marc
[...] 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. [...]
ReplyDelete[...] 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! [...]
ReplyDeleteI 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.
ReplyDeleteI'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.
Marc -
ReplyDeleteDoes 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.
[...] 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. [...]
ReplyDelete[...] (YADD) hack for WordPress and a Cron job every night. Don’t get me started… Listen to this article| [...]
ReplyDeleteI get the following error message:
ReplyDeleteFatal 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?
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.
ReplyDeleteNever mind, I got it working. It seems I had a typo in the location of my Wordpress location.
ReplyDeleteThanks for a great hack!
[...] 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… [...]
ReplyDelete[...] Nozell, rhymes with Oh Hell » Blog Archive » Yet Another DailyDelicious hack for WordPress (tags: webtips) [...]
ReplyDelete[...] Nozell, rhymes with Oh Hell » Blog Archive » Yet Another DailyDelicious hack for WordPress (tags: wordpress del.icio.us delicious plugin php plugins blog) [...]
ReplyDelete[...] 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) [...]
ReplyDelete[...] 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: [...]
ReplyDeleteThanks.
ReplyDeleteWFM (Works For Me) WordPress on a remote server
[...] 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) [...]
ReplyDelete[...] 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) [...]
ReplyDelete[...] 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. [...]
ReplyDelete[...] Yet Another DailyDelicious hack for WordPress (tags: blog wordpress tools) [...]
ReplyDelete[...] Nozell, rhymes with Oh Hell » Blog Archive » Yet Another DailyDelicious hack for WordPress – Tagged as: del.icio.us delicious [...]
ReplyDeleteI'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:
ReplyDeletePut 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
Chronjob help?...
ReplyDeleteAnother 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...
Try searching for 'cron' (not 'chron') or 'crontab'. Wikipedia's Crontab page does a good
ReplyDeletejob of describing it. Also check your man pages (eg: man -k cron)
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?
ReplyDelete[...] Yet Another DailyDelicious hack for WordPress A complex hack for Delicious to create a daily post for WordPress (tags: blogging hack) [...]
ReplyDelete[...] 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 [...]
ReplyDelete[...] این طوری Ùقط لازم است من زنده باشم Ùˆ هر روز در اینترنت چرخ بخورم Ùˆ علامت بزنم! بعد ساعت بیست Ùˆ سه Ùˆ پنجاه Ùˆ نه دقیقه یکی می‌آید اینجا Ùˆ تولید Ù…ØØªÙˆÛŒ می‌کند! قابل توجه کسانی Ú©Ù‡ به Ú©Ùگیرشان به ته دیگ خورده.  [...]
ReplyDeletePlease take a look at http://blog.del.icio.us/blog/2006/05/feel_secure.html in del.icio.us blog.
ReplyDeleteGreat post and I've introduced into my teamblog.
ReplyDelete[...] You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your ownsite. [...]
ReplyDelete[...] Yet Another DailyDelicious hack for WordPress (tags: wordpress Tools plugin del.icio.us blogging) [...]
ReplyDelete[...] Nozell, rhymes with Oh Hell » Yet Another DailyDelicious hack for WordPress (tags: delicious wordpress blogging) [...]
ReplyDelete[...] Nozell, rhymes with Oh Hell » Yet Another DailyDelicious hack for WordPress (tags: delicious wordpress blogging) [...]
ReplyDelete[...] Nozell, rhymes with Oh Hell » Yet Another DailyDelicious hack for WordPress Not tried yet (tags: blog Del.icio.us hacks php tech wordpress) [...]
ReplyDelete[...] DailyDelicious hack Yet Another DailyDelicious hack for WordPress [...]
ReplyDelete[...] 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 | [...]
ReplyDelete[...] Nozell, rhymes with Oh Hell » Blog Archive » Yet Another DailyDelicious hack for WordPress (tags: wordpress del.icio.us plugin) [...]
ReplyDelete[...] Nozell, rhymes with Oh Hell » Blog Archive » Yet Another DailyDelicious hack for WordPress (tags: Wordpress Delicious) [...]
ReplyDelete[...] Yet Another DailyDelicious hack for WordPress « Nozell, rhymes with Oh Hell (tags: wordpress blogging delicious plugin del.icio.us) [...]
ReplyDelete[...] Yet Another DailyDelicious hack for WordPress « Nozell, rhymes with Oh Hell 979 none [...]
ReplyDelete