사용자토론:WonYong/봇 사용법

위키백과 ― 우리 모두의 백과사전.

목차

[편집] 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"