]> code.communitydata.science - rises_declines_wikia_code.git/blob - mediawiki_dump_tools/Mediawiki-Utilities/mw/lib/reverts/__init__.py
Initial commit
[rises_declines_wikia_code.git] / mediawiki_dump_tools / Mediawiki-Utilities / mw / lib / reverts / __init__.py
1 """
2 This module provides a set of utilities for detecting identity reverts in
3 revisioned content.
4
5 To detect reverts in a stream of revisions to a single page, you can use
6 :func:`detect`.  If you'll be detecting reverts in a collection of pages or
7 would, for some other reason, prefer to process revisions one at a time,
8 :class:`Detector` and it's :meth:`~Detector.process` will allow you to do so.
9
10 To detect reverts one-at-time and arbitrarily, you can user the `check()`
11 functions:
12
13 * :func:`database.check` and :func:`database.check_row` use a :class:`mw.database.DB`
14 * :func:`api.check` and :func:`api.check_rev` use a :class:`mw.api.Session`
15
16 Note that these functions are less performant than detecting reverts in a
17 stream of page revisions.  This can be practical when trying to identify
18 reverted revisions in a user's contribution history.
19 """
20 from .detector import Detector, Revert
21 from .functions import detect, reverts
22 from . import database
23 from . import api
24 from . import defaults

Community Data Science Collective || Want to submit a patch?