Bulk rename/delete on many wiki pages in trac, how?
does trac web interface provide a way to delete, rename, etc. a lot o开发者_开发问答f wiki pages as a whole, without having to do the tedious task one by one and manually? Something like a checkbox for each page, followed by a Delete button.
Thanks
You can do this through the trac-admin
command-line utility. Use the syntax
trac-admin /path/to/project/env wiki remove WikiPageName
to remove a wiki page. You should be able to write a simple script that runs this command for every page in a list. You can use the wiki list
command to retrieve a list of all wiki pages, which might be useful if you are wanting to delete wiki pages whose names follow a particular pattern (also useful for deleting a page and all of its sub-pages).
update use bta's answer instead of this.
There is no trac interface I am aware of, but you might be able to do this by manually editing the database. For example SQLite Database Browser is able to open the db/trac.db
file and might be a little bit less tedious than manually using the trac interface. But make a backup before you try....
You have to edit the name field in the wiki table.
精彩评论