@@ -153,11 +153,11 @@ and the following methods: | |||||
<earwigbot.wiki.page.Page.add_section>`: adds a new section named ``title`` | <earwigbot.wiki.page.Page.add_section>`: adds a new section named ``title`` | ||||
at the bottom of the page | at the bottom of the page | ||||
- :py:meth:`copyvio_check(...) | - :py:meth:`copyvio_check(...) | ||||
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_check>`: checks the page for | |||||
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_check>`: checks the page for | |||||
copyright violations | copyright violations | ||||
- :py:meth:`copyvio_compare(url, ...) | - :py:meth:`copyvio_compare(url, ...) | ||||
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_compare>`: checks the page like | |||||
:py:meth:`~earwigbot.wiki.copyvios.CopyvioMixin.copyvio_check`, but | |||||
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_compare>`: checks the page like | |||||
:py:meth:`~earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_check`, but | |||||
against a specific URL | against a specific URL | ||||
Additionally, :py:class:`~earwigbot.wiki.category.Category` objects (created | Additionally, :py:class:`~earwigbot.wiki.category.Category` objects (created | ||||
@@ -201,9 +201,9 @@ class CopyvioCheckError(WikiToolsetError): | |||||
raised instead of this. | raised instead of this. | ||||
Raised by :py:meth:`Page.copyvio_check | Raised by :py:meth:`Page.copyvio_check | ||||
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_check>` and | |||||
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_check>` and | |||||
:py:meth:`Page.copyvio_compare | :py:meth:`Page.copyvio_compare | ||||
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_compare>`. | |||||
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_compare>`. | |||||
""" | """ | ||||
class UnknownSearchEngineError(CopyvioCheckError): | class UnknownSearchEngineError(CopyvioCheckError): | ||||
@@ -213,9 +213,9 @@ class UnknownSearchEngineError(CopyvioCheckError): | |||||
:py:attr:`config.wiki["search"]["engine"]`. | :py:attr:`config.wiki["search"]["engine"]`. | ||||
Raised by :py:meth:`Page.copyvio_check | Raised by :py:meth:`Page.copyvio_check | ||||
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_check>` and | |||||
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_check>` and | |||||
:py:meth:`Page.copyvio_compare | :py:meth:`Page.copyvio_compare | ||||
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_compare>`. | |||||
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_compare>`. | |||||
""" | """ | ||||
class UnsupportedSearchEngineError(CopyvioCheckError): | class UnsupportedSearchEngineError(CopyvioCheckError): | ||||
@@ -225,16 +225,16 @@ class UnsupportedSearchEngineError(CopyvioCheckError): | |||||
couldn't be imported. | couldn't be imported. | ||||
Raised by :py:meth:`Page.copyvio_check | Raised by :py:meth:`Page.copyvio_check | ||||
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_check>` and | |||||
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_check>` and | |||||
:py:meth:`Page.copyvio_compare | :py:meth:`Page.copyvio_compare | ||||
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_compare>`. | |||||
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_compare>`. | |||||
""" | """ | ||||
class SearchQueryError(CopyvioCheckError): | class SearchQueryError(CopyvioCheckError): | ||||
"""Some error ocurred while doing a search query. | """Some error ocurred while doing a search query. | ||||
Raised by :py:meth:`Page.copyvio_check | Raised by :py:meth:`Page.copyvio_check | ||||
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_check>` and | |||||
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_check>` and | |||||
:py:meth:`Page.copyvio_compare | :py:meth:`Page.copyvio_compare | ||||
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_compare>`. | |||||
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_compare>`. | |||||
""" | """ |
@@ -31,11 +31,11 @@ except ImportError: | |||||
mwparserfromhell = None | mwparserfromhell = None | ||||
from earwigbot import exceptions | from earwigbot import exceptions | ||||
from earwigbot.wiki.copyright import CopyrightMixin | |||||
from earwigbot.wiki.copyright import CopyrightMixIn | |||||
__all__ = ["Page"] | __all__ = ["Page"] | ||||
class Page(CopyrightMixin): | |||||
class Page(CopyrightMixIn): | |||||
""" | """ | ||||
**EarwigBot: Wiki Toolset: Page** | **EarwigBot: Wiki Toolset: Page** | ||||
@@ -69,9 +69,9 @@ class Page(CopyrightMixin): | |||||
- :py:meth:`edit`: replaces the page's content or creates a new page | - :py:meth:`edit`: replaces the page's content or creates a new page | ||||
- :py:meth:`add_section`: adds a new section at the bottom of the page | - :py:meth:`add_section`: adds a new section at the bottom of the page | ||||
- :py:meth:`~earwigbot.wiki.copyvios.CopyrightMixin.copyvio_check`: | |||||
- :py:meth:`~earwigbot.wiki.copyvios.CopyrightMixIn.copyvio_check`: | |||||
checks the page for copyright violations | checks the page for copyright violations | ||||
- :py:meth:`~earwigbot.wiki.copyvios.CopyrightMixin.copyvio_compare`: | |||||
- :py:meth:`~earwigbot.wiki.copyvios.CopyrightMixIn.copyvio_compare`: | |||||
checks the page like :py:meth:`copyvio_check`, but against a specific URL | checks the page like :py:meth:`copyvio_check`, but against a specific URL | ||||
""" | """ | ||||
@@ -129,7 +129,7 @@ class Site(object): | |||||
self._sql_conn = None | self._sql_conn = None | ||||
self._sql_lock = Lock() | self._sql_lock = Lock() | ||||
# Attribute used in copyright violation checks (see CopyrightMixin): | |||||
# Attribute used in copyright violation checks (see CopyrightMixIn): | |||||
self._search_config = search_config | self._search_config = search_config | ||||
# Set up cookiejar and URL opener for making API queries: | # Set up cookiejar and URL opener for making API queries: | ||||