Batch page editing, listing, deleting

On 11/26/2013 9:20 AM, renoir@w3.org wrote:
> Hum,
>
> Interesting. That's something Ryan described me yesterday. Glad to see a solution already tested for the use case.  I was surprised to see no solution documented on the web.
>
> You should be able to run the commands on the test wiki.

Great, it works.  The script I've been enhancing for the JavaScript 
uploads now allows individual and batch page deletion.  Batch deletion 
speed is about a page a second.

Example individual delete: create a page using the file TEST.txt as its 
contents, then immediately delete it:

$ modified-wpd edit javascript/testpageF/x TEST.txt 'test page'
Success

$ modified-wpd delete javascript/testpageF/x 'remove test page'
Success

Example batch delete: use ls command to list pages with a certain 
prefix, then delete all of them:

$ modified-wpd ls javascript/testpage
javascript/testpage
javascript/testpage/second
javascript/testpageC
javascript/testpageD
javascript/testpageE/another

$ modified-wpd ls javascript/testpage > TODELETE.txt

$ modified-wpd batchdelete TODELETE.txt 'test pages to delete'
Delete javascript/testpage
Delete javascript/testpage/second
Delete javascript/testpageC
Delete javascript/testpageD
Delete javascript/testpageE/another
SUMMARY: deleted 5 pages in 5 seconds

The modified-wpd is in my github:
     https://github.com/maxpolk/msdn-js-conversion
Snag setenv.sh and modified-wpd.   Edit setenv.sh and source it in, then 
run modified-wpd with no args to see usage.  The api root should be 
http://test.webplatform.org/t for the test wiki.

Received on Tuesday, 26 November 2013 17:15:52 UTC