W3C home > Mailing lists > Public > public-webplatform@w3.org > November 2013

Batch page editing, listing, deleting

From: Max Polk <maxpolk@gmail.com>
Date: Tue, 26 Nov 2013 12:15:23 -0500
Message-ID: <5294D72B.8020201@gmail.com>
To: renoir@w3.org
CC: List WebPlatform public <public-webplatform@w3.org>
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'

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

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

$ modified-wpd ls javascript/testpage

$ 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:
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:13:56 UTC