사용자토론:WonRyong/Bot Howto

(사용자토론:멀뚱이/봇 사용법에서 넘어옴)
마지막 의견: 18년 전 (WonYong님) - 주제: followlive.py

followlive.py 편집

우와, 이거 그냥 윈도우탐색기에서 더블클릭하니까, 자동으로 새로 만들어진 문서들이 한글 안깨지고 그냥 나온다. 우와~ 끝장임!! --WonYong (talk) 2006년 1월 2일 (월) 18:00 (KST)답변

The pywikipedia bot 편집

I use the pywikipedia bot (specifically Solve disambiguation.py) for much of the link repair that I do. All of the discussion here is about using the bot for link repair.

How it works 편집

  • Solve disambiguation.py visits a disambigaution page that you specify, and numbers each of the wikilinks.
  • It then visits pages from the "What links here" of the dab, and presents them to you one at a time
  • It shows you 60 characters around the link that needs to be repaired, and lets you type in an option. You can unlink it, skip it, or type in a number corresponding to a wikilink from the dab
  • The bot will find the next link to be repaired in the article, or save and move onto the next article.

Installation 편집

The installation process was a little confusing to me the first time I did it, so I thought I'd provide some simple (hopefully) instructions for Windows users. I still recommend you read through all the docuemtnation at WP:BOTS, Meta:Using the python wikipediabot. You can't use the bot effectively unless you know what disambiguation link repair is all about, I'd say at least a month of DPL is needed before you progress to the bot.

  • After creating a new user that the bot will operate under (eg Commander Keane bot) visit the talk of WP:BOTS, and state your case for having a bot. Once you are cleared for a trial run place the bot in the Bots running without a flag section.
  • Download and install Python [1]
  • Download and intall TortioseCVS [2]
  • Create a new folder on your computer (I just made up a new one on the desktop). Right-click on the folder and click "CVS checkout...".
  • Fill in this info, then hit OK:
Protocol: Password server (:pserver:)
Server: cvs.sf.net
Port <leave blank>
Repository folder: /cvsroot/pywikipediabot
User name: anonymous
Module pywikipedia
  • The bot is now in a "pywikipedia" folder within the folder you created a minute ago. Go into the "pywikipedia" folder, copy all the files and paste them into your python folder. For me that was "C:\Program Files\Python24".
  • In the Python folder, create a new file called "user-config.py", you need to write in some info, for example the contents of my "user-config.py" are:
mylang = 'en'
usernames['wikipedia']['en'] = 'Commander Keane bot'
  • Double click on the "login.py" file.
  • Now you can use the bot. You can update the bot at anytime by right clicking on your python folder (eg Python24) and selecting CVS Update.

How to use the bot 편집

Starting the bot 편집

Solve disambiguation.py is the part of the bot that does link repair. You can open it simply by double clicking it, or from the command prompt:

  • Start | Run | "cmd" (to open the command prompt)
  • "cd C:\progra~1\python24" (to get to the python folder)
  • "python solve_disambiguation.py"

Even though it takes much longer, by using the command prompt you can specify options. For example:

  • "python solve_disambiguation.py -main"

will let you only work on the main namespace. You can't use options like this when you just double click on the "solve_disambiguation.py" icon. Also, you can make an icon to do the the four steps above, then the bot (with the -main option) will only be a double click away). Ask me if you are interested in that.

Either way, the bot will ask "Which page to check:". Type in the dab's name and away you go.

CKAQ 편집

This a selction of questions which I have asked (mainly the very generous and ever knowledgeable RussBlau).

How do you stop the bot beeping? 편집

In the "user-config.py" file, add the line " ring_bell = False;"

Can you personalise the edit summary? 편집

Yes. In the "user-config.py" file, add the line:

disambiguation_comment['wikipedia']['en'] = "Robot-assisted disambiguation ([[WP:DPL|you can help!]]): %s"
"WonRyong/Bot Howto"의 사용자 문서로 돌아갑니다.