Manuale:Edit.php

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:Edit.php and the translation is 65% complete.

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎magyar • ‎polski • ‎português • ‎português do Brasil • ‎русский • ‎日本語

Dettagli

edit.php file is a maintenance script to edit an article from the command line.

Uso

php edit.php [options...] <title>

Opzioni

Opzione/parametro Descrizione
-u <user> Nome utente
-s <summary> Sommario delle modifiche
-m Modifica minore
-b Modifica bot (nascosta)
-a Enable autosummary
--no-rc Non mostrare il cambiamento nelle ultime modifiche

If the specified user does not exist, it will be created. If no username has been provided, the edit will be attributed to user "Maintenance script", created if needed. The text for the edit will be read from stdin.

Esempi

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.

Vedi anche