Упутство:Пајвикибот/Компат/Основно коришћење

From mediawiki.org
This page is a translated version of the page Manual:Pywikibot/Compat/Basic use and the translation is 48% complete.

Коришћење

Погледајте Create a shortcut за кориснике виндоуза.

Бирање и покретање бот скрипте

Сада када сте инсталирали Пајтон и Пајвикибот, потребно је да дођете до текстуалног интерфејса за ваш оперативни систем.

Приступање пајвикиботу

Након што сте креирали фајл под именом user-config.py , можете приступити пајвикиботу.

On Windows this is done by opening the start menu, and clicking on 'Run'. You are asked to give the name of a program, type "cmd.exe".

  • Change the root to C: by typing chdir C:\
  • Type chdir \"name of the folder where pywikibot has been downloaded" (For example: chdir \"pywikibot" if the file is in the C: folder.)

Можда ће бити потребно да урадите следеће кораке:

  • Move the folder httplib2 that is in the subfolder externals one level up.
  • All scripts that you would like to use need to be copied from the scripts subfolder to the main folder. This includes login.py.

On Mac, find Terminal.app in /Applications/Utilities, see Mac Installation.

On Linux or any other Unix, use any terminal application such as gnome-terminal, konsole, xterm, or simply the text-mode console.

In compat, run the script login.py by typing "python login.py". If you don't have user-config.py yet, this command will interactively create it.

In core, from the core directory, run the script login.py by typing "python pwb.py login". If you don't have user-config.py yet, this command will interactively create it.

pwb.py does add the core directory to the `PATH` variable so that python sees the pywikibot directory. There are other ways to fix this like adding the core directory (or any directory containing the pywikibot directory) to `PATH` or `PYTHONPATH`.
Уношење лозинке

Пајтон ће онда приказати:

Password for user your_bot on your_site:en:

Use the password you used for the bot's login name. Note that your input will not be visible for privacy reasons. The bot can't work anonymously. Unless you change your password, you normally need to run this program only once, the bot usually does not get logged off.

Коришћење бота

Ботови су у главном фолдеру када су преузети

If necessary, use the command cd to go to the directory where the bot files are saved.

Now run any of the bots here by typing "python botname.py" (If you are using Windows, you can leave out "python").

Скрипте

Главна страна: Manual:Pywikibot/Scripts

Аргументи командне линије

Although many bot scripts have their own command line arguments, which should be documented on their respective pages (or in their source code), all bots unless specifically stated to the contrary recognize the following command line arguments:

(цела листа се налази овде: Manual:Pywikibot/Global Options )

-help
Print a list of global bot arguments (this list), followed by bot-specific help if available.
-lang:xx
Set the language of the wiki you want to work on to language code xx, overriding the configuration in user-config.py.
-family:xyz
Set the family of the wiki you want to work on, e.g., wikipedia, wiktionary, wikitravel, ... This will override the configuration in user-config.py.
-user:xyz
Log in as user 'xyz' instead of the default username.
-log
Enable the logfile. Logs will be stored in the logs subdirectory.
-log:xyz
Enable the logfile, using xyz as the filename.
-nolog
Disable the logfile (if it's enabled by default).
-putthrottle:nn
Set the minimum time (in seconds) the bot will wait between saving pages. The default value is 10.

На пример, python scriptname.py -family:wiktionary ће радити "имя_сценария" бот На виктионари члана, переопределяя подразумевана вредност је породичном окружењу у вашој конфигурацији корисника.

Дозвола за пројекте Викимедије

Уверите се да је ваш бот одобрен од стране Вики заједнице, где намеравате да га користите: погледајте политика глобалног бот права за упутства. Строгост се разликује између различитих пројеката.

Уз помоћ обичног претраживача, направите корисничко име и лозинку за бота. Најбоље је да користите име које јасно даје да разумемо да је бот, а пожељно је и ко је њен рад. Најчешћи начин је да користите своје корисничко име и додати речи "бот", али неколико других облика такође постоје.