sfjplib for python
Rev. | f6bf83ccbc242faf3fc6fcd7916144eaee220512 |
---|---|
サイズ | 717 バイト |
日時 | 2011-08-25 20:46:40 |
作者 | Hiromichi MATSUSHIMA |
ログメッセージ | add some files
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""sfjplib.py"""
import getpass
import sys
import codecs
import sfjplib
sys.stdout = codecs.getwriter("utf_8")(sys.stdout)
if __name__ == "__main__":
#uname = raw_input("Username: ")
uname = "hiromichi-m"
passwd = getpass.getpass("Password: ")
u = sfjplib.SfjpUser(uname, passwd)
r = u.login()
d = sfjplib.Wiki(u)
uid = "test11"
name = "testpage"
(title, text, comment, postkey) = d.retrive_wikitext(uid, name)
# print title
# print text
# print comment
print postkey
d.post_wikitext(uid, name, u"ほげほげタイトル", u"ほげほげ本文", u"ほげほげコメント", postkey)