Skip to content

Commit

Permalink
[doc] Remove trailing whitespaces in doc
Browse files Browse the repository at this point in the history
Change-Id: I7112cf3783474274d8360e67cca318842d275d93
  • Loading branch information
xqt committed Aug 24, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent fe02b87 commit 28f1bf2
Showing 8 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Code of Conduct
---------------

The development of this software is covered by a
The development of this software is covered by a
`Code of Conduct <https://www.mediawiki.org/wiki/Special:MyLanguage/Code_of_Conduct>`_.

2 changes: 1 addition & 1 deletion docs/api_ref/pywikibot.tools.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
tools package
=============

.. automodule:: pywikibot.tools

tools.chars module
1 change: 0 additions & 1 deletion docs/credits.rst
Original file line number Diff line number Diff line change
@@ -2,4 +2,3 @@ Credits
=======

.. include:: ../CREDITS.rst

4 changes: 2 additions & 2 deletions docs/faq.rst
Original file line number Diff line number Diff line change
@@ -10,13 +10,13 @@ Frequent Asked Questions
for wikibase entities and :py:mod:`DequePreloadingGenerator
<pywikibot.pagegenerators.DequePreloadingGenerator>` for a
:py:mod:`DequeGenerator <pywikibot.tools.DequeGenerator>`.
3. If you use :py:mod:`GeneratorFactory
3. If you use :py:mod:`GeneratorFactory
<pywikibot.pagegenerators.GeneratorFactory>` with your bot and use its
:py:mod:`getCombinedGenerator
<pywikibot.pagegenerators.GeneratorFactory.getCombinedGenerator>` method
you can set ``preload=True`` to preload page content. This is an alternate
to the ``PreloadingGenerator`` function mentioned above.
4. Use :py:mod:`MySQLPageGenerator
4. Use :py:mod:`MySQLPageGenerator
<pywikibot.pagegenerators.MySQLPageGenerator >` if direct DB access is
available and appropriate. See also: `MySQL`_

10 changes: 5 additions & 5 deletions docs/glossary.rst
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ Glossary
``>>>``
The default Python prompt of the interactive Pywikibot shell.
Often seen for code examples which can be executed interactively
in the interpreter. The :mod:`pywikibot` module is preloaded. The
in the interpreter. The :mod:`pywikibot` module is preloaded. The
:mod:`scripts.shell` script is part of the :mod:`scripts` module.

compat
@@ -27,7 +27,7 @@ Glossary
production systems, use :term:`stable` instead. The master branch
may have untested features. Use master branch if you want to
support development and report undetected problems.

pwb
Can refer to:

@@ -41,7 +41,7 @@ Glossary
convert your old scripts.

pywikibot
**Py**\ thon Media\ **Wiki Bot** Framework, a Python library and
**Py**\ thon Media\ **Wiki Bot** Framework, a Python library and
collection of scripts that automate work on MediaWiki sites.
Originally designed for Wikipedia, it is now used throughout the
Wikimedia Foundation's projects and on many other wikis based of
@@ -64,14 +64,14 @@ Glossary

PAWS
PAWS (PAWS: A Web Shell) formerly known as *Pywikibot: A Web Shell*
is a Jupyter notebooks deployment hosted by Wikimedia. It has
is a Jupyter notebooks deployment hosted by Wikimedia. It has
preinstalled the :term:`stable` release of Pywikibot. Refer:

- :manpage:`PAWS`
- https://wikitech.wikimedia.org/wiki/PAWS

PyPI
The Python Package Index (PyPI), a repository of software for the
The Python Package Index (PyPI), a repository of software for the
Python programming language. Pywikibot framework (without scripts)
is `published monthly at PyPI
<https://pypi.org/project/pywikibot/>`_.
8 changes: 4 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -4,18 +4,18 @@ Pywikibot Documentation
Welcome! This is the documentation for Pywikibot |release|.

**Pywikibot** is a Python library and collection of tools that automate work
on `MediaWiki <https://mediawiki.org>`_ sites. Originally designed for
on `MediaWiki <https://mediawiki.org>`_ sites. Originally designed for
Wikipedia, it is now used throughout the Wikimedia Foundation's projects and
on many other MediaWiki wikis.

The project started in 2003 and is currently on core version |version|.
It features full API usage and is up-to-date with new MediaWiki features and
a Pythonic package layout. But it also works with older installations of
a Pythonic package layout. But it also works with older installations of
MediaWiki 1.23 or higher.

Pywikibot supports Microsoft Windows, macOS and Linux when used with a
Pywikibot supports Microsoft Windows, macOS and Linux when used with a
compatible version of Python. It should also work on any other operating
system that has a compatible version of Python installed. To check
system that has a compatible version of Python installed. To check
whether you have Python installed and to find its version, just type
``python`` at the CMD or shell prompt.

14 changes: 7 additions & 7 deletions docs/library_usage.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Using pywikibot as library
--------------------------

Pywikibot provides bot classes to develop your own script easily. Here
Pywikibot provides bot classes to develop your own script easily. Here
is a minimal example script which shows their usage:

.. code-block:: python
@@ -40,25 +40,25 @@ is a minimal example script which shows their usage:
if __name == '__main__':
main()
The script can be invoked from commandline like::

python mybot -site:wikipedia:test -page:Sandbox -text:"A text added to the sandbox"

**Explanations:**

:1-3: Import necessary framework code parts
:5: The bot is derived from ExistingPageBot. All pages from generator
:5: The bot is derived from ExistingPageBot. All pages from generator
which does not exists are skipped.
:7: Every Bot has an *always* option which autoconfirms any changes if
set to True. To expand all available options of a bot and set the
default values of them, use `update_options` attribute or update
`available_options` like it is shown in BasicBot below.
`available_options` like it is shown in BasicBot below.
:12: All changes for each page are made in this method.
:14: `currentpage` is the current :py:obj:`pywikibot.Page` object from
generator.
:15: All bot options which are passed to the bot class when
instantiating it are accessable via opt attribute. `opt.always`,
:15: All bot options which are passed to the bot class when
instantiating it are accessable via opt attribute. `opt.always`,
`opt.text` and `opt.summary` are all available options for this
bot class.
:16: Save the changes to the live wiki.
2 changes: 1 addition & 1 deletion docs/recipes.rst
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ Page content
>>> page.put(new_content, summary='Bot: Test edit')

See :doc:`library_usage` for more advanced samples.

**How to get links from summary section of page**
>>> import pywikibot
>>> from pwikibot import textlib

0 comments on commit 28f1bf2

Please sign in to comment.