Manual:Pywikipediabot/category.py/ko
From MediaWiki.org
This page was moved from MetaWiki.
It probably requires cleanup – please feel free to help out. In addition, some links on the page may be red; respective pages might be found at Meta. Remove this template once cleanup is complete.
Subversion repository of Wikimedia has this file:
| 언어: | English • Català • Italiano • 한국어 |
|---|
분류를 조작할 때 쓰는 pywikipedia 스크립트입니다.
(경고. Python 2.4 버전이 필요합니다.)
문법:
python category.py [global-arguments] action [-option]
"action" 인자로서는 다음 중 하나를 사용합니다.
* add - 지정된 목록에 있는 문서에 분류를 추가합니다. * remove - 분류에 있는 모든 문서에서 분류를 제거합니다. * move - 분류에 있는 모든 문서를 다른 분류로 옮깁니다. * tidy - 문서를 분류의 하위 분류로 이동해서 분류를 정리합니다. * tree - 지정된 분류의 하위 분류를 트리 구조로 보여줍니다. * listify - 분류에 있는 모든 문서의 목록을 작성합니다.
"option" 인자로서는 다음을 사용합니다.:
* -person - 인명을 성으로 정렬합니다(add 옵션과 같이 사용).
* -rebuild - 데이터베이스를 리셋합니다.
* -from: - move 옵션에서, 옮겨질 대상이 있는 분류를 지정합니다.
remove 옵션에서, 제거될 분류를 지정합니다.
listify 옵션에서, 목록을 만들 분류를 지정합니다.
* -to: - move 옵션에서, 문서가 옮겨질 분류를 지정합니다.
- listify 옵션에서 만들어질 목록의 이름을 지정합니다.
NOTE: If the category names have spaces in them you may need to use a
special syntax in your shell so that the names aren't treated as separate
parameters. For instance, in BASH, use single quotes, e.g. -from:'Polar bears'
* -batch - Don't prompt to delete emptied categories (do it automatically).
* -summary: - Pick a custom edit summary for the bot.
* -inplace - Use this flag to change categories in place rather than
rearranging them.
* -delsum - An option for remove, this specifies to use the custom edit
summary as the deletion reason (rather than a canned deletion reason)
* -overwrite - An option for listify, this overwrites the current page with the
list even if something is already there.
* -showimages - An option for listify, this displays images rather than linking them
in the list.
* -talkpages - An option for listify, this outputs the links to talk pages of the
pages to be listified in addition to the pages themselves.
* -recurse - Recurse through all subcategories of categories.
* -match - Only work on pages whose titles match the given regex (for move and remove actions).
"tidy"와 "tree"라는 action을 사용하실 경우, 봇(bot)은 분류 구조(category structure)를 로컬 파일 "category.dump"에 저장할 것입니다. 이렇게 함으로써 시간을 아끼고 서버 부하를 줄여 줍니다. 하지만 이 덤프를 나중에 또 다시 사용하려고 할 경우에는 이 덤프가 최근 것으로 갱신되지 않은 것이 되게 됩니다. 이 때에는 "-rebuild" 옵션을 부여해 주십시오.
만약 기존의 분류에다가 다른 분류 하나를 추가하시고 싶은 경우 다음과 같이 사용하십시오:
category.py move
기존 분류를 입력하라고 할 것입니다.
OldCategoryname
"분류:" 접두어 없이 분류를 입력하십시오.
새로운 분류를 입력하라고 할 것입니다.
NewCategoryName
