Package pywikipedia :: Module sqldump :: Class SQLentry
[show private | hide private]
[frames | no frames]

Type SQLentry

object --+
         |
        SQLentry


Represents a wiki page, read from an SQL dump.

An instance of this class will have the following attributes: * self.id is the page ID (integer) * self.namespace is the namespace ID (integer) * self.title is the page title without namespace (unicode) * self.text is the text on that page (unicode) * self.comment is the last edit summary (unicode) * self.userid is the last editor's ID (integer) * self.username is the last editor's username (unicode) * self.timestamp is the time of the last edit (time tuple) * self.restrictions is True if the page is locked (boolean) * self.counter is the # of page views, disabled on Wikimedia wikis (integer) * self.redirect is True if the page is a redirect (boolean) * self.minor is True if the last edit was marked as minor (boolean) * self.new is True if the last edit was the first one (boolean) * self.random is a random number used for the 'Random Page' function (float) * self.touched is the date of the last cache update (time tuple)

See http://meta.wikimedia.org/wiki/Cur_table for details.
Method Summary
  __init__(self, id, namespace, title, text, comment, userid, username, timestamp, restrictions, counter, redirect, minor, new, random, inversetimestamp, touched)
Constructor.
  age(self)
Returns the time passed since the last edit, in relation to the current system time, in seconds (floating point number).
  full_title(self, underline)
Returns the full page title in the form 'namespace:title', using the localized namespace titles defined in your family file.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Method Details

__init__(self, id, namespace, title, text, comment, userid, username, timestamp, restrictions, counter, redirect, minor, new, random, inversetimestamp, touched)
(Constructor)

Constructor. All parameters should be strings, as read from the SQL dump. This function will convert them to formats which are more appropriate for the data types.
Overrides:
__builtin__.object.__init__

age(self)

Returns the time passed since the last edit, in relation to the current system time, in seconds (floating point number).

full_title(self, underline=True)

Returns the full page title in the form 'namespace:title', using the localized namespace titles defined in your family file. If underline is True, returns the page title with underlines instead of spaces.

Generated by Epydoc 2.1 on Sun Jul 03 17:07:33 2005 http://epydoc.sf.net