示例#1
0
def openWiki(name):
    global wiki
    if isinstance(name, Wiki):
        wiki = name
        return
    if not name:
        name = settings.conf['general']['default']
    if name in settings.conf:
        wiki = Wiki.fromName(name)
    else:
        wiki = Wiki.fromApiUrl(name)
示例#2
0
def openWiki(name):
    global wiki
    if isinstance(name, Wiki):
        wiki = name
        return
    if not name:
        name = settings.conf['general']['default']
    if name in settings.conf:
        wiki = Wiki.fromName(name)
    else:
        wiki = Wiki.fromApiUrl(name)
示例#3
0
 def _select(self, lang):
     url, name = page.langlinks[lang]
     openWiki(Wiki.fromPageUrl(url))
     openPage(name)
示例#4
0
 def _select(self, name):
     if name == "Main page":
         name = ''
     url = dict(page.iwlinks)[name]
     openWiki(Wiki.fromPageUrl(url))
     openPage(name)
示例#5
0
 def _select(self, lang):
     url, name = page.langlinks[lang]
     openWiki(Wiki.fromPageUrl(url))
     openPage(name)
示例#6
0
 def _select(self, name):
     if name == "Main page":
         name = ''
     url = dict(page.iwlinks)[name]
     openWiki(Wiki.fromPageUrl(url))
     openPage(name)