Kézikönyv:Edit.php
| MediaWiki-fájl: edit.php | |
|---|---|
| Könyvtár: | maintenance/ |
| Forráskód: | master • 1.45.3 • 1.44.5 • 1.43.8 |
| Osztályok: | EditCLI |
Részletek
Az edit.php szócikkek parancssorból való szerkesztését lehetővé tevő karbantartószkript.
Használat
php edit.php [options...] <title>
Paraméterek
| Paraméter | Leírás |
|---|---|
-u <user> |
Felhasználónév |
-s <summary> |
Szerkesztési összefoglaló |
| -m | Apró változtatás |
| -b | Bot (rejtett) szerkesztés |
| -a | Automatikus összefoglaló engedélyezése |
| --no-rc | A változtatás elrejtése a friss változtatások közül |
Ha a felhasználó nem létezik, létrehozza. Ha nincs megadva felhasználónév, a szerkesztés Maintenance script néven hajtódik végre; ha nincs ilyen, létrehozza. A szerkesztés szövegét stdinből olvassa ki.
Példák
php edit.php -s "Quick edit" -m Page_I_want_to_edit < file_containing_wikitext
The above will edit the page Page_I_want_to_edit (marking the edit minor) so it contains the contents of the file file_containing_wikitext using the edit summary Quick edit.
php getText.php "page_title" | sed -e 's/\bfoo\b/bar/g' | php edit.php "page_title"
The above will take the text of the page page_title from your wiki, replace every occurrence of the word foo with the word bar, and save the result back to the page page_title.
You can do many complex text transformations of page text this way; see your unix manual's entry for sed.