On 10 фев, 17:09, Alex Rades <[email protected]> wrote:
> Hi,
> thanks for your reply! I've been able to use parseString but.. how do
> i find templates databases? Are they downloadable from wikipedia?
There is five ways to use database:
1) your own database interface
2) accessing the Mediawiki API for an online wiki
3) accessing an online wiki directly
4) a ZIP file of article sources
5) a CDB which simply maps article titles to sources
6) trivial database
The last way suppose that articles cannot be changed.
The first way is the most flexible. Create class, like this, Python:
class myDatabase(object):
def getRawArticle(self, title, raw=None, revision=None,
resolveRedirect=True):
....
def getRawPage(self, title, isArticle=False):
....
def getTemplate(self, title, followRedirects=False):
....
Then, you can use object of this class for db parametr.
See also:
http://groups.google.ru/group/mwlib/browse_thread/thread/a0a9a2123b552398/8e99b13cf5592426
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"mwlib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/mwlib?hl=en
-~----------~----~----~----~------~----~------~--~---