Ver código fonte

API docs

tags/v0.1^2
Ben Kurtovic 12 anos atrás
pai
commit
e4e9356d54
12 arquivos alterados com 460 adições e 7 exclusões
  1. +163
    -0
      docs/api/earwigbot.commands.rst
  2. +51
    -0
      docs/api/earwigbot.irc.rst
  3. +61
    -0
      docs/api/earwigbot.rst
  4. +91
    -0
      docs/api/earwigbot.tasks.rst
  5. +75
    -0
      docs/api/earwigbot.wiki.rst
  6. +7
    -0
      docs/api/modules.rst
  7. +2
    -2
      docs/customizing.rst
  8. +2
    -1
      docs/index.rst
  9. +1
    -0
      earwigbot/bot.py
  10. +2
    -0
      earwigbot/config.py
  11. +3
    -2
      earwigbot/tasks/__init__.py
  12. +2
    -2
      earwigbot/tasks/blptag.py

+ 163
- 0
docs/api/earwigbot.commands.rst Ver arquivo

@@ -0,0 +1,163 @@
commands Package
================

:mod:`commands` Package
-----------------------

.. automodule:: earwigbot.commands
:members:
:undoc-members:
:show-inheritance:

:mod:`_old` Module
------------------

.. automodule:: earwigbot.commands._old
:members:
:undoc-members:
:show-inheritance:

:mod:`afc_report` Module
------------------------

.. automodule:: earwigbot.commands.afc_report
:members:
:undoc-members:
:show-inheritance:

:mod:`afc_status` Module
------------------------

.. automodule:: earwigbot.commands.afc_status
:members:
:undoc-members:
:show-inheritance:

:mod:`calc` Module
------------------

.. automodule:: earwigbot.commands.calc
:members:
:undoc-members:
:show-inheritance:

:mod:`chanops` Module
---------------------

.. automodule:: earwigbot.commands.chanops
:members:
:undoc-members:
:show-inheritance:

:mod:`crypt` Module
-------------------

.. automodule:: earwigbot.commands.crypt
:members:
:undoc-members:
:show-inheritance:

:mod:`ctcp` Module
------------------

.. automodule:: earwigbot.commands.ctcp
:members:
:undoc-members:
:show-inheritance:

:mod:`editcount` Module
-----------------------

.. automodule:: earwigbot.commands.editcount
:members:
:undoc-members:
:show-inheritance:

:mod:`git` Module
-----------------

.. automodule:: earwigbot.commands.git
:members:
:undoc-members:
:show-inheritance:

:mod:`help` Module
------------------

.. automodule:: earwigbot.commands.help
:members:
:undoc-members:
:show-inheritance:

:mod:`link` Module
------------------

.. automodule:: earwigbot.commands.link
:members:
:undoc-members:
:show-inheritance:

:mod:`praise` Module
--------------------

.. automodule:: earwigbot.commands.praise
:members:
:undoc-members:
:show-inheritance:

:mod:`quit` Module
------------------

.. automodule:: earwigbot.commands.quit
:members:
:undoc-members:
:show-inheritance:

:mod:`registration` Module
--------------------------

.. automodule:: earwigbot.commands.registration
:members:
:undoc-members:
:show-inheritance:

:mod:`remind` Module
--------------------

.. automodule:: earwigbot.commands.remind
:members:
:undoc-members:
:show-inheritance:

:mod:`replag` Module
--------------------

.. automodule:: earwigbot.commands.replag
:members:
:undoc-members:
:show-inheritance:

:mod:`rights` Module
--------------------

.. automodule:: earwigbot.commands.rights
:members:
:undoc-members:
:show-inheritance:

:mod:`test` Module
------------------

.. automodule:: earwigbot.commands.test
:members:
:undoc-members:
:show-inheritance:

:mod:`threads` Module
---------------------

.. automodule:: earwigbot.commands.threads
:members:
:undoc-members:
:show-inheritance:


+ 51
- 0
docs/api/earwigbot.irc.rst Ver arquivo

@@ -0,0 +1,51 @@
irc Package
===========

:mod:`irc` Package
------------------

.. automodule:: earwigbot.irc
:members:
:undoc-members:
:show-inheritance:

:mod:`connection` Module
------------------------

.. automodule:: earwigbot.irc.connection
:members:
:undoc-members:
:show-inheritance:

:mod:`data` Module
------------------

.. automodule:: earwigbot.irc.data
:members:
:undoc-members:
:show-inheritance:

:mod:`frontend` Module
----------------------

.. automodule:: earwigbot.irc.frontend
:members:
:undoc-members:
:show-inheritance:

:mod:`rc` Module
----------------

.. automodule:: earwigbot.irc.rc
:members:
:undoc-members:
:show-inheritance:

:mod:`watcher` Module
---------------------

.. automodule:: earwigbot.irc.watcher
:members:
:undoc-members:
:show-inheritance:


+ 61
- 0
docs/api/earwigbot.rst Ver arquivo

@@ -0,0 +1,61 @@
earwigbot Package
=================

:mod:`earwigbot` Package
------------------------

.. automodule:: earwigbot.__init__
:members:
:undoc-members:
:show-inheritance:

:mod:`blowfish` Module
----------------------

.. automodule:: earwigbot.blowfish
:members:
:undoc-members:
:show-inheritance:

:mod:`bot` Module
-----------------

.. automodule:: earwigbot.bot
:members:
:undoc-members:
:show-inheritance:

:mod:`config` Module
--------------------

.. automodule:: earwigbot.config
:members:
:undoc-members:
:show-inheritance:

:mod:`managers` Module
----------------------

.. automodule:: earwigbot.managers
:members:
:undoc-members:
:show-inheritance:

:mod:`util` Module
------------------

.. automodule:: earwigbot.util
:members:
:undoc-members:
:show-inheritance:

Subpackages
-----------

.. toctree::

earwigbot.commands
earwigbot.irc
earwigbot.tasks
earwigbot.wiki


+ 91
- 0
docs/api/earwigbot.tasks.rst Ver arquivo

@@ -0,0 +1,91 @@
tasks Package
=============

:mod:`tasks` Package
--------------------

.. automodule:: earwigbot.tasks
:members:
:undoc-members:
:show-inheritance:

:mod:`afc_catdelink` Module
---------------------------

.. automodule:: earwigbot.tasks.afc_catdelink
:members:
:undoc-members:
:show-inheritance:

:mod:`afc_copyvios` Module
--------------------------

.. automodule:: earwigbot.tasks.afc_copyvios
:members:
:undoc-members:
:show-inheritance:

:mod:`afc_dailycats` Module
---------------------------

.. automodule:: earwigbot.tasks.afc_dailycats
:members:
:undoc-members:
:show-inheritance:

:mod:`afc_history` Module
-------------------------

.. automodule:: earwigbot.tasks.afc_history
:members:
:undoc-members:
:show-inheritance:

:mod:`afc_statistics` Module
----------------------------

.. automodule:: earwigbot.tasks.afc_statistics
:members:
:undoc-members:
:show-inheritance:

:mod:`afc_undated` Module
-------------------------

.. automodule:: earwigbot.tasks.afc_undated
:members:
:undoc-members:
:show-inheritance:

:mod:`blptag` Module
--------------------

.. automodule:: earwigbot.tasks.blptag
:members:
:undoc-members:
:show-inheritance:

:mod:`feed_dailycats` Module
----------------------------

.. automodule:: earwigbot.tasks.feed_dailycats
:members:
:undoc-members:
:show-inheritance:

:mod:`wikiproject_tagger` Module
--------------------------------

.. automodule:: earwigbot.tasks.wikiproject_tagger
:members:
:undoc-members:
:show-inheritance:

:mod:`wrongmime` Module
-----------------------

.. automodule:: earwigbot.tasks.wrongmime
:members:
:undoc-members:
:show-inheritance:


+ 75
- 0
docs/api/earwigbot.wiki.rst Ver arquivo

@@ -0,0 +1,75 @@
wiki Package
============

:mod:`wiki` Package
-------------------

.. automodule:: earwigbot.wiki
:members:
:undoc-members:
:show-inheritance:

:mod:`category` Module
----------------------

.. automodule:: earwigbot.wiki.category
:members:
:undoc-members:
:show-inheritance:

:mod:`constants` Module
-----------------------

.. automodule:: earwigbot.wiki.constants
:members:
:undoc-members:
:show-inheritance:

:mod:`copyright` Module
-----------------------

.. automodule:: earwigbot.wiki.copyright
:members:
:undoc-members:
:show-inheritance:

:mod:`exceptions` Module
------------------------

.. automodule:: earwigbot.wiki.exceptions
:members:
:undoc-members:
:show-inheritance:

:mod:`page` Module
------------------

.. automodule:: earwigbot.wiki.page
:members:
:undoc-members:
:show-inheritance:

:mod:`site` Module
------------------

.. automodule:: earwigbot.wiki.site
:members:
:undoc-members:
:show-inheritance:

:mod:`sitesdb` Module
---------------------

.. automodule:: earwigbot.wiki.sitesdb
:members:
:undoc-members:
:show-inheritance:

:mod:`user` Module
------------------

.. automodule:: earwigbot.wiki.user
:members:
:undoc-members:
:show-inheritance:


+ 7
- 0
docs/api/modules.rst Ver arquivo

@@ -0,0 +1,7 @@
earwigbot
=========

.. toctree::
:maxdepth: 4

earwigbot

+ 2
- 2
docs/customizing.rst Ver arquivo

@@ -21,8 +21,8 @@ commands and tasks (i.e., :py:attr:`self.bot`).
The most useful attributes are:

- :py:attr:`~earwigbot.bot.Bot.config`: an instance of
:py:class:`~earwigbot.bot.BotConfig`, for accessing the bot's configuration
data (see below).
:py:class:`~earwigbot.config.BotConfig`, for accessing the bot's
configuration data (see below).

- :py:attr:`~earwigbot.bot.Bot.commands`: the bot's
:py:class:`~earwigbot.managers.CommandManager`, which is used internally to


+ 2
- 1
docs/index.rst Ver arquivo

@@ -31,13 +31,14 @@ Contents
--------

.. toctree::
:maxdepth: 3
:maxdepth: 2

installation
setup
customizing
toolset
tips
API Reference <api/modules>

Indices and tables
------------------


+ 1
- 0
earwigbot/bot.py Ver arquivo

@@ -38,6 +38,7 @@ class Bot(object):

EarwigBot has three components that can run independently of each other: an
IRC front-end, an IRC watcher, and a wiki scheduler.

* The IRC front-end runs on a normal IRC server and expects users to
interact with it/give it commands.
* The IRC watcher runs on a wiki recent-changes server and listens for


+ 2
- 0
earwigbot/config.py Ver arquivo

@@ -40,6 +40,7 @@ class BotConfig(object):
from scratch at the inital bot run.

BotConfig has a few properties and functions, including the following:

* config.root_dir - bot's working directory; contains config.yml, logs/
* config.path - path to the bot's config file
* config.components - enabled components
@@ -50,6 +51,7 @@ class BotConfig(object):
* config.schedule() - tasks scheduled to run at a given time

BotConfig also has some functions used in config loading:

* config.load() - loads and parses our config file, returning True if
passwords are stored encrypted or False otherwise;
can also be used to easily reload config


+ 3
- 2
earwigbot/tasks/__init__.py Ver arquivo

@@ -34,8 +34,9 @@ class BaseTask(object):
This class (import with `from earwigbot.tasks import BaseTask`) can be
subclassed to create custom bot tasks.

To run a task, use bot.tasks.start(name, **kwargs). **kwargs get passed to
the Task's run() function.
To run a task, use :py:meth:`bot.tasks.start(name, **kwargs)
<earwigbot.managers.TaskManager.start>`. ``**kwargs`` get passed to the
Task's run() function.
"""
name = None
number = 0


+ 2
- 2
earwigbot/tasks/blptag.py Ver arquivo

@@ -25,8 +25,8 @@ from earwigbot.tasks import BaseTask
__all__ = ["Task"]

class Task(BaseTask):
"""A task to add |blp=yes to {{WPB}} or {{WPBS}} when it is used along with
{{WP Biography}}."""
"""A task to add |blp=yes to ``{{WPB}}`` or ``{{WPBS}}`` when it is used
along with ``{{WP Biography}}``."""
name = "blptag"

def setup(self):


Carregando…
Cancelar
Salvar