Skip to content

Commit

Permalink
[doc] Update documentation
Browse files Browse the repository at this point in the history
* wikipedia --> Wikipedia
* wikibase --> Wikibase
** See https://en.wikipedia.org/wiki/Wikibase

Change-Id: I4f8b19e7cb5e2750d597afaa6713bb1c420f5bec
  • Loading branch information
Meno25 committed Apr 20, 2021
1 parent fd16ca1 commit 6276c67
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ A sample pywikibot script for getting data from Wikibase:

import pywikibot
site = pywikibot.Site('wikipedia:en')
repo = site.data_repository() # the wikibase repository for given site
repo = site.data_repository() # the Wikibase repository for given site
page = repo.page_from_repository('Q91') # create a local page for the given item
item = pywikibot.ItemPage(repo, 'Q91') # a repository item
data = item.get() # get all item data from repository for this item
Expand Down
10 changes: 5 additions & 5 deletions pywikibot/page/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2175,15 +2175,15 @@ def get_best_claim(self, prop: str):
"""
Return the first best Claim for this page.
Return the first 'preferred' ranked Claim specified by wikibase
Return the first 'preferred' ranked Claim specified by Wikibase
property or the first 'normal' one otherwise.
@param prop: property id, "P###"
@return: Claim object given by wikibase property number
@return: Claim object given by Wikibase property number
for this page object.
@rtype: pywikibot.Claim or None
@raises UnknownExtension: site has no wikibase extension
@raises UnknownExtension: site has no Wikibase extension
"""
def find_best_claim(claims):
"""Find the first best ranked claim."""
Expand Down Expand Up @@ -3841,9 +3841,9 @@ def title(self, **kwargs):
Return ID as title of the ItemPage.
If the ItemPage was lazy-loaded via ItemPage.fromPage, this method
will fetch the wikibase item ID for the page, potentially raising
will fetch the Wikibase item ID for the page, potentially raising
NoPage with the page on the linked wiki if it does not exist, or
does not have a corresponding wikibase item ID.
does not have a corresponding Wikibase item ID.
This method also refreshes the title if the id property was set.
i.e. item.id = 'Q60'
Expand Down
2 changes: 1 addition & 1 deletion pywikibot/pagegenerators.py
Original file line number Diff line number Diff line change
Expand Up @@ -2234,7 +2234,7 @@ def WikibaseItemGenerator(gen):
def WikibaseItemFilterPageGenerator(generator, has_item: bool = True,
show_filtered: bool = False):
"""
A wrapper generator used to exclude if page has a wikibase item or not.
A wrapper generator used to exclude if page has a Wikibase item or not.
@param generator: Generator to wrap.
@type generator: generator
Expand Down
8 changes: 4 additions & 4 deletions pywikibot/site/_apisite.py
Original file line number Diff line number Diff line change
Expand Up @@ -1015,17 +1015,17 @@ def is_data_repository(self):

def page_from_repository(self, item):
"""
Return a Page for this site object specified by wikibase item.
Return a Page for this site object specified by Wikibase item.
@param item: id number of item, "Q###",
@type item: str
@return: Page, or Category object given by wikibase item number
@return: Page, or Category object given by Wikibase item number
for this site object.
@rtype: pywikibot.Page or None
@raises pywikibot.exceptions.UnknownExtension: site has no wikibase
@raises pywikibot.exceptions.UnknownExtension: site has no Wikibase
extension
@raises NotimplementedError: method not implemented for a wikibase site
@raises NotimplementedError: method not implemented for a Wikibase site
"""
if not self.has_data_repository:
raise UnknownExtension(
Expand Down
4 changes: 2 additions & 2 deletions scripts/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
-hist - Creates a nice wikitable on the talk page of target category
that contains detailed page history of the source category.
-nodelete - Don't delete the old category after move.
-nowb - Don't update the wikibase repository.
-nowb - Don't update the Wikibase repository.
-allowsplit - If that option is not set, it only moves the talk and main
page together.
-mvtogether - Only move the pages/subcategories of a category, if the
Expand Down Expand Up @@ -592,7 +592,7 @@ def __init__(self, oldcat, newcat=None, batch=False, comment='',
self.title_regex = title_regex
self.history = history
self.pagesonly = pagesonly
# if that page doesn't has a wikibase
# if that page doesn't has a Wikibase
self.wikibase = wikibase and self.site.has_data_repository
self.allow_split = allow_split
self.move_together = move_together
Expand Down
2 changes: 1 addition & 1 deletion scripts/newitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
-pageage The minimum number of days that has passed since the page was
created.
-touch Do a null edit on every page which has a wikibase item.
-touch Do a null edit on every page which has a Wikibase item.
Be careful, this option can trigger edit rates or captchas
if your account is not autoconfirmed.
Expand Down
2 changes: 1 addition & 1 deletion scripts/redirect.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
-sdtemplate:x Add the speedy deletion template string including brackets.
This enables overriding the default template via i18n or
to enable speedy deletion for projects other than wikipedias.
to enable speedy deletion for projects other than Wikipedias.
-always Don't prompt you for each replacement.
Expand Down

0 comments on commit 6276c67

Please sign in to comment.