Why The Poor Should Be Blasted Out In To Space ([info]nounverb) wrote,
@ 2006-05-21 22:38:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
Delicious Glue Update
So my previous post about the formatting of the HTML in the post was wrong. I strike it up to having weird hours and overthinking problems. I've changed the regular expression from one which reformats the data structure to one which just removes whitespace between the LI and first DIV tag. It now produces a balanced, even output since LiveJournal has a hardon for subbing in HTML line breaks for plain text line breaks.

Delicious Glue,

Directions

unzip to any directory, upload to your web server, and point Delicious's Daily Post at the URL of lj.php.

Or just point your daily post at http://web.njit.edu/~js84/php/lj.php if you wish



(29 comments) - (Post a new comment)


[info]deafeuphoria
2006-05-22 08:11 am UTC (link)
Looks much better now. If I actually used Delicious, I'd be all over it.

(Reply to this)


[info]djwudi
2006-06-19 07:43 pm UTC (link)
Thanks for this -- just got it up and running myself, and it works like a charm.

(Reply to this)


[info]andrewducker
2007-04-30 10:18 am UTC (link)
Interesting one for you - I got this last night:
[subject] => Delicious LiveJournal Links for 4-29-2007 [year] => 2007 [mon] => 4 [day] => 29 [hour] => 23 [min] => 18 [props] => Array ( [taglist] => delicious glue,links ) ) postLJResponse : Something went wrong - 153 : Incorrect time value: You have an entry which was posted at 2007-04-30 00:25, but you're trying to post an entry before this. Please check the date and time of both entries. If the other entry is set in the future on purpose, edit that entry to use the "Date Out of Order" option. Otherwise, use the "Date Out of Order" option for this entry instead.
\n\n1 at /home/joshuas/utilities/dohour line 81

I had posted at 25 past midnight, and the del.icio.us logs say "Running at Mon Apr 30 03:21:11 2007 GMT"

Could this just be the time on your server being off? Or something else going wrong?

(and if you don't have the time/inclination to fix problems for random people on the internet then fair enough, I'll tinker with it in my own time...)

(Reply to this) (Thread)


[info]nounverb
2007-04-30 04:11 pm UTC (link)
yeah, it's my server time. it's EST. right now, I am in Japan, and I don't back post the entry to the time it was actually sent. i'll take a look at it sometime soon.

(Reply to this) (Parent)(Thread)


[info]andrewducker
2007-04-30 06:07 pm UTC (link)
Just checked out the code. It certainly looks like there will be problems unless the server is in the same timezone as the user. Which is a problem for me, as I'm in the UK and my hosting is in the US. I'll have a play and see if I can make it take account of an offset.

(Reply to this) (Parent)(Thread)


[info]nounverb
2007-04-30 11:01 pm UTC (link)
I am not sure if what delicious sends has a timestamp (it's been awhile since I had to check) or anything, otherwise this'd be a trivial fix to adjust the time data. If you make something I'll roll it in to the script.

(Reply to this) (Parent)(Thread)


[info]andrewducker
2007-05-02 08:13 am UTC (link)
I haven't had a chance to play with it, but a little digging found me this, which looks like what is needed:
http://www.php.net/manual/en/function.date.php#69167

(Reply to this) (Parent)

so...
[info]clintjcl
2007-06-05 02:14 am UTC (link)
How does it get my username? I mean, I use the same username on del.icio.us and LiveJournal, but what if I didn't? I don't see how it would even know who's account to pass it to. I see that it gets $username from $args[0] but.. um... who is feeding it that?

(Reply to this) (Thread)

Re: so...
[info]nounverb
2007-06-05 02:48 am UTC (link)
You configure it in delicious on the daily blog post page. You set "out_name" to be your LJ account. You don't modify that in code.

del.icio.us is feeding it that.

(Reply to this) (Parent)

Re: so...
[info]nounverb
2007-06-05 03:03 am UTC (link)
http://www.lifehacker.com/software/delicious/how-to-back-up-delicious-bookmarks-on-your-blog-159861.php

(Reply to this) (Parent)(Thread)

oops, that was a terribly stupid questiron
[info]clintjcl
2007-06-05 01:54 pm UTC (link)
The delicious instructions clearly said that.
And I clearly read it, when I set up my wordpress links-of-the-day posting. Oops! I should have remembered that the 2nd time! Sorry for the timewaster!

Anyway, I put your php onto my unix account (wasn't even sure if it was running php!), and my first links-of-the-day post to livejournal worked successfully! YAY!

I love that your PHP can magically repost something to livejournal.

Now my next question -- Can this PHP be employed to somehow crosspost my wordpress blogposts to LiveJournal? That's what I was REALLY looking for, when I found your script.

It seems that my RSS feed ( http://clintjcl.wordpress.com/feed/ ) should somehow be able to be input for your lj.php , allowing wordpress -> LJ crossposting. (Hell, allowing ANY rss -> LJ crossposting.)

That would definitely increase the value of your fine tool. I can read the code, but there's no way I can edit it to do what I am asking for, i'm just not web2.0 knowledgeable enough :)

(Reply to this) (Parent)(Thread)

Re: oops, that was a terribly stupid questiron
[info]nounverb
2007-06-05 02:48 pm UTC (link)
Livejournal can read any RSS feed as long as you have a paid account (or have a friend who has a paid account). All you have to do is add it through there. It's the best way to do it, honestly, prevents reinventing the wheel and such.

http://syndicated.livejournal.com/friedchknarcade/ my nonlj
http://syndicated.livejournal.com/remydwd/ a friend's nonlj


(Reply to this) (Parent)(Thread)

well
[info]clintjcl
2007-06-05 02:51 pm UTC (link)
but that would require me getting all my LJ friends to "Friend" this new feed, rather than my account. That's just unrealistic, to me. Depending on other peoples' actions never works as efficiently as doing it yourself. I actually want my wordpress.com blog postings to be on my http://clintjcl.livejournal.com :D

(Reply to this) (Parent)(Thread)

Re: well
[info]nounverb
2007-06-05 02:55 pm UTC (link)
Ah well, this isn't the scope of this script and I don't really plan on writing something which has a solution built in to LJ already :)

But if you're willing to pick up PHP my script isn't that horrible to pick through :)

Thanks for using it though!

(Reply to this) (Parent)(Thread)

found the right post
[info]clintjcl
2008-03-09 12:25 am UTC (link)
I just commented on an old post, but yea.. I'm starting to pick through your stuff a bit (6 months later).... I started using a program called mtsend.py which lets me make a text-file-versoin of my XMLRPC request, and it works beautifully for wordpress.

I realized it sends to an XMLRPC URL, and so I remembered this script. I tried to throw the same data at your delicious glue, and it failed. But it failed on the mtsend.py side because for LJ, it didn't recognize "CATEGORIES", only "KEYWORDS", and it also didn't recognize "EXTENDED BODY", which wordpress did.

So anyway, after making those fixes -- it worked perfectly! Via your delicious glue script, I could post to LJ. Without del.icio.us's help in the slightest. I see this as a way of crossposting to both Wordpress (where I get 1000+ views a day) and LiveJournal (where all my friends are).

Only problem is -- the subject doesn't make it through (it just says "delicious links" instead of the subject I give), and the keywords don't become LJ tags.

Any idea? I would love to get this working. I would love to be able to post to multiple blogs with ease!

(Reply to this) (Parent)


[info]snakeye
2007-06-12 09:00 pm UTC (link)
Thank you very much :)

(Reply to this)


[info]lonita
2007-08-22 12:47 am UTC (link)
Am I going to have to change the php file permissions to something executable, or will it work 'out of the box', so to speak?

(Reply to this) (Thread)


[info]nounverb
2007-08-23 01:36 am UTC (link)
It should work out of the box, it's not self-executing

(Reply to this) (Parent)(Thread)


[info]lonita
2007-08-24 07:38 am UTC (link)
I'm afraid the script didn't work for me, and I cannot make sense of the error messages. Would you be able to assist me in figuring out how/why it failed, and how we might go about fixing it?

(Reply to this) (Parent)


[info]xiombarg
2007-12-27 04:10 am UTC (link)
I like this script a lot.

One thing, though: I notice if I use quotation marks or single quotes (" or ') in my "Notes" field in del.icio.us, the resulting code posted to LJ ain't quite right. Try it for yourself.

I'm not a PHP expert by any means, but Google turned this up, which resembles the problem I was having:

http://www.phpbuilder.com/board/showthread.php?t=10151060

(Unfortunately I have no example at the moment as I fixed it by hand after the auto-post...)

(Reply to this) (Thread)


[info]nounverb
2007-12-27 04:23 am UTC (link)
Yeah this is longstanding and has to deal with how delicious and LJ handle this data, I've been really lazy about fixing it. I probably should.

(Reply to this) (Parent)

...not to be a pain
[info]jessearg
2008-06-18 04:29 am UTC (link)
but does directing at your url still work? (i get an "Access forbidden" screen every time i try and click on one of those links)

(Reply to this) (Thread)

Re: ...not to be a pain
[info]nounverb
2008-06-18 05:36 am UTC (link)
No, there's a new post in LJ clients about this.

http://community.livejournal.com/lj_dev/785034.html

(Reply to this) (Parent)(Thread)

Re: ...not to be a pain
(Anonymous)
2008-06-19 04:12 pm UTC (link)
sorry again, i just use the computer at the library so i don't have a "server running PHP5." do you think i could run my del.ici.ous through yours? i know there used to be a url you had posted with a promise not to use my password to turn my lj into a gorilla porn feed...

(Reply to this) (Parent)

qqUzVKcvev
(Anonymous)
2008-06-23 01:59 pm UTC (link)
sS3o8V dfv078fnw8f934ndvkg2l

(Reply to this)


(Anonymous)
2009-01-31 01:27 am UTC (link)
the link on lj_dev is dead and though someone else was kind enough to provide the zip i haven't been able to get delicious glue to work at all. i've tried running it on my own server and ripway but no dice.

i don't know if you've made code changes or if there was some kind of weird glitch with the zip i got but could you possibly re-upload the zip? i'd be eternally grateful.

-r

(Reply to this)


[info]ataxi
2009-02-07 02:40 pm UTC (link)
Hi -- just wondering if Delicious Glue is still maintained / available. The link from your post 403s for me. As I understand it, it's a tool for digesting del.icio.us links to LJ?

Would appreciate any advice you might have :-)

(Reply to this) (Thread)


[info]ataxi
2009-02-07 02:44 pm UTC (link)
I see there's another post after this for an update called Delicious Livejournal, the link for that one's broken too. Even if the code has become flaky I'd like a look at it, I'm a dev and might be able to fix or port it.

(Reply to this) (Parent)


[info]staceyuk
2009-07-29 03:02 pm UTC (link)
I get a 403 error when I try to download the script.

(Reply to this)


(29 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…