Manual:Pywikibot/pagefromfile.py/ar

pagefromfile.py هو نص برمجي يُستخدم في لرفع الصفحات إلى ويكي من ملف نصي.

هذا البوت يأخذ دخله من ملف نصي بترميز UTF-8 يحتوي على عدد من الصفحات سوف تُوضَع على الويكي. ينبغي أن يكون بالصفحات نفس نص البداية ونص النهاية (واللذان قد لا يتداخلان). نصا البداية والنهاية لن يُرفعا مع محتوى الصفحة افتراضيًا.

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.

Specific arguments
If the page to be uploaded already exists, it is skipped by default. But you can override this behavior if you want to:

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.

Basic example
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.

Different page titles
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.:.