Пример #1
0
 def getapis(self):
     print("Loading wikis... ")
     for lang in self.langs:
         print("  * %s... " % (lang[u'prefix']), end="")
         if lang[u'url'] not in self.wikis:
             try:
                 self.wikis[lang[u'url']] = Wiki(lang[u'url'])
                 print("downloaded")
             except Exception as e:
                 print(e)
         else:
             print("in cache")
Пример #2
0
    def run(self):
        print("Generating family file from %s" % self.base_url)

        w = Wiki(self.base_url)
        self.wikis[w.iwpath] = w
        print()
        print("==================================")
        print("api url: %s" % w.api)
        print("MediaWiki version: %s" % w.version)
        print("==================================")
        print()

        self.getlangs(w)
        self.getapis()
        self.writefile()
Пример #3
0
    def run(self):
        """Main method, generate family file."""
        print("Generating family file from %s" % self.base_url)

        w = Wiki(self.base_url)
        self.wikis[w.lang] = w
        print()
        print("==================================")
        print("api url: %s" % w.api)
        print("MediaWiki version: %s" % w.version)
        print("==================================")
        print()

        self.getlangs(w)
        self.getapis()
        self.writefile()