Have you tried:
php rebuildData.php -v --categories="Some_category_name" --skip-properties
I'm not actually certain on the syntax of categories...guessing it'd be "Some_category_name,Another_category". The docs [1] also give the option to do this instead of categories: --query='[[Category:SomeCategory]]'
I believe we've talked in the past that rebuildData.php wouldn't work for your case, but I think as long as you don't include the -f option (which wipes out all SMW data first) it should work. Also the addition of --skip-properties may be necessary
[1] https://www.semantic-mediawiki.org/wiki/Help:Maintenance_script_rebuildData....
--James
On Tue, Oct 23, 2018 at 9:27 AM Evans, Richard K. (GRC-H000) via Semediawiki-user semediawiki-user@lists.sourceforge.net wrote:
I should clarify --- I'm creating a calculated Boolean property called "is expired" and using a date calculation in the template to set it to true or false. This is ultimately what I want updated every night. Then those pages that are newly calculated as "is expired=true" can be made to go into a Category called "Expired Items" that users can then "watch" using the extension "CategoryWatch", thus generating email notifications.
Does that make sense?
Is there a maintenance script that would perform a "null-edit" of every page (or all pages in a category)?
-Rich
-----Original Message----- From: Evans, Richard K. (GRC-H000) Sent: Monday, October 22, 2018 2:36 PM To: mediawiki-l@lists.wikimedia.org; semediawiki-user@lists.sourceforge.net Subject: API call to purge all pages in a specific category
Folks,
Quick MW 1.30 question regarding remote refreshing of pages needed by a SMW application.
Can someone tell me how to write an API call that Purges all pages in a specific category?
Background --- I have a semantic "Class" (a Form, Template, and Category set of pages that work together) called "MyTasks" that produces task tracking pages with a few date fields including one called "Property:has date needed by" (of type date)--- Within "Template:MyTasks", I have manually added an additional semantic property that is not used by the Form. It is called "Property:has days till due" (of type number). Also within the template I calculate the difference in the number of days between the current system time of the client where the page is being viewed and the "has date needed by" provided previously by the form. The goal is to be able to write a semantic query that show all tasks that are due in less than 10 days. For example: {{#ask:[[Category:MyTasks]][[has days till due::<10]]|format=ol}}
The problem is ---- I need to refresh the wiki pages in Category:MyTasks every night so that the "has days till due" value gets updated each day.
My thought is to have an API call that purge all files in a given category I can add that to a cURL command in a PHP file on the server that I can call nightly from a cron job.
Thanks! -Rich
Semediawiki-user mailing list Semediawiki-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-user