Topic on Project:Support desk

Reception123 (talkcontribs)

Hello. I need to dummy edit a list of pages, so that they update Special:IndexPages. Is there an existing script for this so I can use it with edit.php?

AhmadF.Cheema (talkcontribs)
Reception123 (talkcontribs)

Yes, but I need to be able to edit multiple articles at the same time (the list is large, so it would take a lot doing it manually), therefore I wonder if someone made a script for this, or if there's another way.

AhmadF.Cheema (talkcontribs)
Ciencia Al Poder (talkcontribs)

You can write a small shell script to run edit.php with getText.php for a list of pages

Reception123 (talkcontribs)

Ok, that's what I thought. Was just asking in case someone had already done so. Thanks!

Reception123 (talkcontribs)

I have written one here but I'm getting " is not a valid title." Not sure what mistake I made for the script

<while read index; do

       php /srv/mediawiki/w/maintenance/getText.php "$index" --wiki testwiki | php /srv/mediawiki/w/maintenance/edit.php "$index" --wiki testwiki

done <test.txt

Ciencia Al Poder (talkcontribs)

Looks like $index is not correctly initialized... Have you tried using a real page name instead of a variable?

Reception123 (talkcontribs)

Looks like even though it says "Not found" the null edits still work.