DW-thataway
Sep. 16th, 2010 07:01 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
So, draft 1 of http://www.chiark.greenend.org.uk/~adamb/dw-thataway.pl.txt .
It runs through DW posts, finding LJ entries that have already been cross-posted or imported to DW, and for some subset of them based on things like their visibility, date, length, whether they contain polls, and so on, edits them so that their text is commented out (possibly with a snippet of the original post), adding a note saying that the post has been moved to such-and-such a DW post which is thataway.
I've tested it on my test account, and it seems to do what it's supposed to, but more testing is needed; if you're brave enough to be a guinea pig on this, bug reports would be most welcome.
Also, feel free to mine the script for snippets of code that work with the XMLRPC API. I haven't specified a license yet, but basically do what you like, and it'd be nice but not obligatory to credit me.
It runs through DW posts, finding LJ entries that have already been cross-posted or imported to DW, and for some subset of them based on things like their visibility, date, length, whether they contain polls, and so on, edits them so that their text is commented out (possibly with a snippet of the original post), adding a note saying that the post has been moved to such-and-such a DW post which is thataway.
I've tested it on my test account, and it seems to do what it's supposed to, but more testing is needed; if you're brave enough to be a guinea pig on this, bug reports would be most welcome.
Also, feel free to mine the script for snippets of code that work with the XMLRPC API. I haven't specified a license yet, but basically do what you like, and it'd be nice but not obligatory to credit me.
no subject
Date: 2010-09-17 08:11 am (UTC)no subject
Date: 2010-09-17 11:25 pm (UTC)I haven't used this script yet, but I wanted to point out that if you use challenge-response auth, you may not need to do a getchallenge/response with every call; you should instead be able to make an XML-RPC call once for sessiongenerate, which will give you a cookie; I believe you should then be able to use the "cookie" auth_method and send two extra headers: "X-LJ-Auth: cookie" and "Cookie: ljsession=$cookie", where $cookie is the value you got from sessiongenerate.
It's been a while since I've tried this though, and I forget whether it worked or not. I should try again.
no subject
Date: 2010-09-18 10:26 am (UTC)Mark says there's a workround - do you know anything about this? http://bugs.dwscoalition.org/show_bug.cgi?id=2217#c3