리눅스 Pywikibot 설치 편집하기

경고: 로그인하지 않았습니다. 편집을 하면 IP 주소가 공개되게 됩니다. 로그인하거나 계정을 생성하면 편집자가 사용자 이름으로 기록되고, 다른 장점도 있습니다.

편집을 취소할 수 있습니다. 이 편집을 되돌리려면 아래의 바뀐 내용을 확인한 후 게시해주세요.

최신판 당신의 편집
2번째 줄: 2번째 줄:


==다운로드 및 설치==
==다운로드 및 설치==
<syntaxhighlight lang='console'>
<source lang='console'>
root@zetawiki:~# wget http://tools.wmflabs.org/pywikibot/core_stable.tar.gz
root@zetawiki:~# wget http://tools.wmflabs.org/pywikibot/core_stable.tar.gz
--2016-03-28 20:13:04--  http://tools.wmflabs.org/pywikibot/core_stable.tar.gz
--2016-03-28 20:13:04--  http://tools.wmflabs.org/pywikibot/core_stable.tar.gz
14번째 줄: 14번째 줄:


2016-03-28 20:13:08 (9.18 MB/s) - ‘core_stable.tar.gz’ saved [28386664/28386664]
2016-03-28 20:13:08 (9.18 MB/s) - ‘core_stable.tar.gz’ saved [28386664/28386664]
</syntaxhighlight>
</source>
<syntaxhighlight lang='console'>
<source lang='console'>
root@zetawiki:~# tar xvzf core_stable.tar.gz
root@zetawiki:~# tar xvzf core_stable.tar.gz
core_stable/externals/httplib2/doc/html/_sources/index.txt
core_stable/externals/httplib2/doc/html/_sources/index.txt
21번째 줄: 21번째 줄:
core_stable/user-config.py.sample
core_stable/user-config.py.sample
core_stable/.travis.yml
core_stable/.travis.yml
</syntaxhighlight>
</source>


==설정==
==설정==
<syntaxhighlight lang='console'>
<source lang='console'>
root@zetawiki:~# cd core_stable/
root@zetawiki:~# cd core_stable/
root@zetawiki:~/core_stable# cat user-config.py.sample
root@zetawiki:~/core_stable# cat user-config.py.sample
35번째 줄: 35번째 줄:
family = 'wikipedia'
family = 'wikipedia'
usernames['wikipedia']['en'] = 'Test'
usernames['wikipedia']['en'] = 'Test'
root@zetawiki:~/core_stable# cp user-config.py.sample user-config.py
</source>
root@zetawiki:~/core_stable# vi user-config.py
</syntaxhighlight>
<syntaxhighlight lang='py'>
# -*- coding: utf-8  -*-
 
# This is a sample file. You should use generate_user_files.py
# to create your user-config.py file.
 
mylang = 'ko'
family = 'zetawiki'
usernames['zetawiki']['ko'] = 'Jmnote_bot'
</syntaxhighlight>
<syntaxhighlight lang='console'>
root@zetawiki:~/core_stable# cd pywikibot/families/
root@zetawiki:~/core_stable/pywikibot/families# cat wikitech_family.py
# -*- coding: utf-8  -*-
"""Family module for Wikitech."""
from __future__ import unicode_literals
 
__version__ = '$Id: 5cba33c05874a5b4074c5dd7aa04a7e16a8279c2 $'
 
from pywikibot import family
 
 
# The Wikitech family
class Family(family.Family):
 
    """Family class for Wikitech."""
 
    name = 'wikitech'
    langs = {'en': 'wikitech.wikimedia.org'}
 
    def protocol(self, code):
        """Return the protocol for this family."""
        return 'https'
root@zetawiki:~/core_stable/pywikibot/families# cp wikitech_family.py zetawiki_family.py
root@zetawiki:~/core_stable/pywikibot/families# vi zetawiki_family.py
</syntaxhighlight>
<syntaxhighlight lang='py'>
# -*- coding: utf-8  -*-
"""Family module for Zetawiki."""
from __future__ import unicode_literals
 
__version__ = '$Id: 5cba33c05874a5b4074c5dd7aa04a7e16a8279c2 $'
 
from pywikibot import family
 
 
# The Zetawiki family
class Family(family.Family):
 
    """Family class for Zetawiki."""
 
    name = 'zetawiki'
    langs = {'ko': 'zetawiki.com'}
 
    def protocol(self, code):
        """Return the protocol for this family."""
        return 'http'
</syntaxhighlight>
 
==로그인==
<syntaxhighlight lang='console'>
root@zetawiki:~/core_stable/pywikibot/families# cd ../..
root@zetabbs:~/core_stable# python pwb.py login
Password for user Jmnote bot on zetawiki:ko (no characters will be shown): P@ssw0rd
Logging in to zetawiki:ko as Jmnote bot
Logged in on zetawiki:ko as Jmnote bot.
</syntaxhighlight>


==같이 보기==
==참고 자료==
* [[Pywikibot 이중 넘겨주기 봇 돌리기]]
* [[윈도우 Pywikibot 설치]]
* [[Pywikibot]]
* <del>[[Pywikipedia 설치]]</del>
 
==참고==
* https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation
* https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation
* https://www.mediawiki.org/wiki/Manual:Pywikibot/Use_on_third-party_wikis
[[분류: Pywikibot]]
[[분류: Pywikibot]]

제타위키에서의 모든 기여는 크리에이티브 커먼즈 저작자표시-동일조건변경허락 3.0 라이선스로 배포된다는 점을 유의해 주세요(자세한 내용에 대해서는 제타위키:저작권 문서를 읽어주세요). 만약 여기에 동의하지 않는다면 문서를 저장하지 말아 주세요.
또한, 직접 작성했거나 퍼블릭 도메인과 같은 자유 문서에서 가져왔다는 것을 보증해야 합니다. 저작권이 있는 내용을 허가 없이 저장하지 마세요!

취소 편집 도움말 (새 창에서 열림)