Manual:Pywikibot/pagefromfile.py/pt-br

pagefromfile.py é um script usado para carregar páginas para uma wiki a partir de um arquivo de texto.

This bot takes its input from the UTF-8 text file that contains a number of pages to be put on the wiki. The pages should all have the same beginning and ending text (which may not overlap). The beginning and ending text is not uploaded with the page content by default.

As a page name is by default taken the first text block from the page content marked in bold (wrapped between  and  ). If you expect the page title not to be present in the text or marked by different markers, use,  , and   parameters.

Argumentos específicos
Se a página a ser carregada já existe, ela é ignorada por padrão. Mas você pode anular este comportamento se quiser:

It is possible to define a separator after the 'append' modes which is added between the existing and the new text. For example a parameter  would add 'foo' between them. A new line can be added between them by specifying '\n' as a value.

Exemplo básico
In the most basic form, pagefromfile takes a single text file with several wiki pages in it as input. For example, the contents could be:

Store this as a UTF-8 encoded text file, for example as 'pages.txt'. You can then run. This will let the bot create Pywikibot and AutoWikiBrowser -- the first bolded elements in both pages. will give you the opportunity to review changes before they are being made.

Diferentes títulos de páginas
Often, the first bolded element is not necessarily the correct page title. For example, we might want to place the article about AutoWikiBrowser on AWB instead. To do so, add a line in front of each article, with the correct page title between triple quotes (i.e., bolded):

and add the  parameter to the call, i.e.:.