A Python robot that edits Wikipedia and interacts with people over IRC https://en.wikipedia.org/wiki/User:EarwigBot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
2.0 KiB

  1. Installation
  2. ============
  3. This package contains the core :py:mod:`earwigbot`, abstracted to be usable
  4. and customizable by anyone running a bot on a MediaWiki site. Since it is
  5. modular, the IRC components can be disabled if desired. IRC commands and bot
  6. tasks specific to `my instance of EarwigBot`_ that I don't feel the average
  7. user will need are available from the repository `earwigbot-plugins`_.
  8. Latest release
  9. --------------
  10. EarwigBot is available from the `Python Package Index`_, so you can install
  11. the latest release with:
  12. pip install earwigbot
  13. There are a few sets of optional dependencies:
  14. - ``crypto``: Allows encrypting bot passwords and secrets in the config
  15. - ``sql``: Allows interfacing with MediaWiki databases (e.g. on Toolforge_)
  16. - ``copyvios``: Includes parsing libraries for checking copyright violations
  17. - ``dev``: Installs development dependencies (e.g. test runners)
  18. For example, to install all non-dev dependencies:
  19. pip install 'earwigbot[crypto,sql,copyvios]'
  20. Errors while pip is installing dependencies may be due to missing header
  21. files. For example, on Ubuntu, see `this StackOverflow post`_.
  22. Development version
  23. -------------------
  24. You can install the development version of the bot::
  25. git clone https://github.com/earwig/earwigbot.git
  26. cd earwigbot
  27. python3 -m venv venv
  28. . venv/bin/activate
  29. pip install -e '.[crypto,sql,copyvios,dev]'
  30. Or with `uv`_::
  31. uv sync --all-extras
  32. To run the bot's unit tests, run :command:`pytest` (requires the ``dev``
  33. dependencies). Coverage is currently rather incomplete.
  34. .. _my instance of EarwigBot: https://en.wikipedia.org/wiki/User:EarwigBot
  35. .. _earwigbot-plugins: https://github.com/earwig/earwigbot-plugins
  36. .. _Python Package Index: https://pypi.python.org/pypi/earwigbot
  37. .. _Toolforge: https://wikitech.wikimedia.org/wiki/Portal:Toolforge
  38. .. _this StackOverflow post: https://stackoverflow.com/questions/6504810/how-to-install-lxml-on-ubuntu/6504860#6504860
  39. .. _uv: https://docs.astral.sh/uv/