Saturday, 2 February 2013

Thread:Extension talk:User Merge and Delete/Mass merging?/reply (4)

Reply to Mass merging?


New page


I have a little awkward way to accomplish the bulk merge through a work-around. Hope someone would find it useful! (Must have a little string concatenation skills in spreadsheets; or one may use a python or similar script; or use a text editor with bulk replacement features)



1. Prepare a list of all SPAMuserIDs, store them in a spreadsheet or textfile.



2. The post method used for submitting the Merge & Delete User form (by clicking the button) should be converted to a get method. This will get us a long URL. See the second comment (by Matthew Simoneau) dated 13/Jan/2009) at http://www.mathworks.com/matlabcentral/newsreader/view_thread/242300 for the method.



The resulting URL string should be something like below:

: http: //(Your Wiki domain)/Special:UserMerge?olduser=(OldUserNameHere)&newuser=(NewUserNameHere)&deleteuser=1&token=0d30d8b4033a9a523b9574ccf73abad8%2B\



2. Now, divide this URL into four sections:

:A: http: //(Your Wiki domain)/Special:UserMerge?olduser=

:B: (OldUserNameHere)

:C: &newuser=(NewUserNameHere)&deleteuser=1

:D: &token=0d30d8b4033a9a523b9574ccf73abad8%2B\





3. Now using a text editor or spreadsheet, prefix each spam userIDs with part A and Suffix each with Part C and D. Part C will include the NewUser(which is a specially created single dummy userID). The Part D, the Token string is a session-dependent token that will be changed per user per session. So you will need to get a new token every time a new session/batch of work is required.



4. With the above step, you should get a long list of URLs, each good to do a Merge&Delete operation for one user. We can now create a simple HTML file, view it and use a batch downloader like DownThemAll in Firefox.



Add two more pieces "<a href=" and "> Linktext</a>" to each line at beginning and end. Also add <html><body> at top and </body></html> at bottom and save the file as (for eg:) userlist.html



5. Open the file in Firefox, use DownThemAll add-on and download all the files! Effectively, you are visiting the Merge&Delete page for each user and clicking the button!



Although this might look a lengthy and tricky job at first, once you follow this method, you can remove tens of thousands of users without much manual efforts.



You can verify if the operation is going well by opening some of the downloaded html files (or by looking through the recent changes in another window).

[[User:Viswaprabha|Viswaprabha]] ([[User talk:Viswaprabha|talk]]) 20:52, 2 February 2013 (UTC)

No comments:

Post a Comment