pseudomonas: "pseudomonas" in London Underground roundel (Default)
pseudomonas ([personal profile] pseudomonas) wrote2010-09-16 07:01 pm

DW-thataway

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.
pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)

[personal profile] pne 2010-09-17 08:11 am (UTC)(link)
I'm rather partial to the "MIT License" myself: a very permissive free licence.
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)

[personal profile] sophie 2010-09-17 11:25 pm (UTC)(link)
Hi! I came here from http://lj-refugees.dreamwidth.org/24257.html . :)

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.