Markus Krötzsch пишет:
> On Montag, 12. Januar 2009, CNIT wrote:
>   
>> Hi!
>> At one of long running SMW site I was asked to delete pages which had
>> Properties of Date
>> type defined for some interval. There are hundreds of such pages. Maybe
>> a {{#delete}} parser function
>> can be implemented? Though I see the problem that text from the pages
>> wouldn't be erased, so when
>> someone re-save the page, property value would be restored :-(
>>
>> Or, perhaps, some kind of bot should be used instead? I've heard that
>> many tasks, like synchronization
>> of interlinks on wikipedia are performed by such bot-scripts (Python?> ).
>>     
>
> MediaWiki supports mass-deletion with a command line script. It takes as an 
> input a text file with the names of the pages to delete (I think one per 
> line). With #ask, you can easily create the text for this file (using 
> format=list | sep=<br /> | link=none | limit=Something Large), copy it to the 
> file, and run the script. I think this would be an acceptable solution, given 
> that mass deletion is not such a frequent task. Consider that even MW does 
> not 
> offer freely configurable mass deletion via its online interface. I think 
> this 
> is also a precaution for preventing various forms of accidents.
>
> Regards,
>
> Markus
>
>
>   
Markus Krötzsch пишет:
> On Montag, 12. Januar 2009, CNIT wrote:
>   
>> Hi!
>> At one of long running SMW site I was asked to delete pages which had
>> Properties of Date
>> type defined for some interval. There are hundreds of such pages. Maybe
>> a {{#delete}} parser function
>> can be implemented? Though I see the problem that text from the pages
>> wouldn't be erased, so when
>> someone re-save the page, property value would be restored :-(
>>
>> Or, perhaps, some kind of bot should be used instead? I've heard that
>> many tasks, like synchronization
>> of interlinks on wikipedia are performed by such bot-scripts (Python?> ).
>>     
>
> MediaWiki supports mass-deletion with a command line script. It takes as an 
> input a text file with the names of the pages to delete (I think one per 
> line). With #ask, you can easily create the text for this file (using 
> format=list | sep=<br /> | link=none | limit=Something Large), copy it to the 
> file, and run the script. I think this would be an acceptable solution, given 
> that mass deletion is not such a frequent task. Consider that even MW does 
> not 
> offer freely configurable mass deletion via its online interface. I think 
> this 
> is also a precaution for preventing various forms of accidents.
>
> Regards,
>
> Markus
>
>   
Thanks, generating of list file is a good idea!
I'll try with:

php $MW_INSTALL_PATH/maintenance/deleteBatch.php -u admin -r 
smw_property_delete generated_list

and after that

php 
$MW_INSTALL_PATH/extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php 
-p
php 
$MW_INSTALL_PATH/extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php

You're right that it's a rarely performed task and it's better to not 
allow users to perform it.

If someone else needs it, this way of mass deletion probably can be 
placed somewhere
in docs on http://semantic-mediawiki.org
Dmitriy

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to