List Info

Thread: Mass deletion of articles




Mass deletion of articles
user name
2006-11-02 14:12:37
> Any ideas or hints how mass deletion of articles can be
accomplished
by 
> date, by author and by namespace?
> THX, HeinzJ

You can use maintenancedeleteBatch.php which accepts a file
where each
line is a page title, including the namespace prefix, to
delete. To
create the list you will need write the required SQL; do you
need some
hints on this? You can use MySQL Query Browser tool to
export the
results to a text file, though you will need to format the
file to be
suitable for deleteBatch.php. For example MySQL Query
Browser 1.1.20
will output the following:

"page_title","page_id"
"Announcements",28650
"Contribute",28649
"Features",28740
"Highest_rated_pages",28700
"Main_Page",1

from the query: select page_title from pages where
page_namespace=0
you will want to format it to:

Announcements
Contribute
Features
Highest_rated_pages
Main_Page

You can use: sed -e "1,1d" -e "/^$/d" -e
"s/"//g" -e "s/,[0-9]*//"
to achieve this. I have not investigated if you can export
the results
from the mysql cmd prompt and avoid having the extra step
with sed.

Matt

_______________________________________________
MediaWiki-l mailing list
MediaWiki-lWikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )